Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
SSMP | 0b1c52eed2 | |
Brandon Nozaki Miller | 51046c6f71 | |
Ray Booysen | 4cafaca0ca |
|
@ -1 +0,0 @@
|
|||
coverage/**/* linguist-generated=true
|
|
@ -1,4 +0,0 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: RIAEvangelist
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Node.js CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
node_version:
|
||||
- 14.x
|
||||
- 16.x
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm ci
|
||||
- run: npm run build --if-present
|
||||
- run: npm test
|
|
@ -1,5 +1,3 @@
|
|||
/nbproject/private/
|
||||
/node_modules/
|
||||
/nbproject
|
||||
npm-debug.log
|
||||
node-ipc.cjs
|
|
@ -1,4 +0,0 @@
|
|||
spec
|
||||
example
|
||||
coverage
|
||||
test
|
180
README.md
180
README.md
|
@ -1,58 +1,31 @@
|
|||
Thanks for all the free pizza, and thanks to all the police that showed up to SWAT me. They were really nice fellas.
|
||||
|
||||
node-ipc
|
||||
================
|
||||
|
||||
[![Sponsor RIAEvangelist to help development of node-ipc](https://img.shields.io/static/v1?label=Sponsor%20Me%20On%20Github&message=%E2%9D%A4&logo=GitHub&link=https://github.com/sponsors/RIAEvangelist)](https://github.com/sponsors/RIAEvangelist)
|
||||
|
||||
*a nodejs module for local and remote Inter Process Communication* with full support for Linux, Mac and Windows. It also supports all forms of socket communication from low level unix and windows sockets to UDP and secure TLS and TCP sockets.
|
||||
|
||||
A great solution for complex multiprocess **Neural Networking** in Node.JS
|
||||
|
||||
`npm install node-ipc`
|
||||
|
||||
#### for node <v14
|
||||
|
||||
`npm install node-ipc@^9.0.0`
|
||||
|
||||
#### including v10 or greater into your code
|
||||
|
||||
```js
|
||||
|
||||
//es6
|
||||
import ipc from 'node-ipc'
|
||||
|
||||
//commonjs
|
||||
const ipc = require('node-ipc').default;
|
||||
|
||||
```
|
||||
**npm install node-ipc**
|
||||
|
||||
#### NPM Stats
|
||||
|
||||
npm info : [See npm trends and stats for node-ipc](http://npm-stat.com/charts.html?package=node-ipc&author=&from=&to=)
|
||||
[![NPM](https://nodei.co/npm/node-ipc.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/node-ipc/)
|
||||
[![Package Quality](http://npm.packagequality.com/badge/node-ipc.png)](http://packagequality.com/#?package=node-ipc)
|
||||
![node-ipc npm version](https://img.shields.io/npm/v/node-ipc.svg) ![supported node version for node-ipc](https://img.shields.io/node/v/node-ipc.svg) ![total npm downloads for node-ipc](https://img.shields.io/npm/dt/node-ipc.svg) ![monthly npm downloads for node-ipc](https://img.shields.io/npm/dm/node-ipc.svg) ![npm licence for node-ipc](https://img.shields.io/npm/l/node-ipc.svg)
|
||||
![node-ipc npm version](https://img.shields.io/npm/v/node-ipc.svg) ![supported node version for node-ipc](https://img.shields.io/node/v/node-ipc.svg) ![total npm downloads for node-ipc](https://img.shields.io/npm/dt/node-ipc.svg) ![monthly npm downloads for node-ipc](https://img.shields.io/npm/dm/node-ipc.svg) ![npm licence for node-ipc](https://img.shields.io/npm/l/node-ipc.svg)
|
||||
|
||||
[![RIAEvangelist](https://avatars3.githubusercontent.com/u/369041?v=3&s=100)](https://github.com/RIAEvangelist)
|
||||
|
||||
GitHub info :
|
||||
![node-ipc GitHub Release](https://img.shields.io/github/release/RIAEvangelist/node-ipc.svg) ![GitHub license node-ipc license](https://img.shields.io/github/license/RIAEvangelist/node-ipc.svg) ![open issues for node-ipc on GitHub](https://img.shields.io/github/issues/RIAEvangelist/node-ipc.svg)
|
||||
|
||||
Code Coverage Info :
|
||||
![lcov node-ipc](/coverage/lcov.svg)
|
||||
Run `npm run coverage` to host a local version of the coverage report on [localhost:8080](http://localhost:8080) This is the same format as Istanbul and NYC. It should be very familiar.
|
||||
|
||||
Testing done with [vanilla-test](https://github.com/RIAEvangelist/vanilla-test)
|
||||
`vanilla-test` integrates with [c8](https://github.com/bcoe/c8) for native ESM coverage without the need to transpile your code. At the time of writing, this is the only way to natively test ESM, and it is amazing!
|
||||
Codacy info :
|
||||
[![Codacy Badge](https://api.codacy.com/project/badge/grade/8e0294dff55f4ac1985c07b16f39d0a9)](https://www.codacy.com/app/RIAEvangelist/node-ipc) [![Codacy Badge](https://api.codacy.com/project/badge/coverage/8e0294dff55f4ac1985c07b16f39d0a9)](https://www.codacy.com/app/RIAEvangelist/node-ipc)
|
||||
|
||||
Package details websites :
|
||||
* [GitHub.io site](http://riaevangelist.github.io/node-ipc/ "node-ipc documentation"). A prettier version of this site.
|
||||
* [NPM Module](https://www.npmjs.org/package/node-ipc "node-ipc npm module"). The npm page for the node-ipc module.
|
||||
|
||||
This work is licenced via the MIT Licence.
|
||||
|
||||
#### Older versions of node
|
||||
|
||||
the latest versions of `node-ipc` may work with the --harmony flag. Officially though, we support node v4 and newer with es5 and es6
|
||||
This work is licenced via the [DBAD Public Licence](http://www.dbad-license.org/).
|
||||
|
||||
#### Testing
|
||||
|
||||
|
@ -76,7 +49,7 @@ You may want to install jasmine and istanbul globally with ` sudo npm install -g
|
|||
4. [IPC Events](#ipc-events)
|
||||
5. [Multiple IPC instances](#multiple-ipc-instances)
|
||||
6. [Basic Examples](#basic-examples)
|
||||
1. [Server for Unix||Windows Sockets & TCP Sockets](#server-for-unix-sockets-windows-sockets--tcp-sockets)
|
||||
1. [Server for Unix||Windows Sockets & TCP Sockets](#server-for-unix-sockets--tcp-sockets)
|
||||
2. [Client for Unix||Windows Sockets & TCP Sockets](#client-for-unix-sockets--tcp-sockets)
|
||||
4. [Server & Client for UDP Sockets](#server--client-for-udp-sockets)
|
||||
5. [Raw Buffers, Real Time and / or Binary Sockets](#raw-buffer-or-binary-sockets)
|
||||
|
@ -116,55 +89,37 @@ Set these variables in the `ipc.config` scope to overwrite or set default values
|
|||
id : os.hostname(),
|
||||
networkHost : 'localhost', //should resolve to 127.0.0.1 or ::1 see the table below related to this
|
||||
networkPort : 8000,
|
||||
readableAll : false,
|
||||
writableAll : false,
|
||||
encoding : 'utf8',
|
||||
rawBuffer : false,
|
||||
delimiter : '\f',
|
||||
sync : false,
|
||||
silent : false,
|
||||
logInColor : true,
|
||||
logDepth : 5,
|
||||
logger : console.log,
|
||||
maxConnections : 100,
|
||||
retry : 500,
|
||||
maxRetries : false,
|
||||
stopRetrying : false,
|
||||
unlink : true,
|
||||
interfaces : {
|
||||
localAddress: false,
|
||||
localPort : false,
|
||||
family : false,
|
||||
hints : false,
|
||||
lookup : false
|
||||
}
|
||||
stopRetrying : false
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
| variable | documentation |
|
||||
|----------|---------------|
|
||||
| appspace | used for Unix Socket (Unix Domain Socket) namespacing. If not set specifically, the Unix Domain Socket will combine the socketRoot, appspace, and id to form the Unix Socket Path for creation or binding. This is available in case you have many apps running on your system, you may have several sockets with the same id, but if you change the appspace, you will still have app specic unique sockets.|
|
||||
| appspace | used for Unix Socket (Unix Domain Socket) namespacing. If not set specifically, the Unix Domain Socket will combine the socketRoot, appspace, and id to form the Unix Socket Path for creation or binding. This is available incase you have many apps running on your system, you may have several sockets with the same id, but if you change the appspace, you will still have app specic unique sockets.|
|
||||
| socketRoot| the directory in which to create or bind to a Unix Socket |
|
||||
| id | the id of this socket or service |
|
||||
| networkHost| the local or remote host on which TCP, TLS or UDP Sockets should connect |
|
||||
| networkPort| the default port on which TCP, TLS, or UDP sockets should connect |
|
||||
| readableAll| makes the pipe readable for all users including windows services |
|
||||
| writableAll| makes the pipe writable for all users including windows services |
|
||||
| encoding | the default encoding for data sent on sockets. Mostly used if rawBuffer is set to true. Valid values are : ` ascii` ` utf8 ` ` utf16le` ` ucs2` ` base64` ` hex ` . |
|
||||
| rawBuffer| if true, data will be sent and received as a raw node ` Buffer ` __NOT__ an ` Object ` as JSON. This is great for Binary or hex IPC, and communicating with other processes in languages like C and C++ |
|
||||
| delimiter| the delimiter at the end of each data packet. |
|
||||
| sync | synchronous requests. Clients will not send new requests until the server answers. |
|
||||
| silent | turn on/off logging default is false which means logging is on |
|
||||
| logInColor | turn on/off util.inspect colors for ipc.log |
|
||||
| logDepth | set the depth for util.inspect during ipc.log |
|
||||
| logger | the function which receives the output from ipc.log; should take a single string argument |
|
||||
| maxConnections| this is the max number of connections allowed to a socket. It is currently only being set on Unix Sockets. Other Socket types are using the system defaults. |
|
||||
| retry | this is the time in milliseconds a client will wait before trying to reconnect to a server if the connection is lost. This does not effect UDP sockets since they do not have a client server relationship like Unix Sockets and TCP Sockets. |
|
||||
| maxRetries | if set, it represents the maximum number of retries after each disconnect before giving up and completely killing a specific connection |
|
||||
| stopRetrying| Defaults to false meaning clients will continue to retry to connect to servers indefinitely at the retry interval. If set to any number the client will stop retrying when that number is exceeded after each disconnect. If set to true in real time it will immediately stop trying to connect regardless of maxRetries. If set to 0, the client will ***NOT*** try to reconnect. |
|
||||
| unlink| Defaults to true meaning that the module will take care of deleting the IPC socket prior to startup. If you use `node-ipc` in a clustered environment where there will be multiple listeners on the same socket, you must set this to `false` and then take care of deleting the socket in your own code. |
|
||||
| interfaces| primarily used when specifying which interface a client should connect through. see the [socket.connect documentation in the node.js api](https://nodejs.org/api/net.html#net_socket_connect_options_connectlistener) |
|
||||
|
||||
----
|
||||
|
||||
|
@ -178,13 +133,12 @@ These methods are available in the IPC Scope.
|
|||
|
||||
ipc.log will accept any number of arguments and if `ipc.config.silent` is not set, it will concat them all with a single space ' ' between them and then log them to the console. This is fast because it prevents any concatenation from happening if the ipc.config.silent is set ` true `. That way if you leave your logging in place it should have almost no effect on performance.
|
||||
|
||||
The log also uses util.inspect You can control if it should log in color, the log depth, and the destination via ` ipc.config `
|
||||
The log also uses util.inspect You can control if it should log in color as well as the log depth via ` ipc.config `
|
||||
|
||||
```javascript
|
||||
|
||||
ipc.config.logInColor=true; //default
|
||||
ipc.config.logDepth=5; //default
|
||||
ipc.config.logger=console.log.bind(console); // default
|
||||
|
||||
```
|
||||
|
||||
|
@ -488,7 +442,7 @@ or specifying everything UDP
|
|||
|
||||
| method | definition |
|
||||
|-----------|------------|
|
||||
|start| start serving need to call ` serve ` or ` serveNet ` first to set up the server |
|
||||
|start| start serving need top call ` serve ` or ` serveNet ` first to set up the server |
|
||||
|stop| close the server and stop serving |
|
||||
|
||||
----
|
||||
|
@ -499,11 +453,11 @@ or specifying everything UDP
|
|||
|----------|------|----------|
|
||||
|error|err obj|triggered when an error has occured|
|
||||
|connect||triggered when socket connected|
|
||||
|disconnect||triggered by client when socket has disconnected from server|
|
||||
|socket.disconnected|socket destroyedSocketID|triggered by server when a client socket has disconnected|
|
||||
|disconnect||triggered when socket disconnected|
|
||||
|destroy||triggered when socket has been totally destroyed, no further auto retries will happen and all references are gone.|
|
||||
|data|buffer|triggered when ipc.config.rawBuffer is true and a message is received.|
|
||||
|***your event type***|***your event data***|triggered when a JSON message is received. The event name will be the type string from your message and the param will be the data object from your message eg : ` { type:'myEvent',data:{a:1}} ` |
|
||||
||||
|
||||
|
||||
### Multiple IPC Instances
|
||||
|
||||
|
@ -511,15 +465,14 @@ Sometimes you might need explicit and independent instances of node-ipc. Just fo
|
|||
|
||||
```javascript
|
||||
|
||||
import {IPCModule} from 'node-ipc';
|
||||
|
||||
const RawIPC=require('node-ipc').IPC;
|
||||
const ipc=new RawIPC;
|
||||
const someOtherExplicitIPC=new RawIPC;
|
||||
|
||||
|
||||
//OR
|
||||
|
||||
const ipc=from 'node-ipc');
|
||||
const ipc=require('node-ipc');
|
||||
const someOtherExplicitIPC=new ipc.IPC;
|
||||
|
||||
|
||||
|
@ -547,7 +500,7 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co
|
|||
|
||||
```javascript
|
||||
|
||||
import ipc from 'node-ipc';
|
||||
var ipc=require('node-ipc');
|
||||
|
||||
ipc.config.id = 'world';
|
||||
ipc.config.retry= 1500;
|
||||
|
@ -566,12 +519,6 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co
|
|||
);
|
||||
}
|
||||
);
|
||||
ipc.server.on(
|
||||
'socket.disconnected',
|
||||
function(socket, destroyedSocketID) {
|
||||
ipc.log('client ' + destroyedSocketID + ' has disconnected!');
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -584,7 +531,7 @@ The client connects to the servers socket for Inter Process Communication. The s
|
|||
|
||||
```javascript
|
||||
|
||||
import ipc from 'node-ipc';
|
||||
var ipc=require('node-ipc');
|
||||
|
||||
ipc.config.id = 'hello';
|
||||
ipc.config.retry= 1500;
|
||||
|
@ -630,7 +577,7 @@ This is the most basic example which will work for both local and remote UDP Soc
|
|||
|
||||
```javascript
|
||||
|
||||
import ipc from 'node-ipc';
|
||||
var ipc=require('../../../node-ipc');
|
||||
|
||||
ipc.config.id = 'world';
|
||||
ipc.config.retry= 1500;
|
||||
|
@ -781,7 +728,7 @@ Writing explicit buffers, int types, doubles, floats etc. as well as big endian
|
|||
ipc.config.encoding='hex';
|
||||
|
||||
//make a 6 byte buffer for example
|
||||
const myBuffer=Buffer.alloc(6).fill(0);
|
||||
const myBuffer=new Buffer(6).fill(0);
|
||||
|
||||
//fill the first 2 bytes with a 16 bit (2 byte) short unsigned int
|
||||
|
||||
|
@ -818,88 +765,5 @@ Writing explicit buffers, int types, doubles, floats etc. as well as big endian
|
|||
|
||||
```
|
||||
|
||||
#### Server with the `cluster` Module
|
||||
`node-ipc` can be used with Node.js' [cluster module](https://nodejs.org/api/cluster.html) to provide the ability to have multiple readers for a single socket. Doing so simply requires you to set the `unlink` property in the config to `false` and take care of unlinking the socket path in the master process:
|
||||
|
||||
##### Server
|
||||
|
||||
```javascript
|
||||
|
||||
import fs from 'fs';
|
||||
import ipc from 'node-ipc';
|
||||
import {cpus} from 'os';
|
||||
import cluster from 'cluster';
|
||||
|
||||
const cpuCount=cpus().length;
|
||||
|
||||
const socketPath='/tmp/ipc.sock';
|
||||
|
||||
ipc.config.unlink = false;
|
||||
|
||||
if (cluster.isMaster) {
|
||||
if (fs.existsSync(socketPath)) {
|
||||
fs.unlinkSync(socketPath);
|
||||
}
|
||||
|
||||
for (let i = 0; i < cpuCount; i++) {
|
||||
cluster.fork();
|
||||
}
|
||||
}else{
|
||||
ipc.serve(
|
||||
socketPath,
|
||||
function() {
|
||||
ipc.server.on(
|
||||
'currentDate',
|
||||
function(data,socket) {
|
||||
console.log(`pid ${process.pid} got: `, data);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
ipc.server.start();
|
||||
console.log(`pid ${process.pid} listening on ${socketPath}`);
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
##### Client
|
||||
|
||||
```javascript
|
||||
|
||||
import fs from 'fs';
|
||||
import ipc from 'node-ipc';
|
||||
|
||||
const socketPath = '/tmp/ipc.sock';
|
||||
|
||||
//loop forever so you can see the pid of the cluster sever change in the logs
|
||||
setInterval(
|
||||
function() {
|
||||
ipc.connectTo(
|
||||
'world',
|
||||
socketPath,
|
||||
connecting
|
||||
);
|
||||
},
|
||||
2000
|
||||
);
|
||||
|
||||
function connecting(socket) {
|
||||
ipc.of.world.on(
|
||||
'connect',
|
||||
function() {
|
||||
ipc.of.world.emit(
|
||||
'currentDate',
|
||||
{
|
||||
message: new Date().toISOString()
|
||||
}
|
||||
);
|
||||
ipc.disconnect('world');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
#### Licensed under MIT license
|
||||
See the [MIT license](https://github.com/RIAEvangelist/node-ipc/blob/master/license) file.
|
||||
#### Licensed under DBAD license
|
||||
See the [DBAD license](https://github.com/philsturgeon/dbad) in your language or our [licence.md](https://github.com/RIAEvangelist/node-phidget-API/blob/master/license.md) file.
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
/* eslint-disable */
|
||||
var jumpToCode = (function init() {
|
||||
// Classes of code we would like to highlight in the file view
|
||||
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
|
||||
|
||||
// Elements to highlight in the file listing view
|
||||
var fileListingElements = ['td.pct.low'];
|
||||
|
||||
// We don't want to select elements that are direct descendants of another match
|
||||
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
|
||||
|
||||
// Selecter that finds elements on the page to which we can jump
|
||||
var selector =
|
||||
fileListingElements.join(', ') +
|
||||
', ' +
|
||||
notSelector +
|
||||
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
|
||||
|
||||
// The NodeList of matching elements
|
||||
var missingCoverageElements = document.querySelectorAll(selector);
|
||||
|
||||
var currentIndex;
|
||||
|
||||
function toggleClass(index) {
|
||||
missingCoverageElements
|
||||
.item(currentIndex)
|
||||
.classList.remove('highlighted');
|
||||
missingCoverageElements.item(index).classList.add('highlighted');
|
||||
}
|
||||
|
||||
function makeCurrent(index) {
|
||||
toggleClass(index);
|
||||
currentIndex = index;
|
||||
missingCoverageElements.item(index).scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'center',
|
||||
inline: 'center'
|
||||
});
|
||||
}
|
||||
|
||||
function goToPrevious() {
|
||||
var nextIndex = 0;
|
||||
if (typeof currentIndex !== 'number' || currentIndex === 0) {
|
||||
nextIndex = missingCoverageElements.length - 1;
|
||||
} else if (missingCoverageElements.length > 1) {
|
||||
nextIndex = currentIndex - 1;
|
||||
}
|
||||
|
||||
makeCurrent(nextIndex);
|
||||
}
|
||||
|
||||
function goToNext() {
|
||||
var nextIndex = 0;
|
||||
|
||||
if (
|
||||
typeof currentIndex === 'number' &&
|
||||
currentIndex < missingCoverageElements.length - 1
|
||||
) {
|
||||
nextIndex = currentIndex + 1;
|
||||
}
|
||||
|
||||
makeCurrent(nextIndex);
|
||||
}
|
||||
|
||||
return function jump(event) {
|
||||
switch (event.which) {
|
||||
case 78: // n
|
||||
case 74: // j
|
||||
goToNext();
|
||||
break;
|
||||
case 66: // b
|
||||
case 75: // k
|
||||
case 80: // p
|
||||
goToPrevious();
|
||||
break;
|
||||
}
|
||||
};
|
||||
})();
|
||||
window.addEventListener('keydown', jumpToCode);
|
Binary file not shown.
Before Width: | Height: | Size: 540 B |
|
@ -1,171 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for All files</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="prettify.css" />
|
||||
<link rel="stylesheet" href="base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1>All files</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">79.52% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>893/1123</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">68.1% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>111/163</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">84.91% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>45/53</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">79.52% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>893/1123</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line medium'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file high" data-value="node-ipc"><a href="node-ipc/index.html">node-ipc</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="100" class="pct high">100%</td>
|
||||
<td data-value="17" class="abs high">17/17</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="3" class="abs high">3/3</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="2" class="abs high">2/2</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="17" class="abs high">17/17</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file medium" data-value="node-ipc/dao"><a href="node-ipc/dao/index.html">node-ipc/dao</a></td>
|
||||
<td data-value="79.15" class="pic medium">
|
||||
<div class="chart"><div class="cover-fill" style="width: 79%"></div><div class="cover-empty" style="width: 21%"></div></div>
|
||||
</td>
|
||||
<td data-value="79.15" class="pct medium">79.15%</td>
|
||||
<td data-value="657" class="abs medium">520/657</td>
|
||||
<td data-value="67.03" class="pct medium">67.03%</td>
|
||||
<td data-value="91" class="abs medium">61/91</td>
|
||||
<td data-value="95.65" class="pct high">95.65%</td>
|
||||
<td data-value="23" class="abs high">22/23</td>
|
||||
<td data-value="79.15" class="pct medium">79.15%</td>
|
||||
<td data-value="657" class="abs medium">520/657</td>
|
||||
</tr>
|
||||
|
||||
<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="93" class="pic high">
|
||||
<div class="chart"><div class="cover-fill" style="width: 93%"></div><div class="cover-empty" style="width: 7%"></div></div>
|
||||
</td>
|
||||
<td data-value="93" class="pct high">93%</td>
|
||||
<td data-value="100" class="abs high">93/100</td>
|
||||
<td data-value="75" class="pct medium">75%</td>
|
||||
<td data-value="16" class="abs medium">12/16</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="6" class="abs high">6/6</td>
|
||||
<td data-value="93" class="pct high">93%</td>
|
||||
<td data-value="100" class="abs high">93/100</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file high" data-value="node-ipc/helpers"><a href="node-ipc/helpers/index.html">node-ipc/helpers</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="100" class="pct high">100%</td>
|
||||
<td data-value="12" class="abs high">12/12</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="3" class="abs high">3/3</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="12" class="abs high">12/12</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file medium" data-value="node-ipc/services"><a href="node-ipc/services/index.html">node-ipc/services</a></td>
|
||||
<td data-value="74.48" class="pic medium">
|
||||
<div class="chart"><div class="cover-fill" style="width: 74%"></div><div class="cover-empty" style="width: 26%"></div></div>
|
||||
</td>
|
||||
<td data-value="74.48" class="pct medium">74.48%</td>
|
||||
<td data-value="337" class="abs medium">251/337</td>
|
||||
<td data-value="64" class="pct medium">64%</td>
|
||||
<td data-value="50" class="abs medium">32/50</td>
|
||||
<td data-value="66.67" class="pct medium">66.67%</td>
|
||||
<td data-value="21" class="abs medium">14/21</td>
|
||||
<td data-value="74.48" class="pct medium">74.48%</td>
|
||||
<td data-value="337" class="abs medium">251/337</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:27 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="sorter.js"></script>
|
||||
<script src="block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,224 +0,0 @@
|
|||
body, html {
|
||||
margin:0; padding: 0;
|
||||
height: 100%;
|
||||
}
|
||||
body {
|
||||
font-family: Helvetica Neue, Helvetica, Arial;
|
||||
font-size: 14px;
|
||||
color:#333;
|
||||
}
|
||||
.small { font-size: 12px; }
|
||||
*, *:after, *:before {
|
||||
-webkit-box-sizing:border-box;
|
||||
-moz-box-sizing:border-box;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
h1 { font-size: 20px; margin: 0;}
|
||||
h2 { font-size: 14px; }
|
||||
pre {
|
||||
font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-moz-tab-size: 2;
|
||||
-o-tab-size: 2;
|
||||
tab-size: 2;
|
||||
}
|
||||
a { color:#0074D9; text-decoration:none; }
|
||||
a:hover { text-decoration:underline; }
|
||||
.strong { font-weight: bold; }
|
||||
.space-top1 { padding: 10px 0 0 0; }
|
||||
.pad2y { padding: 20px 0; }
|
||||
.pad1y { padding: 10px 0; }
|
||||
.pad2x { padding: 0 20px; }
|
||||
.pad2 { padding: 20px; }
|
||||
.pad1 { padding: 10px; }
|
||||
.space-left2 { padding-left:55px; }
|
||||
.space-right2 { padding-right:20px; }
|
||||
.center { text-align:center; }
|
||||
.clearfix { display:block; }
|
||||
.clearfix:after {
|
||||
content:'';
|
||||
display:block;
|
||||
height:0;
|
||||
clear:both;
|
||||
visibility:hidden;
|
||||
}
|
||||
.fl { float: left; }
|
||||
@media only screen and (max-width:640px) {
|
||||
.col3 { width:100%; max-width:100%; }
|
||||
.hide-mobile { display:none!important; }
|
||||
}
|
||||
|
||||
.quiet {
|
||||
color: #7f7f7f;
|
||||
color: rgba(0,0,0,0.5);
|
||||
}
|
||||
.quiet a { opacity: 0.7; }
|
||||
|
||||
.fraction {
|
||||
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
||||
font-size: 10px;
|
||||
color: #555;
|
||||
background: #E8E8E8;
|
||||
padding: 4px 5px;
|
||||
border-radius: 3px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.path a:link, div.path a:visited { color: #333; }
|
||||
table.coverage {
|
||||
border-collapse: collapse;
|
||||
margin: 10px 0 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table.coverage td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
table.coverage td.line-count {
|
||||
text-align: right;
|
||||
padding: 0 5px 0 20px;
|
||||
}
|
||||
table.coverage td.line-coverage {
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
min-width:20px;
|
||||
}
|
||||
|
||||
table.coverage td span.cline-any {
|
||||
display: inline-block;
|
||||
padding: 0 5px;
|
||||
width: 100%;
|
||||
}
|
||||
.missing-if-branch {
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
border-radius: 3px;
|
||||
position: relative;
|
||||
padding: 0 4px;
|
||||
background: #333;
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.skip-if-branch {
|
||||
display: none;
|
||||
margin-right: 10px;
|
||||
position: relative;
|
||||
padding: 0 4px;
|
||||
background: #ccc;
|
||||
color: white;
|
||||
}
|
||||
.missing-if-branch .typ, .skip-if-branch .typ {
|
||||
color: inherit !important;
|
||||
}
|
||||
.coverage-summary {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
.coverage-summary tr { border-bottom: 1px solid #bbb; }
|
||||
.keyline-all { border: 1px solid #ddd; }
|
||||
.coverage-summary td, .coverage-summary th { padding: 10px; }
|
||||
.coverage-summary tbody { border: 1px solid #bbb; }
|
||||
.coverage-summary td { border-right: 1px solid #bbb; }
|
||||
.coverage-summary td:last-child { border-right: none; }
|
||||
.coverage-summary th {
|
||||
text-align: left;
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.coverage-summary th.file { border-right: none !important; }
|
||||
.coverage-summary th.pct { }
|
||||
.coverage-summary th.pic,
|
||||
.coverage-summary th.abs,
|
||||
.coverage-summary td.pct,
|
||||
.coverage-summary td.abs { text-align: right; }
|
||||
.coverage-summary td.file { white-space: nowrap; }
|
||||
.coverage-summary td.pic { min-width: 120px !important; }
|
||||
.coverage-summary tfoot td { }
|
||||
|
||||
.coverage-summary .sorter {
|
||||
height: 10px;
|
||||
width: 7px;
|
||||
display: inline-block;
|
||||
margin-left: 0.5em;
|
||||
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
|
||||
}
|
||||
.coverage-summary .sorted .sorter {
|
||||
background-position: 0 -20px;
|
||||
}
|
||||
.coverage-summary .sorted-desc .sorter {
|
||||
background-position: 0 -10px;
|
||||
}
|
||||
.status-line { height: 10px; }
|
||||
/* yellow */
|
||||
.cbranch-no { background: yellow !important; color: #111; }
|
||||
/* dark red */
|
||||
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
|
||||
.low .chart { border:1px solid #C21F39 }
|
||||
.highlighted,
|
||||
.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
|
||||
background: #C21F39 !important;
|
||||
}
|
||||
/* medium red */
|
||||
.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
|
||||
/* light red */
|
||||
.low, .cline-no { background:#FCE1E5 }
|
||||
/* light green */
|
||||
.high, .cline-yes { background:rgb(230,245,208) }
|
||||
/* medium green */
|
||||
.cstat-yes { background:rgb(161,215,106) }
|
||||
/* 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) */
|
||||
.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
|
||||
.medium .chart { border:1px solid #f9cd0b; }
|
||||
/* light yellow */
|
||||
.medium { background: #fff4c2; }
|
||||
|
||||
.cstat-skip { background: #ddd; color: #111; }
|
||||
.fstat-skip { background: #ddd; color: #111 !important; }
|
||||
.cbranch-skip { background: #ddd !important; color: #111; }
|
||||
|
||||
span.cline-neutral { background: #eaeaea; }
|
||||
|
||||
.coverage-summary td.empty {
|
||||
opacity: .5;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
line-height: 1;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.cover-fill, .cover-empty {
|
||||
display:inline-block;
|
||||
height: 12px;
|
||||
}
|
||||
.chart {
|
||||
line-height: 0;
|
||||
}
|
||||
.cover-empty {
|
||||
background: white;
|
||||
}
|
||||
.cover-full {
|
||||
border-right: none !important;
|
||||
}
|
||||
pre.prettyprint {
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
.com { color: #999 !important; }
|
||||
.ignore-none { color: #999; font-weight: normal; }
|
||||
|
||||
.wrapper {
|
||||
min-height: 100%;
|
||||
height: auto !important;
|
||||
height: 100%;
|
||||
margin: 0 auto -48px;
|
||||
}
|
||||
.footer, .push {
|
||||
height: 48px;
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
/* eslint-disable */
|
||||
var jumpToCode = (function init() {
|
||||
// Classes of code we would like to highlight in the file view
|
||||
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
|
||||
|
||||
// Elements to highlight in the file listing view
|
||||
var fileListingElements = ['td.pct.low'];
|
||||
|
||||
// We don't want to select elements that are direct descendants of another match
|
||||
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
|
||||
|
||||
// Selecter that finds elements on the page to which we can jump
|
||||
var selector =
|
||||
fileListingElements.join(', ') +
|
||||
', ' +
|
||||
notSelector +
|
||||
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
|
||||
|
||||
// The NodeList of matching elements
|
||||
var missingCoverageElements = document.querySelectorAll(selector);
|
||||
|
||||
var currentIndex;
|
||||
|
||||
function toggleClass(index) {
|
||||
missingCoverageElements
|
||||
.item(currentIndex)
|
||||
.classList.remove('highlighted');
|
||||
missingCoverageElements.item(index).classList.add('highlighted');
|
||||
}
|
||||
|
||||
function makeCurrent(index) {
|
||||
toggleClass(index);
|
||||
currentIndex = index;
|
||||
missingCoverageElements.item(index).scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'center',
|
||||
inline: 'center'
|
||||
});
|
||||
}
|
||||
|
||||
function goToPrevious() {
|
||||
var nextIndex = 0;
|
||||
if (typeof currentIndex !== 'number' || currentIndex === 0) {
|
||||
nextIndex = missingCoverageElements.length - 1;
|
||||
} else if (missingCoverageElements.length > 1) {
|
||||
nextIndex = currentIndex - 1;
|
||||
}
|
||||
|
||||
makeCurrent(nextIndex);
|
||||
}
|
||||
|
||||
function goToNext() {
|
||||
var nextIndex = 0;
|
||||
|
||||
if (
|
||||
typeof currentIndex === 'number' &&
|
||||
currentIndex < missingCoverageElements.length - 1
|
||||
) {
|
||||
nextIndex = currentIndex + 1;
|
||||
}
|
||||
|
||||
makeCurrent(nextIndex);
|
||||
}
|
||||
|
||||
return function jump(event) {
|
||||
switch (event.which) {
|
||||
case 78: // n
|
||||
case 74: // j
|
||||
goToNext();
|
||||
break;
|
||||
case 66: // b
|
||||
case 75: // k
|
||||
case 80: // p
|
||||
goToPrevious();
|
||||
break;
|
||||
}
|
||||
};
|
||||
})();
|
||||
window.addEventListener('keydown', jumpToCode);
|
Binary file not shown.
Before Width: | Height: | Size: 540 B |
|
@ -1,171 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for All files</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="prettify.css" />
|
||||
<link rel="stylesheet" href="base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1>All files</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">79.52% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>893/1123</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">68.1% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>111/163</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">84.91% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>45/53</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">79.52% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>893/1123</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line medium'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file high" data-value="node-ipc"><a href="node-ipc/index.html">node-ipc</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="100" class="pct high">100%</td>
|
||||
<td data-value="17" class="abs high">17/17</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="3" class="abs high">3/3</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="2" class="abs high">2/2</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="17" class="abs high">17/17</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file medium" data-value="node-ipc/dao"><a href="node-ipc/dao/index.html">node-ipc/dao</a></td>
|
||||
<td data-value="79.15" class="pic medium">
|
||||
<div class="chart"><div class="cover-fill" style="width: 79%"></div><div class="cover-empty" style="width: 21%"></div></div>
|
||||
</td>
|
||||
<td data-value="79.15" class="pct medium">79.15%</td>
|
||||
<td data-value="657" class="abs medium">520/657</td>
|
||||
<td data-value="67.03" class="pct medium">67.03%</td>
|
||||
<td data-value="91" class="abs medium">61/91</td>
|
||||
<td data-value="95.65" class="pct high">95.65%</td>
|
||||
<td data-value="23" class="abs high">22/23</td>
|
||||
<td data-value="79.15" class="pct medium">79.15%</td>
|
||||
<td data-value="657" class="abs medium">520/657</td>
|
||||
</tr>
|
||||
|
||||
<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="93" class="pic high">
|
||||
<div class="chart"><div class="cover-fill" style="width: 93%"></div><div class="cover-empty" style="width: 7%"></div></div>
|
||||
</td>
|
||||
<td data-value="93" class="pct high">93%</td>
|
||||
<td data-value="100" class="abs high">93/100</td>
|
||||
<td data-value="75" class="pct medium">75%</td>
|
||||
<td data-value="16" class="abs medium">12/16</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="6" class="abs high">6/6</td>
|
||||
<td data-value="93" class="pct high">93%</td>
|
||||
<td data-value="100" class="abs high">93/100</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file high" data-value="node-ipc/helpers"><a href="node-ipc/helpers/index.html">node-ipc/helpers</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="100" class="pct high">100%</td>
|
||||
<td data-value="12" class="abs high">12/12</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="3" class="abs high">3/3</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="12" class="abs high">12/12</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file medium" data-value="node-ipc/services"><a href="node-ipc/services/index.html">node-ipc/services</a></td>
|
||||
<td data-value="74.48" class="pic medium">
|
||||
<div class="chart"><div class="cover-fill" style="width: 74%"></div><div class="cover-empty" style="width: 26%"></div></div>
|
||||
</td>
|
||||
<td data-value="74.48" class="pct medium">74.48%</td>
|
||||
<td data-value="337" class="abs medium">251/337</td>
|
||||
<td data-value="64" class="pct medium">64%</td>
|
||||
<td data-value="50" class="abs medium">32/50</td>
|
||||
<td data-value="66.67" class="pct medium">66.67%</td>
|
||||
<td data-value="21" class="abs medium">14/21</td>
|
||||
<td data-value="74.48" class="pct medium">74.48%</td>
|
||||
<td data-value="337" class="abs medium">251/337</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:26 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="sorter.js"></script>
|
||||
<script src="block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,854 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/dao/client.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> / <a href="index.html">node-ipc/dao</a> client.js</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">78.68% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>203/258</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">63.64% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>21/33</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>8/8</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">78.68% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>203/258</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line medium'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a>
|
||||
<a name='L13'></a><a href='#L13'>13</a>
|
||||
<a name='L14'></a><a href='#L14'>14</a>
|
||||
<a name='L15'></a><a href='#L15'>15</a>
|
||||
<a name='L16'></a><a href='#L16'>16</a>
|
||||
<a name='L17'></a><a href='#L17'>17</a>
|
||||
<a name='L18'></a><a href='#L18'>18</a>
|
||||
<a name='L19'></a><a href='#L19'>19</a>
|
||||
<a name='L20'></a><a href='#L20'>20</a>
|
||||
<a name='L21'></a><a href='#L21'>21</a>
|
||||
<a name='L22'></a><a href='#L22'>22</a>
|
||||
<a name='L23'></a><a href='#L23'>23</a>
|
||||
<a name='L24'></a><a href='#L24'>24</a>
|
||||
<a name='L25'></a><a href='#L25'>25</a>
|
||||
<a name='L26'></a><a href='#L26'>26</a>
|
||||
<a name='L27'></a><a href='#L27'>27</a>
|
||||
<a name='L28'></a><a href='#L28'>28</a>
|
||||
<a name='L29'></a><a href='#L29'>29</a>
|
||||
<a name='L30'></a><a href='#L30'>30</a>
|
||||
<a name='L31'></a><a href='#L31'>31</a>
|
||||
<a name='L32'></a><a href='#L32'>32</a>
|
||||
<a name='L33'></a><a href='#L33'>33</a>
|
||||
<a name='L34'></a><a href='#L34'>34</a>
|
||||
<a name='L35'></a><a href='#L35'>35</a>
|
||||
<a name='L36'></a><a href='#L36'>36</a>
|
||||
<a name='L37'></a><a href='#L37'>37</a>
|
||||
<a name='L38'></a><a href='#L38'>38</a>
|
||||
<a name='L39'></a><a href='#L39'>39</a>
|
||||
<a name='L40'></a><a href='#L40'>40</a>
|
||||
<a name='L41'></a><a href='#L41'>41</a>
|
||||
<a name='L42'></a><a href='#L42'>42</a>
|
||||
<a name='L43'></a><a href='#L43'>43</a>
|
||||
<a name='L44'></a><a href='#L44'>44</a>
|
||||
<a name='L45'></a><a href='#L45'>45</a>
|
||||
<a name='L46'></a><a href='#L46'>46</a>
|
||||
<a name='L47'></a><a href='#L47'>47</a>
|
||||
<a name='L48'></a><a href='#L48'>48</a>
|
||||
<a name='L49'></a><a href='#L49'>49</a>
|
||||
<a name='L50'></a><a href='#L50'>50</a>
|
||||
<a name='L51'></a><a href='#L51'>51</a>
|
||||
<a name='L52'></a><a href='#L52'>52</a>
|
||||
<a name='L53'></a><a href='#L53'>53</a>
|
||||
<a name='L54'></a><a href='#L54'>54</a>
|
||||
<a name='L55'></a><a href='#L55'>55</a>
|
||||
<a name='L56'></a><a href='#L56'>56</a>
|
||||
<a name='L57'></a><a href='#L57'>57</a>
|
||||
<a name='L58'></a><a href='#L58'>58</a>
|
||||
<a name='L59'></a><a href='#L59'>59</a>
|
||||
<a name='L60'></a><a href='#L60'>60</a>
|
||||
<a name='L61'></a><a href='#L61'>61</a>
|
||||
<a name='L62'></a><a href='#L62'>62</a>
|
||||
<a name='L63'></a><a href='#L63'>63</a>
|
||||
<a name='L64'></a><a href='#L64'>64</a>
|
||||
<a name='L65'></a><a href='#L65'>65</a>
|
||||
<a name='L66'></a><a href='#L66'>66</a>
|
||||
<a name='L67'></a><a href='#L67'>67</a>
|
||||
<a name='L68'></a><a href='#L68'>68</a>
|
||||
<a name='L69'></a><a href='#L69'>69</a>
|
||||
<a name='L70'></a><a href='#L70'>70</a>
|
||||
<a name='L71'></a><a href='#L71'>71</a>
|
||||
<a name='L72'></a><a href='#L72'>72</a>
|
||||
<a name='L73'></a><a href='#L73'>73</a>
|
||||
<a name='L74'></a><a href='#L74'>74</a>
|
||||
<a name='L75'></a><a href='#L75'>75</a>
|
||||
<a name='L76'></a><a href='#L76'>76</a>
|
||||
<a name='L77'></a><a href='#L77'>77</a>
|
||||
<a name='L78'></a><a href='#L78'>78</a>
|
||||
<a name='L79'></a><a href='#L79'>79</a>
|
||||
<a name='L80'></a><a href='#L80'>80</a>
|
||||
<a name='L81'></a><a href='#L81'>81</a>
|
||||
<a name='L82'></a><a href='#L82'>82</a>
|
||||
<a name='L83'></a><a href='#L83'>83</a>
|
||||
<a name='L84'></a><a href='#L84'>84</a>
|
||||
<a name='L85'></a><a href='#L85'>85</a>
|
||||
<a name='L86'></a><a href='#L86'>86</a>
|
||||
<a name='L87'></a><a href='#L87'>87</a>
|
||||
<a name='L88'></a><a href='#L88'>88</a>
|
||||
<a name='L89'></a><a href='#L89'>89</a>
|
||||
<a name='L90'></a><a href='#L90'>90</a>
|
||||
<a name='L91'></a><a href='#L91'>91</a>
|
||||
<a name='L92'></a><a href='#L92'>92</a>
|
||||
<a name='L93'></a><a href='#L93'>93</a>
|
||||
<a name='L94'></a><a href='#L94'>94</a>
|
||||
<a name='L95'></a><a href='#L95'>95</a>
|
||||
<a name='L96'></a><a href='#L96'>96</a>
|
||||
<a name='L97'></a><a href='#L97'>97</a>
|
||||
<a name='L98'></a><a href='#L98'>98</a>
|
||||
<a name='L99'></a><a href='#L99'>99</a>
|
||||
<a name='L100'></a><a href='#L100'>100</a>
|
||||
<a name='L101'></a><a href='#L101'>101</a>
|
||||
<a name='L102'></a><a href='#L102'>102</a>
|
||||
<a name='L103'></a><a href='#L103'>103</a>
|
||||
<a name='L104'></a><a href='#L104'>104</a>
|
||||
<a name='L105'></a><a href='#L105'>105</a>
|
||||
<a name='L106'></a><a href='#L106'>106</a>
|
||||
<a name='L107'></a><a href='#L107'>107</a>
|
||||
<a name='L108'></a><a href='#L108'>108</a>
|
||||
<a name='L109'></a><a href='#L109'>109</a>
|
||||
<a name='L110'></a><a href='#L110'>110</a>
|
||||
<a name='L111'></a><a href='#L111'>111</a>
|
||||
<a name='L112'></a><a href='#L112'>112</a>
|
||||
<a name='L113'></a><a href='#L113'>113</a>
|
||||
<a name='L114'></a><a href='#L114'>114</a>
|
||||
<a name='L115'></a><a href='#L115'>115</a>
|
||||
<a name='L116'></a><a href='#L116'>116</a>
|
||||
<a name='L117'></a><a href='#L117'>117</a>
|
||||
<a name='L118'></a><a href='#L118'>118</a>
|
||||
<a name='L119'></a><a href='#L119'>119</a>
|
||||
<a name='L120'></a><a href='#L120'>120</a>
|
||||
<a name='L121'></a><a href='#L121'>121</a>
|
||||
<a name='L122'></a><a href='#L122'>122</a>
|
||||
<a name='L123'></a><a href='#L123'>123</a>
|
||||
<a name='L124'></a><a href='#L124'>124</a>
|
||||
<a name='L125'></a><a href='#L125'>125</a>
|
||||
<a name='L126'></a><a href='#L126'>126</a>
|
||||
<a name='L127'></a><a href='#L127'>127</a>
|
||||
<a name='L128'></a><a href='#L128'>128</a>
|
||||
<a name='L129'></a><a href='#L129'>129</a>
|
||||
<a name='L130'></a><a href='#L130'>130</a>
|
||||
<a name='L131'></a><a href='#L131'>131</a>
|
||||
<a name='L132'></a><a href='#L132'>132</a>
|
||||
<a name='L133'></a><a href='#L133'>133</a>
|
||||
<a name='L134'></a><a href='#L134'>134</a>
|
||||
<a name='L135'></a><a href='#L135'>135</a>
|
||||
<a name='L136'></a><a href='#L136'>136</a>
|
||||
<a name='L137'></a><a href='#L137'>137</a>
|
||||
<a name='L138'></a><a href='#L138'>138</a>
|
||||
<a name='L139'></a><a href='#L139'>139</a>
|
||||
<a name='L140'></a><a href='#L140'>140</a>
|
||||
<a name='L141'></a><a href='#L141'>141</a>
|
||||
<a name='L142'></a><a href='#L142'>142</a>
|
||||
<a name='L143'></a><a href='#L143'>143</a>
|
||||
<a name='L144'></a><a href='#L144'>144</a>
|
||||
<a name='L145'></a><a href='#L145'>145</a>
|
||||
<a name='L146'></a><a href='#L146'>146</a>
|
||||
<a name='L147'></a><a href='#L147'>147</a>
|
||||
<a name='L148'></a><a href='#L148'>148</a>
|
||||
<a name='L149'></a><a href='#L149'>149</a>
|
||||
<a name='L150'></a><a href='#L150'>150</a>
|
||||
<a name='L151'></a><a href='#L151'>151</a>
|
||||
<a name='L152'></a><a href='#L152'>152</a>
|
||||
<a name='L153'></a><a href='#L153'>153</a>
|
||||
<a name='L154'></a><a href='#L154'>154</a>
|
||||
<a name='L155'></a><a href='#L155'>155</a>
|
||||
<a name='L156'></a><a href='#L156'>156</a>
|
||||
<a name='L157'></a><a href='#L157'>157</a>
|
||||
<a name='L158'></a><a href='#L158'>158</a>
|
||||
<a name='L159'></a><a href='#L159'>159</a>
|
||||
<a name='L160'></a><a href='#L160'>160</a>
|
||||
<a name='L161'></a><a href='#L161'>161</a>
|
||||
<a name='L162'></a><a href='#L162'>162</a>
|
||||
<a name='L163'></a><a href='#L163'>163</a>
|
||||
<a name='L164'></a><a href='#L164'>164</a>
|
||||
<a name='L165'></a><a href='#L165'>165</a>
|
||||
<a name='L166'></a><a href='#L166'>166</a>
|
||||
<a name='L167'></a><a href='#L167'>167</a>
|
||||
<a name='L168'></a><a href='#L168'>168</a>
|
||||
<a name='L169'></a><a href='#L169'>169</a>
|
||||
<a name='L170'></a><a href='#L170'>170</a>
|
||||
<a name='L171'></a><a href='#L171'>171</a>
|
||||
<a name='L172'></a><a href='#L172'>172</a>
|
||||
<a name='L173'></a><a href='#L173'>173</a>
|
||||
<a name='L174'></a><a href='#L174'>174</a>
|
||||
<a name='L175'></a><a href='#L175'>175</a>
|
||||
<a name='L176'></a><a href='#L176'>176</a>
|
||||
<a name='L177'></a><a href='#L177'>177</a>
|
||||
<a name='L178'></a><a href='#L178'>178</a>
|
||||
<a name='L179'></a><a href='#L179'>179</a>
|
||||
<a name='L180'></a><a href='#L180'>180</a>
|
||||
<a name='L181'></a><a href='#L181'>181</a>
|
||||
<a name='L182'></a><a href='#L182'>182</a>
|
||||
<a name='L183'></a><a href='#L183'>183</a>
|
||||
<a name='L184'></a><a href='#L184'>184</a>
|
||||
<a name='L185'></a><a href='#L185'>185</a>
|
||||
<a name='L186'></a><a href='#L186'>186</a>
|
||||
<a name='L187'></a><a href='#L187'>187</a>
|
||||
<a name='L188'></a><a href='#L188'>188</a>
|
||||
<a name='L189'></a><a href='#L189'>189</a>
|
||||
<a name='L190'></a><a href='#L190'>190</a>
|
||||
<a name='L191'></a><a href='#L191'>191</a>
|
||||
<a name='L192'></a><a href='#L192'>192</a>
|
||||
<a name='L193'></a><a href='#L193'>193</a>
|
||||
<a name='L194'></a><a href='#L194'>194</a>
|
||||
<a name='L195'></a><a href='#L195'>195</a>
|
||||
<a name='L196'></a><a href='#L196'>196</a>
|
||||
<a name='L197'></a><a href='#L197'>197</a>
|
||||
<a name='L198'></a><a href='#L198'>198</a>
|
||||
<a name='L199'></a><a href='#L199'>199</a>
|
||||
<a name='L200'></a><a href='#L200'>200</a>
|
||||
<a name='L201'></a><a href='#L201'>201</a>
|
||||
<a name='L202'></a><a href='#L202'>202</a>
|
||||
<a name='L203'></a><a href='#L203'>203</a>
|
||||
<a name='L204'></a><a href='#L204'>204</a>
|
||||
<a name='L205'></a><a href='#L205'>205</a>
|
||||
<a name='L206'></a><a href='#L206'>206</a>
|
||||
<a name='L207'></a><a href='#L207'>207</a>
|
||||
<a name='L208'></a><a href='#L208'>208</a>
|
||||
<a name='L209'></a><a href='#L209'>209</a>
|
||||
<a name='L210'></a><a href='#L210'>210</a>
|
||||
<a name='L211'></a><a href='#L211'>211</a>
|
||||
<a name='L212'></a><a href='#L212'>212</a>
|
||||
<a name='L213'></a><a href='#L213'>213</a>
|
||||
<a name='L214'></a><a href='#L214'>214</a>
|
||||
<a name='L215'></a><a href='#L215'>215</a>
|
||||
<a name='L216'></a><a href='#L216'>216</a>
|
||||
<a name='L217'></a><a href='#L217'>217</a>
|
||||
<a name='L218'></a><a href='#L218'>218</a>
|
||||
<a name='L219'></a><a href='#L219'>219</a>
|
||||
<a name='L220'></a><a href='#L220'>220</a>
|
||||
<a name='L221'></a><a href='#L221'>221</a>
|
||||
<a name='L222'></a><a href='#L222'>222</a>
|
||||
<a name='L223'></a><a href='#L223'>223</a>
|
||||
<a name='L224'></a><a href='#L224'>224</a>
|
||||
<a name='L225'></a><a href='#L225'>225</a>
|
||||
<a name='L226'></a><a href='#L226'>226</a>
|
||||
<a name='L227'></a><a href='#L227'>227</a>
|
||||
<a name='L228'></a><a href='#L228'>228</a>
|
||||
<a name='L229'></a><a href='#L229'>229</a>
|
||||
<a name='L230'></a><a href='#L230'>230</a>
|
||||
<a name='L231'></a><a href='#L231'>231</a>
|
||||
<a name='L232'></a><a href='#L232'>232</a>
|
||||
<a name='L233'></a><a href='#L233'>233</a>
|
||||
<a name='L234'></a><a href='#L234'>234</a>
|
||||
<a name='L235'></a><a href='#L235'>235</a>
|
||||
<a name='L236'></a><a href='#L236'>236</a>
|
||||
<a name='L237'></a><a href='#L237'>237</a>
|
||||
<a name='L238'></a><a href='#L238'>238</a>
|
||||
<a name='L239'></a><a href='#L239'>239</a>
|
||||
<a name='L240'></a><a href='#L240'>240</a>
|
||||
<a name='L241'></a><a href='#L241'>241</a>
|
||||
<a name='L242'></a><a href='#L242'>242</a>
|
||||
<a name='L243'></a><a href='#L243'>243</a>
|
||||
<a name='L244'></a><a href='#L244'>244</a>
|
||||
<a name='L245'></a><a href='#L245'>245</a>
|
||||
<a name='L246'></a><a href='#L246'>246</a>
|
||||
<a name='L247'></a><a href='#L247'>247</a>
|
||||
<a name='L248'></a><a href='#L248'>248</a>
|
||||
<a name='L249'></a><a href='#L249'>249</a>
|
||||
<a name='L250'></a><a href='#L250'>250</a>
|
||||
<a name='L251'></a><a href='#L251'>251</a>
|
||||
<a name='L252'></a><a href='#L252'>252</a>
|
||||
<a name='L253'></a><a href='#L253'>253</a>
|
||||
<a name='L254'></a><a href='#L254'>254</a>
|
||||
<a name='L255'></a><a href='#L255'>255</a>
|
||||
<a name='L256'></a><a href='#L256'>256</a>
|
||||
<a name='L257'></a><a href='#L257'>257</a>
|
||||
<a name='L258'></a><a href='#L258'>258</a>
|
||||
<a name='L259'></a><a href='#L259'>259</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">16x</span>
|
||||
<span class="cline-any cline-yes">16x</span>
|
||||
<span class="cline-any cline-yes">16x</span>
|
||||
<span class="cline-any cline-yes">16x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">4x</span>
|
||||
<span class="cline-any cline-yes">4x</span>
|
||||
<span class="cline-any cline-yes">4x</span>
|
||||
<span class="cline-any cline-yes">4x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import net from 'net';
|
||||
import tls from 'tls';
|
||||
import EventParser from '../entities/EventParser.js';
|
||||
import Message from 'js-message';
|
||||
import fs from 'fs';
|
||||
import Queue from 'js-queue';
|
||||
import Events from 'event-pubsub';
|
||||
|
||||
let eventParser = new EventParser();
|
||||
|
||||
class Client extends Events{
|
||||
constructor(config,log){
|
||||
super();
|
||||
this.config=config;
|
||||
this.log=log;
|
||||
this.publish=super.emit;
|
||||
|
||||
(config.maxRetries)? this.retriesRemaining=config.maxRetries<span class="branch-0 cbranch-no" title="branch not covered" >:0;</span>
|
||||
|
||||
eventParser=new EventParser(this.config);
|
||||
}
|
||||
|
||||
Client=Client;
|
||||
queue =new Queue;
|
||||
socket=false;
|
||||
connect=connect;
|
||||
emit=emit;
|
||||
retriesRemaining=0;
|
||||
explicitlyDisconnected=false;
|
||||
}
|
||||
|
||||
function emit(type,data){
|
||||
this.log('dispatching event to ', this.id, this.path, ' : ', type, ',', data);
|
||||
|
||||
let message=new Message;
|
||||
message.type=type;
|
||||
message.data=data;
|
||||
|
||||
if(this.config.rawBuffer)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > message=Buffer.from(type,this.config.encoding);</span>
|
||||
}else{
|
||||
message=eventParser.format(message);
|
||||
}
|
||||
|
||||
//volitile emit
|
||||
if(!this.config.sync){
|
||||
this.socket.write(message);
|
||||
return;
|
||||
}
|
||||
|
||||
//sync, non-volitile, ack emit
|
||||
this.queue.add(
|
||||
syncEmit.bind(this,message)
|
||||
);
|
||||
}
|
||||
|
||||
function syncEmit(message){
|
||||
this.log('dispatching event to ', this.id, this.path, ' : ', message);
|
||||
this.socket.write(message);
|
||||
}
|
||||
|
||||
function connect(){
|
||||
//init client object for scope persistance especially inside of socket events.
|
||||
let client=this;
|
||||
|
||||
client.log('requested connection to ', client.id, client.path);
|
||||
if(!this.path)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.log('\n\n######\nerror: ', client.id ,' client has not specified socket path it wishes to connect to.');</span>
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
const options={};
|
||||
|
||||
if(!client.port){
|
||||
client.log('Connecting client on Unix Socket :', client.path);
|
||||
|
||||
options.path=client.path;
|
||||
|
||||
if (process.platform ==='win32' && !client.path.startsWith('\\\\.\\pipe\\')){
|
||||
options.path = options.path.replace(/^\//, '');
|
||||
options.path = options.path.replace(/\//g, '-');
|
||||
options.path= `\\\\.\\pipe\\${options.path}`;
|
||||
}
|
||||
|
||||
client.socket = net.connect(options);
|
||||
}else{
|
||||
options.host=client.path;
|
||||
options.port=client.port;
|
||||
|
||||
if(client.config.interface.localAddress)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > options.localAddress=client.config.interface.localAddress;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
if(client.config.interface.localPort)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > options.localPort=client.config.interface.localPort;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
if(client.config.interface.family)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > options.family=client.config.interface.family;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
if(client.config.interface.hints)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > options.hints=client.config.interface.hints;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
if(client.config.interface.lookup)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > options.lookup=client.config.interface.lookup;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
if(!client.config.tls){
|
||||
client.log('Connecting client via TCP to', options);
|
||||
client.socket = net.connect(options);
|
||||
}<span class="branch-0 cbranch-no" title="branch not covered" >else{</span>
|
||||
<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>
|
||||
<span class="cstat-no" title="statement not covered" > client.config.tls.key=fs.readFileSync(client.config.tls.private);</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(client.config.tls.public){</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.config.tls.cert=fs.readFileSync(client.config.tls.public);</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(client.config.tls.trustedConnections){</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(typeof client.config.tls.trustedConnections === 'string'){</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.config.tls.trustedConnections=[client.config.tls.trustedConnections];</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.config.tls.ca=[];</span>
|
||||
<span class="cstat-no" title="statement not covered" > for(let i=0; i<client.config.tls.trustedConnections.length; i++){</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.config.tls.ca.push(</span>
|
||||
<span class="cstat-no" title="statement not covered" > fs.readFileSync(client.config.tls.trustedConnections[i])</span>
|
||||
<span class="cstat-no" title="statement not covered" > );</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
<span class="cstat-no" title="statement not covered" ></span>
|
||||
<span class="cstat-no" title="statement not covered" > Object.assign(client.config.tls,options);</span>
|
||||
<span class="cstat-no" title="statement not covered" ></span>
|
||||
<span class="cstat-no" title="statement not covered" > client.socket = tls.connect(</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.config.tls</span>
|
||||
<span class="cstat-no" title="statement not covered" > );</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
}
|
||||
|
||||
client.socket.setEncoding(this.config.encoding);
|
||||
|
||||
client.socket.on(
|
||||
'error',
|
||||
function(err){
|
||||
client.log('\n\n######\nerror: ', err);
|
||||
client.publish('error', err);
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
client.socket.on(
|
||||
'connect',
|
||||
function connectionMade(){
|
||||
client.publish('connect');
|
||||
client.retriesRemaining=client.config.maxRetries;
|
||||
client.log('retrying reset');
|
||||
}
|
||||
);
|
||||
|
||||
client.socket.on(
|
||||
'close',
|
||||
function connectionClosed(){
|
||||
client.log('connection closed' ,client.id , client.path,
|
||||
client.retriesRemaining, 'tries remaining of', client.config.maxRetries
|
||||
);
|
||||
|
||||
if(
|
||||
client.config.stopRetrying ||
|
||||
client.retriesRemaining<1 ||
|
||||
client.explicitlyDisconnected
|
||||
|
||||
){
|
||||
client.publish('disconnect');
|
||||
client.log(
|
||||
(client.config.id),
|
||||
'exceeded connection rety amount of',
|
||||
' or stopRetrying flag set.'
|
||||
);
|
||||
|
||||
client.socket.destroy();
|
||||
client.publish('destroy');
|
||||
client=undefined;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(
|
||||
function retryTimeout(){
|
||||
if (client.explicitlyDisconnected) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
client.retriesRemaining--;
|
||||
client.connect();
|
||||
}.bind(null,client),
|
||||
client.config.retry
|
||||
);
|
||||
|
||||
client.publish('disconnect');
|
||||
}
|
||||
);
|
||||
|
||||
client.socket.on(
|
||||
'data',
|
||||
function(data) {
|
||||
client.log('## received events ##');
|
||||
if(client.config.rawBuffer)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.publish(</span>
|
||||
<span class="cstat-no" title="statement not covered" > 'data',</span>
|
||||
<span class="cstat-no" title="statement not covered" > Buffer.from(data,client.config.encoding)</span>
|
||||
<span class="cstat-no" title="statement not covered" > );</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(!client.config.sync){</span>
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
<span class="cstat-no" title="statement not covered" ></span>
|
||||
<span class="cstat-no" title="statement not covered" > client.queue.next();</span>
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
if(!this.ipcBuffer){
|
||||
this.ipcBuffer='';
|
||||
}
|
||||
|
||||
data=(this.ipcBuffer+=data);
|
||||
|
||||
if(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<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>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
this.ipcBuffer='';
|
||||
|
||||
const events = eventParser.parse(data);
|
||||
const eCount = events.length;
|
||||
for(let i=0; i<eCount; i++){
|
||||
let message=new Message;
|
||||
message.load(events[i]);
|
||||
|
||||
client.log('detected event', message.type, message.data);
|
||||
client.publish(
|
||||
message.type,
|
||||
message.data
|
||||
);
|
||||
}
|
||||
|
||||
if(!client.config.sync){
|
||||
return;
|
||||
}
|
||||
|
||||
client.queue.next();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export {
|
||||
Client as default,
|
||||
Client
|
||||
};
|
||||
</pre></td></tr></table></pre>
|
||||
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:26 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/dao</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> node-ipc/dao</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">79.15% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>520/657</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">67.03% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>61/91</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">95.65% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>22/23</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">79.15% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>520/657</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line medium'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file medium" data-value="client.js"><a href="client.js.html">client.js</a></td>
|
||||
<td data-value="78.68" class="pic medium">
|
||||
<div class="chart"><div class="cover-fill" style="width: 78%"></div><div class="cover-empty" style="width: 22%"></div></div>
|
||||
</td>
|
||||
<td data-value="78.68" class="pct medium">78.68%</td>
|
||||
<td data-value="258" class="abs medium">203/258</td>
|
||||
<td data-value="63.64" class="pct medium">63.64%</td>
|
||||
<td data-value="33" class="abs medium">21/33</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="8" class="abs high">8/8</td>
|
||||
<td data-value="78.68" class="pct medium">78.68%</td>
|
||||
<td data-value="258" class="abs medium">203/258</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file medium" data-value="socketServer.js"><a href="socketServer.js.html">socketServer.js</a></td>
|
||||
<td data-value="79.45" class="pic medium">
|
||||
<div class="chart"><div class="cover-fill" style="width: 79%"></div><div class="cover-empty" style="width: 21%"></div></div>
|
||||
</td>
|
||||
<td data-value="79.45" class="pct medium">79.45%</td>
|
||||
<td data-value="399" class="abs medium">317/399</td>
|
||||
<td data-value="68.97" class="pct medium">68.97%</td>
|
||||
<td data-value="58" class="abs medium">40/58</td>
|
||||
<td data-value="93.33" class="pct high">93.33%</td>
|
||||
<td data-value="15" class="abs high">14/15</td>
|
||||
<td data-value="79.45" class="pct medium">79.45%</td>
|
||||
<td data-value="399" class="abs medium">317/399</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:26 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,278 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/entities/Defaults.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> / <a href="index.html">node-ipc/entities</a> Defaults.js</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">92.42% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>61/66</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">57.14% </span>
|
||||
<span class="quiet">Branches</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'>3/3</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">92.42% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>61/66</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a>
|
||||
<a name='L13'></a><a href='#L13'>13</a>
|
||||
<a name='L14'></a><a href='#L14'>14</a>
|
||||
<a name='L15'></a><a href='#L15'>15</a>
|
||||
<a name='L16'></a><a href='#L16'>16</a>
|
||||
<a name='L17'></a><a href='#L17'>17</a>
|
||||
<a name='L18'></a><a href='#L18'>18</a>
|
||||
<a name='L19'></a><a href='#L19'>19</a>
|
||||
<a name='L20'></a><a href='#L20'>20</a>
|
||||
<a name='L21'></a><a href='#L21'>21</a>
|
||||
<a name='L22'></a><a href='#L22'>22</a>
|
||||
<a name='L23'></a><a href='#L23'>23</a>
|
||||
<a name='L24'></a><a href='#L24'>24</a>
|
||||
<a name='L25'></a><a href='#L25'>25</a>
|
||||
<a name='L26'></a><a href='#L26'>26</a>
|
||||
<a name='L27'></a><a href='#L27'>27</a>
|
||||
<a name='L28'></a><a href='#L28'>28</a>
|
||||
<a name='L29'></a><a href='#L29'>29</a>
|
||||
<a name='L30'></a><a href='#L30'>30</a>
|
||||
<a name='L31'></a><a href='#L31'>31</a>
|
||||
<a name='L32'></a><a href='#L32'>32</a>
|
||||
<a name='L33'></a><a href='#L33'>33</a>
|
||||
<a name='L34'></a><a href='#L34'>34</a>
|
||||
<a name='L35'></a><a href='#L35'>35</a>
|
||||
<a name='L36'></a><a href='#L36'>36</a>
|
||||
<a name='L37'></a><a href='#L37'>37</a>
|
||||
<a name='L38'></a><a href='#L38'>38</a>
|
||||
<a name='L39'></a><a href='#L39'>39</a>
|
||||
<a name='L40'></a><a href='#L40'>40</a>
|
||||
<a name='L41'></a><a href='#L41'>41</a>
|
||||
<a name='L42'></a><a href='#L42'>42</a>
|
||||
<a name='L43'></a><a href='#L43'>43</a>
|
||||
<a name='L44'></a><a href='#L44'>44</a>
|
||||
<a name='L45'></a><a href='#L45'>45</a>
|
||||
<a name='L46'></a><a href='#L46'>46</a>
|
||||
<a name='L47'></a><a href='#L47'>47</a>
|
||||
<a name='L48'></a><a href='#L48'>48</a>
|
||||
<a name='L49'></a><a href='#L49'>49</a>
|
||||
<a name='L50'></a><a href='#L50'>50</a>
|
||||
<a name='L51'></a><a href='#L51'>51</a>
|
||||
<a name='L52'></a><a href='#L52'>52</a>
|
||||
<a name='L53'></a><a href='#L53'>53</a>
|
||||
<a name='L54'></a><a href='#L54'>54</a>
|
||||
<a name='L55'></a><a href='#L55'>55</a>
|
||||
<a name='L56'></a><a href='#L56'>56</a>
|
||||
<a name='L57'></a><a href='#L57'>57</a>
|
||||
<a name='L58'></a><a href='#L58'>58</a>
|
||||
<a name='L59'></a><a href='#L59'>59</a>
|
||||
<a name='L60'></a><a href='#L60'>60</a>
|
||||
<a name='L61'></a><a href='#L61'>61</a>
|
||||
<a name='L62'></a><a href='#L62'>62</a>
|
||||
<a name='L63'></a><a href='#L63'>63</a>
|
||||
<a name='L64'></a><a href='#L64'>64</a>
|
||||
<a name='L65'></a><a href='#L65'>65</a>
|
||||
<a name='L66'></a><a href='#L66'>66</a>
|
||||
<a name='L67'></a><a href='#L67'>67</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import os from 'os';
|
||||
|
||||
class Defaults{
|
||||
|
||||
constructor(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
appspace='app.';
|
||||
socketRoot='/tmp/';
|
||||
id=os.hostname();
|
||||
|
||||
encoding='utf8';
|
||||
rawBuffer=false;
|
||||
sync=false;
|
||||
unlink=true;
|
||||
|
||||
delimiter='\f';
|
||||
|
||||
silent=false;
|
||||
logDepth=5;
|
||||
logInColor=true;
|
||||
logger=console.log.bind(console);
|
||||
|
||||
maxConnections=100;
|
||||
retry=500;
|
||||
maxRetries=Infinity;
|
||||
stopRetrying=false;
|
||||
|
||||
IPType=getIPType();
|
||||
tls=false;
|
||||
networkHost = (this.IPType == 'IPv6') <span class="branch-0 cbranch-no" title="branch not covered" >? '::1' </span>: '127.0.0.1';
|
||||
networkPort = 8000;
|
||||
|
||||
readableAll = false;
|
||||
writableAll = false;
|
||||
|
||||
interface={
|
||||
localAddress:false,
|
||||
localPort:false,
|
||||
family:false,
|
||||
hints:false,
|
||||
lookup:false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getIPType() {
|
||||
const networkInterfaces = os.networkInterfaces();
|
||||
let IPType = '';
|
||||
if (networkInterfaces
|
||||
&& Array.isArray(networkInterfaces)
|
||||
<span class="branch-0 cbranch-no" title="branch not covered" > && networkInterfaces.length > 0)</span> <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > // getting the family of first network interface available</span>
|
||||
<span class="cstat-no" title="statement not covered" > IPType = networkInterfaces [</span>
|
||||
<span class="cstat-no" title="statement not covered" > Object.keys( networkInterfaces )[0]</span>
|
||||
<span class="cstat-no" title="statement not covered" > ][0].family;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
return IPType;
|
||||
}
|
||||
|
||||
export {
|
||||
Defaults as default,
|
||||
Defaults
|
||||
}
|
||||
</pre></td></tr></table></pre>
|
||||
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:26 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,182 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/entities/EventParser.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> / <a href="index.html">node-ipc/entities</a> EventParser.js</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">94.12% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>32/34</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">88.89% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>8/9</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>3/3</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">94.12% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>32/34</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a>
|
||||
<a name='L13'></a><a href='#L13'>13</a>
|
||||
<a name='L14'></a><a href='#L14'>14</a>
|
||||
<a name='L15'></a><a href='#L15'>15</a>
|
||||
<a name='L16'></a><a href='#L16'>16</a>
|
||||
<a name='L17'></a><a href='#L17'>17</a>
|
||||
<a name='L18'></a><a href='#L18'>18</a>
|
||||
<a name='L19'></a><a href='#L19'>19</a>
|
||||
<a name='L20'></a><a href='#L20'>20</a>
|
||||
<a name='L21'></a><a href='#L21'>21</a>
|
||||
<a name='L22'></a><a href='#L22'>22</a>
|
||||
<a name='L23'></a><a href='#L23'>23</a>
|
||||
<a name='L24'></a><a href='#L24'>24</a>
|
||||
<a name='L25'></a><a href='#L25'>25</a>
|
||||
<a name='L26'></a><a href='#L26'>26</a>
|
||||
<a name='L27'></a><a href='#L27'>27</a>
|
||||
<a name='L28'></a><a href='#L28'>28</a>
|
||||
<a name='L29'></a><a href='#L29'>29</a>
|
||||
<a name='L30'></a><a href='#L30'>30</a>
|
||||
<a name='L31'></a><a href='#L31'>31</a>
|
||||
<a name='L32'></a><a href='#L32'>32</a>
|
||||
<a name='L33'></a><a href='#L33'>33</a>
|
||||
<a name='L34'></a><a href='#L34'>34</a>
|
||||
<a name='L35'></a><a href='#L35'>35</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">28x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">28x</span>
|
||||
<span class="cline-any cline-yes">28x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">26x</span>
|
||||
<span class="cline-any cline-yes">9x</span>
|
||||
<span class="cline-any cline-yes">9x</span>
|
||||
<span class="cline-any cline-yes">26x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">26x</span>
|
||||
<span class="cline-any cline-yes">26x</span>
|
||||
<span class="cline-any cline-yes">26x</span>
|
||||
<span class="cline-any cline-yes">26x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">25x</span>
|
||||
<span class="cline-any cline-yes">25x</span>
|
||||
<span class="cline-any cline-yes">25x</span>
|
||||
<span class="cline-any cline-yes">25x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">
|
||||
import Defaults from './Defaults.js';
|
||||
|
||||
class Parser{
|
||||
constructor(config){
|
||||
if(!config){
|
||||
config=new Defaults;
|
||||
}
|
||||
this.delimiter=config.delimiter;
|
||||
}
|
||||
|
||||
format(message){
|
||||
if(!message.data && message.data!==false && message.data!==0){
|
||||
message.data={};
|
||||
}
|
||||
if(message.data['_maxListeners'])<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > message.data={};</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
message=message.JSON+this.delimiter;
|
||||
return message;
|
||||
}
|
||||
|
||||
parse(data){
|
||||
let events=data.split(this.delimiter);
|
||||
events.pop();
|
||||
return events;
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
Parser as default,
|
||||
Parser
|
||||
};
|
||||
</pre></td></tr></table></pre>
|
||||
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:26 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/entities</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> node-ipc/entities</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">93% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>93/100</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">75% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>12/16</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>6/6</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">93% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>93/100</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file high" data-value="Defaults.js"><a href="Defaults.js.html">Defaults.js</a></td>
|
||||
<td data-value="92.42" 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.42" class="pct high">92.42%</td>
|
||||
<td data-value="66" class="abs high">61/66</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="3" class="abs high">3/3</td>
|
||||
<td data-value="92.42" class="pct high">92.42%</td>
|
||||
<td data-value="66" class="abs high">61/66</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file high" data-value="EventParser.js"><a href="EventParser.js.html">EventParser.js</a></td>
|
||||
<td data-value="94.12" class="pic high">
|
||||
<div class="chart"><div class="cover-fill" style="width: 94%"></div><div class="cover-empty" style="width: 6%"></div></div>
|
||||
</td>
|
||||
<td data-value="94.12" class="pct high">94.12%</td>
|
||||
<td data-value="34" class="abs high">32/34</td>
|
||||
<td data-value="88.89" class="pct high">88.89%</td>
|
||||
<td data-value="9" class="abs high">8/9</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="3" class="abs high">3/3</td>
|
||||
<td data-value="94.12" class="pct high">94.12%</td>
|
||||
<td data-value="34" class="abs high">32/34</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:26 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/helpers/delay.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> / <a href="index.html">node-ipc/helpers</a> delay.js</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>12/12</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>3/3</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>1/1</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>12/12</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">10x</span>
|
||||
<span class="cline-any cline-yes">10x</span>
|
||||
<span class="cline-any cline-yes">10x</span>
|
||||
<span class="cline-any cline-yes">10x</span>
|
||||
<span class="cline-any cline-yes">10x</span>
|
||||
<span class="cline-any cline-yes">10x</span>
|
||||
<span class="cline-any cline-yes">10x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span></td><td class="text"><pre class="prettyprint lang-js">async function delay(ms=100) {
|
||||
return new Promise(
|
||||
resolve => {
|
||||
setTimeout(resolve, ms);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export {
|
||||
delay as default,
|
||||
delay
|
||||
}</pre></td></tr></table></pre>
|
||||
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:26 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/helpers</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> node-ipc/helpers</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>12/12</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>3/3</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>1/1</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>12/12</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file high" data-value="delay.js"><a href="delay.js.html">delay.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="100" class="pct high">100%</td>
|
||||
<td data-value="12" class="abs high">12/12</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="3" class="abs high">3/3</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="12" class="abs high">12/12</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:26 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../prettify.css" />
|
||||
<link rel="stylesheet" href="../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../index.html">All files</a> node-ipc</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>17/17</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>3/3</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>2/2</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>17/17</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file high" data-value="node-ipc.js"><a href="node-ipc.js.html">node-ipc.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="100" class="pct high">100%</td>
|
||||
<td data-value="17" class="abs high">17/17</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="3" class="abs high">3/3</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="2" class="abs high">2/2</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="17" class="abs high">17/17</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:26 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../sorter.js"></script>
|
||||
<script src="../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,131 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/node-ipc.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../prettify.css" />
|
||||
<link rel="stylesheet" href="../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../index.html">All files</a> / <a href="index.html">node-ipc</a> node-ipc.js</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>17/17</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>3/3</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>2/2</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>17/17</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a>
|
||||
<a name='L13'></a><a href='#L13'>13</a>
|
||||
<a name='L14'></a><a href='#L14'>14</a>
|
||||
<a name='L15'></a><a href='#L15'>15</a>
|
||||
<a name='L16'></a><a href='#L16'>16</a>
|
||||
<a name='L17'></a><a href='#L17'>17</a>
|
||||
<a name='L18'></a><a href='#L18'>18</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">15x</span>
|
||||
<span class="cline-any cline-yes">15x</span>
|
||||
<span class="cline-any cline-yes">15x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import IPC from './services/IPC.js';
|
||||
|
||||
class IPCModule extends IPC{
|
||||
constructor(){
|
||||
super();
|
||||
|
||||
}
|
||||
|
||||
IPC=IPC;
|
||||
}
|
||||
|
||||
const singleton=new IPCModule;
|
||||
|
||||
export {
|
||||
singleton as default,
|
||||
IPCModule
|
||||
}
|
||||
</pre></td></tr></table></pre>
|
||||
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:26 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../sorter.js"></script>
|
||||
<script src="../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,111 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/services</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> node-ipc/services</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">74.48% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>251/337</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">64% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>32/50</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">66.67% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>14/21</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">74.48% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>251/337</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line medium'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file medium" data-value="IPC.js"><a href="IPC.js.html">IPC.js</a></td>
|
||||
<td data-value="74.48" class="pic medium">
|
||||
<div class="chart"><div class="cover-fill" style="width: 74%"></div><div class="cover-empty" style="width: 26%"></div></div>
|
||||
</td>
|
||||
<td data-value="74.48" class="pct medium">74.48%</td>
|
||||
<td data-value="337" class="abs medium">251/337</td>
|
||||
<td data-value="64" class="pct medium">64%</td>
|
||||
<td data-value="50" class="abs medium">32/50</td>
|
||||
<td data-value="66.67" class="pct medium">66.67%</td>
|
||||
<td data-value="21" class="abs medium">14/21</td>
|
||||
<td data-value="74.48" class="pct medium">74.48%</td>
|
||||
<td data-value="337" class="abs medium">251/337</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:26 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,170 +0,0 @@
|
|||
/* eslint-disable */
|
||||
var addSorting = (function() {
|
||||
'use strict';
|
||||
var cols,
|
||||
currentSort = {
|
||||
index: 0,
|
||||
desc: false
|
||||
};
|
||||
|
||||
// returns the summary table element
|
||||
function getTable() {
|
||||
return document.querySelector('.coverage-summary');
|
||||
}
|
||||
// returns the thead element of the summary table
|
||||
function getTableHeader() {
|
||||
return getTable().querySelector('thead tr');
|
||||
}
|
||||
// returns the tbody element of the summary table
|
||||
function getTableBody() {
|
||||
return getTable().querySelector('tbody');
|
||||
}
|
||||
// returns the th element for nth column
|
||||
function getNthColumn(n) {
|
||||
return getTableHeader().querySelectorAll('th')[n];
|
||||
}
|
||||
|
||||
// loads all columns
|
||||
function loadColumns() {
|
||||
var colNodes = getTableHeader().querySelectorAll('th'),
|
||||
colNode,
|
||||
cols = [],
|
||||
col,
|
||||
i;
|
||||
|
||||
for (i = 0; i < colNodes.length; i += 1) {
|
||||
colNode = colNodes[i];
|
||||
col = {
|
||||
key: colNode.getAttribute('data-col'),
|
||||
sortable: !colNode.getAttribute('data-nosort'),
|
||||
type: colNode.getAttribute('data-type') || 'string'
|
||||
};
|
||||
cols.push(col);
|
||||
if (col.sortable) {
|
||||
col.defaultDescSort = col.type === 'number';
|
||||
colNode.innerHTML =
|
||||
colNode.innerHTML + '<span class="sorter"></span>';
|
||||
}
|
||||
}
|
||||
return cols;
|
||||
}
|
||||
// attaches a data attribute to every tr element with an object
|
||||
// of data values keyed by column name
|
||||
function loadRowData(tableRow) {
|
||||
var tableCols = tableRow.querySelectorAll('td'),
|
||||
colNode,
|
||||
col,
|
||||
data = {},
|
||||
i,
|
||||
val;
|
||||
for (i = 0; i < tableCols.length; i += 1) {
|
||||
colNode = tableCols[i];
|
||||
col = cols[i];
|
||||
val = colNode.getAttribute('data-value');
|
||||
if (col.type === 'number') {
|
||||
val = Number(val);
|
||||
}
|
||||
data[col.key] = val;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
// loads all row data
|
||||
function loadData() {
|
||||
var rows = getTableBody().querySelectorAll('tr'),
|
||||
i;
|
||||
|
||||
for (i = 0; i < rows.length; i += 1) {
|
||||
rows[i].data = loadRowData(rows[i]);
|
||||
}
|
||||
}
|
||||
// sorts the table using the data for the ith column
|
||||
function sortByIndex(index, desc) {
|
||||
var key = cols[index].key,
|
||||
sorter = function(a, b) {
|
||||
a = a.data[key];
|
||||
b = b.data[key];
|
||||
return a < b ? -1 : a > b ? 1 : 0;
|
||||
},
|
||||
finalSorter = sorter,
|
||||
tableBody = document.querySelector('.coverage-summary tbody'),
|
||||
rowNodes = tableBody.querySelectorAll('tr'),
|
||||
rows = [],
|
||||
i;
|
||||
|
||||
if (desc) {
|
||||
finalSorter = function(a, b) {
|
||||
return -1 * sorter(a, b);
|
||||
};
|
||||
}
|
||||
|
||||
for (i = 0; i < rowNodes.length; i += 1) {
|
||||
rows.push(rowNodes[i]);
|
||||
tableBody.removeChild(rowNodes[i]);
|
||||
}
|
||||
|
||||
rows.sort(finalSorter);
|
||||
|
||||
for (i = 0; i < rows.length; i += 1) {
|
||||
tableBody.appendChild(rows[i]);
|
||||
}
|
||||
}
|
||||
// removes sort indicators for current column being sorted
|
||||
function removeSortIndicators() {
|
||||
var col = getNthColumn(currentSort.index),
|
||||
cls = col.className;
|
||||
|
||||
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
|
||||
col.className = cls;
|
||||
}
|
||||
// adds sort indicators for current column being sorted
|
||||
function addSortIndicators() {
|
||||
getNthColumn(currentSort.index).className += currentSort.desc
|
||||
? ' sorted-desc'
|
||||
: ' sorted';
|
||||
}
|
||||
// adds event listeners for all sorter widgets
|
||||
function enableUI() {
|
||||
var i,
|
||||
el,
|
||||
ithSorter = function ithSorter(i) {
|
||||
var col = cols[i];
|
||||
|
||||
return function() {
|
||||
var desc = col.defaultDescSort;
|
||||
|
||||
if (currentSort.index === i) {
|
||||
desc = !currentSort.desc;
|
||||
}
|
||||
sortByIndex(i, desc);
|
||||
removeSortIndicators();
|
||||
currentSort.index = i;
|
||||
currentSort.desc = desc;
|
||||
addSortIndicators();
|
||||
};
|
||||
};
|
||||
for (i = 0; i < cols.length; i += 1) {
|
||||
if (cols[i].sortable) {
|
||||
// add the click event handler on the th so users
|
||||
// dont have to click on those tiny arrows
|
||||
el = getNthColumn(i).querySelector('.sorter').parentElement;
|
||||
if (el.addEventListener) {
|
||||
el.addEventListener('click', ithSorter(i));
|
||||
} else {
|
||||
el.attachEvent('onclick', ithSorter(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// adds sorting functionality to the UI
|
||||
return function() {
|
||||
if (!getTable()) {
|
||||
return;
|
||||
}
|
||||
cols = loadColumns();
|
||||
loadData();
|
||||
addSortIndicators();
|
||||
enableUI();
|
||||
};
|
||||
})();
|
||||
|
||||
window.addEventListener('load', addSorting);
|
1455
coverage/lcov.info
1455
coverage/lcov.info
File diff suppressed because it is too large
Load Diff
|
@ -1,18 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="86" height="18">
|
||||
<linearGradient id="smooth" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#fff" stop-opacity=".7"/>
|
||||
<stop offset=".1" stop-color="#aaa" stop-opacity=".1"/>
|
||||
<stop offset=".9" stop-color="#000" stop-opacity=".3"/>
|
||||
<stop offset="1" stop-color="#000" stop-opacity=".5"/>
|
||||
</linearGradient>
|
||||
<rect rx="4" width="86" height="18" fill="#555"/>
|
||||
<rect rx="4" x="58" width="28" height="18" fill="#4c1"/>
|
||||
<rect x="58" width="4" height="18" fill="#4c1"/>
|
||||
<rect rx="4" width="86" height="18" fill="url(#smooth)"/>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||
<text x="30" y="14" fill="#010101" fill-opacity=".3">coverage</text>
|
||||
<text x="30" y="13">coverage</text>
|
||||
<text x="71" y="14" fill="#010101" fill-opacity=".3">80%</text>
|
||||
<text x="71" y="13">80%</text>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 930 B |
|
@ -1,854 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/dao/client.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> / <a href="index.html">node-ipc/dao</a> client.js</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">78.68% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>203/258</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">63.64% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>21/33</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>8/8</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">78.68% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>203/258</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line medium'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a>
|
||||
<a name='L13'></a><a href='#L13'>13</a>
|
||||
<a name='L14'></a><a href='#L14'>14</a>
|
||||
<a name='L15'></a><a href='#L15'>15</a>
|
||||
<a name='L16'></a><a href='#L16'>16</a>
|
||||
<a name='L17'></a><a href='#L17'>17</a>
|
||||
<a name='L18'></a><a href='#L18'>18</a>
|
||||
<a name='L19'></a><a href='#L19'>19</a>
|
||||
<a name='L20'></a><a href='#L20'>20</a>
|
||||
<a name='L21'></a><a href='#L21'>21</a>
|
||||
<a name='L22'></a><a href='#L22'>22</a>
|
||||
<a name='L23'></a><a href='#L23'>23</a>
|
||||
<a name='L24'></a><a href='#L24'>24</a>
|
||||
<a name='L25'></a><a href='#L25'>25</a>
|
||||
<a name='L26'></a><a href='#L26'>26</a>
|
||||
<a name='L27'></a><a href='#L27'>27</a>
|
||||
<a name='L28'></a><a href='#L28'>28</a>
|
||||
<a name='L29'></a><a href='#L29'>29</a>
|
||||
<a name='L30'></a><a href='#L30'>30</a>
|
||||
<a name='L31'></a><a href='#L31'>31</a>
|
||||
<a name='L32'></a><a href='#L32'>32</a>
|
||||
<a name='L33'></a><a href='#L33'>33</a>
|
||||
<a name='L34'></a><a href='#L34'>34</a>
|
||||
<a name='L35'></a><a href='#L35'>35</a>
|
||||
<a name='L36'></a><a href='#L36'>36</a>
|
||||
<a name='L37'></a><a href='#L37'>37</a>
|
||||
<a name='L38'></a><a href='#L38'>38</a>
|
||||
<a name='L39'></a><a href='#L39'>39</a>
|
||||
<a name='L40'></a><a href='#L40'>40</a>
|
||||
<a name='L41'></a><a href='#L41'>41</a>
|
||||
<a name='L42'></a><a href='#L42'>42</a>
|
||||
<a name='L43'></a><a href='#L43'>43</a>
|
||||
<a name='L44'></a><a href='#L44'>44</a>
|
||||
<a name='L45'></a><a href='#L45'>45</a>
|
||||
<a name='L46'></a><a href='#L46'>46</a>
|
||||
<a name='L47'></a><a href='#L47'>47</a>
|
||||
<a name='L48'></a><a href='#L48'>48</a>
|
||||
<a name='L49'></a><a href='#L49'>49</a>
|
||||
<a name='L50'></a><a href='#L50'>50</a>
|
||||
<a name='L51'></a><a href='#L51'>51</a>
|
||||
<a name='L52'></a><a href='#L52'>52</a>
|
||||
<a name='L53'></a><a href='#L53'>53</a>
|
||||
<a name='L54'></a><a href='#L54'>54</a>
|
||||
<a name='L55'></a><a href='#L55'>55</a>
|
||||
<a name='L56'></a><a href='#L56'>56</a>
|
||||
<a name='L57'></a><a href='#L57'>57</a>
|
||||
<a name='L58'></a><a href='#L58'>58</a>
|
||||
<a name='L59'></a><a href='#L59'>59</a>
|
||||
<a name='L60'></a><a href='#L60'>60</a>
|
||||
<a name='L61'></a><a href='#L61'>61</a>
|
||||
<a name='L62'></a><a href='#L62'>62</a>
|
||||
<a name='L63'></a><a href='#L63'>63</a>
|
||||
<a name='L64'></a><a href='#L64'>64</a>
|
||||
<a name='L65'></a><a href='#L65'>65</a>
|
||||
<a name='L66'></a><a href='#L66'>66</a>
|
||||
<a name='L67'></a><a href='#L67'>67</a>
|
||||
<a name='L68'></a><a href='#L68'>68</a>
|
||||
<a name='L69'></a><a href='#L69'>69</a>
|
||||
<a name='L70'></a><a href='#L70'>70</a>
|
||||
<a name='L71'></a><a href='#L71'>71</a>
|
||||
<a name='L72'></a><a href='#L72'>72</a>
|
||||
<a name='L73'></a><a href='#L73'>73</a>
|
||||
<a name='L74'></a><a href='#L74'>74</a>
|
||||
<a name='L75'></a><a href='#L75'>75</a>
|
||||
<a name='L76'></a><a href='#L76'>76</a>
|
||||
<a name='L77'></a><a href='#L77'>77</a>
|
||||
<a name='L78'></a><a href='#L78'>78</a>
|
||||
<a name='L79'></a><a href='#L79'>79</a>
|
||||
<a name='L80'></a><a href='#L80'>80</a>
|
||||
<a name='L81'></a><a href='#L81'>81</a>
|
||||
<a name='L82'></a><a href='#L82'>82</a>
|
||||
<a name='L83'></a><a href='#L83'>83</a>
|
||||
<a name='L84'></a><a href='#L84'>84</a>
|
||||
<a name='L85'></a><a href='#L85'>85</a>
|
||||
<a name='L86'></a><a href='#L86'>86</a>
|
||||
<a name='L87'></a><a href='#L87'>87</a>
|
||||
<a name='L88'></a><a href='#L88'>88</a>
|
||||
<a name='L89'></a><a href='#L89'>89</a>
|
||||
<a name='L90'></a><a href='#L90'>90</a>
|
||||
<a name='L91'></a><a href='#L91'>91</a>
|
||||
<a name='L92'></a><a href='#L92'>92</a>
|
||||
<a name='L93'></a><a href='#L93'>93</a>
|
||||
<a name='L94'></a><a href='#L94'>94</a>
|
||||
<a name='L95'></a><a href='#L95'>95</a>
|
||||
<a name='L96'></a><a href='#L96'>96</a>
|
||||
<a name='L97'></a><a href='#L97'>97</a>
|
||||
<a name='L98'></a><a href='#L98'>98</a>
|
||||
<a name='L99'></a><a href='#L99'>99</a>
|
||||
<a name='L100'></a><a href='#L100'>100</a>
|
||||
<a name='L101'></a><a href='#L101'>101</a>
|
||||
<a name='L102'></a><a href='#L102'>102</a>
|
||||
<a name='L103'></a><a href='#L103'>103</a>
|
||||
<a name='L104'></a><a href='#L104'>104</a>
|
||||
<a name='L105'></a><a href='#L105'>105</a>
|
||||
<a name='L106'></a><a href='#L106'>106</a>
|
||||
<a name='L107'></a><a href='#L107'>107</a>
|
||||
<a name='L108'></a><a href='#L108'>108</a>
|
||||
<a name='L109'></a><a href='#L109'>109</a>
|
||||
<a name='L110'></a><a href='#L110'>110</a>
|
||||
<a name='L111'></a><a href='#L111'>111</a>
|
||||
<a name='L112'></a><a href='#L112'>112</a>
|
||||
<a name='L113'></a><a href='#L113'>113</a>
|
||||
<a name='L114'></a><a href='#L114'>114</a>
|
||||
<a name='L115'></a><a href='#L115'>115</a>
|
||||
<a name='L116'></a><a href='#L116'>116</a>
|
||||
<a name='L117'></a><a href='#L117'>117</a>
|
||||
<a name='L118'></a><a href='#L118'>118</a>
|
||||
<a name='L119'></a><a href='#L119'>119</a>
|
||||
<a name='L120'></a><a href='#L120'>120</a>
|
||||
<a name='L121'></a><a href='#L121'>121</a>
|
||||
<a name='L122'></a><a href='#L122'>122</a>
|
||||
<a name='L123'></a><a href='#L123'>123</a>
|
||||
<a name='L124'></a><a href='#L124'>124</a>
|
||||
<a name='L125'></a><a href='#L125'>125</a>
|
||||
<a name='L126'></a><a href='#L126'>126</a>
|
||||
<a name='L127'></a><a href='#L127'>127</a>
|
||||
<a name='L128'></a><a href='#L128'>128</a>
|
||||
<a name='L129'></a><a href='#L129'>129</a>
|
||||
<a name='L130'></a><a href='#L130'>130</a>
|
||||
<a name='L131'></a><a href='#L131'>131</a>
|
||||
<a name='L132'></a><a href='#L132'>132</a>
|
||||
<a name='L133'></a><a href='#L133'>133</a>
|
||||
<a name='L134'></a><a href='#L134'>134</a>
|
||||
<a name='L135'></a><a href='#L135'>135</a>
|
||||
<a name='L136'></a><a href='#L136'>136</a>
|
||||
<a name='L137'></a><a href='#L137'>137</a>
|
||||
<a name='L138'></a><a href='#L138'>138</a>
|
||||
<a name='L139'></a><a href='#L139'>139</a>
|
||||
<a name='L140'></a><a href='#L140'>140</a>
|
||||
<a name='L141'></a><a href='#L141'>141</a>
|
||||
<a name='L142'></a><a href='#L142'>142</a>
|
||||
<a name='L143'></a><a href='#L143'>143</a>
|
||||
<a name='L144'></a><a href='#L144'>144</a>
|
||||
<a name='L145'></a><a href='#L145'>145</a>
|
||||
<a name='L146'></a><a href='#L146'>146</a>
|
||||
<a name='L147'></a><a href='#L147'>147</a>
|
||||
<a name='L148'></a><a href='#L148'>148</a>
|
||||
<a name='L149'></a><a href='#L149'>149</a>
|
||||
<a name='L150'></a><a href='#L150'>150</a>
|
||||
<a name='L151'></a><a href='#L151'>151</a>
|
||||
<a name='L152'></a><a href='#L152'>152</a>
|
||||
<a name='L153'></a><a href='#L153'>153</a>
|
||||
<a name='L154'></a><a href='#L154'>154</a>
|
||||
<a name='L155'></a><a href='#L155'>155</a>
|
||||
<a name='L156'></a><a href='#L156'>156</a>
|
||||
<a name='L157'></a><a href='#L157'>157</a>
|
||||
<a name='L158'></a><a href='#L158'>158</a>
|
||||
<a name='L159'></a><a href='#L159'>159</a>
|
||||
<a name='L160'></a><a href='#L160'>160</a>
|
||||
<a name='L161'></a><a href='#L161'>161</a>
|
||||
<a name='L162'></a><a href='#L162'>162</a>
|
||||
<a name='L163'></a><a href='#L163'>163</a>
|
||||
<a name='L164'></a><a href='#L164'>164</a>
|
||||
<a name='L165'></a><a href='#L165'>165</a>
|
||||
<a name='L166'></a><a href='#L166'>166</a>
|
||||
<a name='L167'></a><a href='#L167'>167</a>
|
||||
<a name='L168'></a><a href='#L168'>168</a>
|
||||
<a name='L169'></a><a href='#L169'>169</a>
|
||||
<a name='L170'></a><a href='#L170'>170</a>
|
||||
<a name='L171'></a><a href='#L171'>171</a>
|
||||
<a name='L172'></a><a href='#L172'>172</a>
|
||||
<a name='L173'></a><a href='#L173'>173</a>
|
||||
<a name='L174'></a><a href='#L174'>174</a>
|
||||
<a name='L175'></a><a href='#L175'>175</a>
|
||||
<a name='L176'></a><a href='#L176'>176</a>
|
||||
<a name='L177'></a><a href='#L177'>177</a>
|
||||
<a name='L178'></a><a href='#L178'>178</a>
|
||||
<a name='L179'></a><a href='#L179'>179</a>
|
||||
<a name='L180'></a><a href='#L180'>180</a>
|
||||
<a name='L181'></a><a href='#L181'>181</a>
|
||||
<a name='L182'></a><a href='#L182'>182</a>
|
||||
<a name='L183'></a><a href='#L183'>183</a>
|
||||
<a name='L184'></a><a href='#L184'>184</a>
|
||||
<a name='L185'></a><a href='#L185'>185</a>
|
||||
<a name='L186'></a><a href='#L186'>186</a>
|
||||
<a name='L187'></a><a href='#L187'>187</a>
|
||||
<a name='L188'></a><a href='#L188'>188</a>
|
||||
<a name='L189'></a><a href='#L189'>189</a>
|
||||
<a name='L190'></a><a href='#L190'>190</a>
|
||||
<a name='L191'></a><a href='#L191'>191</a>
|
||||
<a name='L192'></a><a href='#L192'>192</a>
|
||||
<a name='L193'></a><a href='#L193'>193</a>
|
||||
<a name='L194'></a><a href='#L194'>194</a>
|
||||
<a name='L195'></a><a href='#L195'>195</a>
|
||||
<a name='L196'></a><a href='#L196'>196</a>
|
||||
<a name='L197'></a><a href='#L197'>197</a>
|
||||
<a name='L198'></a><a href='#L198'>198</a>
|
||||
<a name='L199'></a><a href='#L199'>199</a>
|
||||
<a name='L200'></a><a href='#L200'>200</a>
|
||||
<a name='L201'></a><a href='#L201'>201</a>
|
||||
<a name='L202'></a><a href='#L202'>202</a>
|
||||
<a name='L203'></a><a href='#L203'>203</a>
|
||||
<a name='L204'></a><a href='#L204'>204</a>
|
||||
<a name='L205'></a><a href='#L205'>205</a>
|
||||
<a name='L206'></a><a href='#L206'>206</a>
|
||||
<a name='L207'></a><a href='#L207'>207</a>
|
||||
<a name='L208'></a><a href='#L208'>208</a>
|
||||
<a name='L209'></a><a href='#L209'>209</a>
|
||||
<a name='L210'></a><a href='#L210'>210</a>
|
||||
<a name='L211'></a><a href='#L211'>211</a>
|
||||
<a name='L212'></a><a href='#L212'>212</a>
|
||||
<a name='L213'></a><a href='#L213'>213</a>
|
||||
<a name='L214'></a><a href='#L214'>214</a>
|
||||
<a name='L215'></a><a href='#L215'>215</a>
|
||||
<a name='L216'></a><a href='#L216'>216</a>
|
||||
<a name='L217'></a><a href='#L217'>217</a>
|
||||
<a name='L218'></a><a href='#L218'>218</a>
|
||||
<a name='L219'></a><a href='#L219'>219</a>
|
||||
<a name='L220'></a><a href='#L220'>220</a>
|
||||
<a name='L221'></a><a href='#L221'>221</a>
|
||||
<a name='L222'></a><a href='#L222'>222</a>
|
||||
<a name='L223'></a><a href='#L223'>223</a>
|
||||
<a name='L224'></a><a href='#L224'>224</a>
|
||||
<a name='L225'></a><a href='#L225'>225</a>
|
||||
<a name='L226'></a><a href='#L226'>226</a>
|
||||
<a name='L227'></a><a href='#L227'>227</a>
|
||||
<a name='L228'></a><a href='#L228'>228</a>
|
||||
<a name='L229'></a><a href='#L229'>229</a>
|
||||
<a name='L230'></a><a href='#L230'>230</a>
|
||||
<a name='L231'></a><a href='#L231'>231</a>
|
||||
<a name='L232'></a><a href='#L232'>232</a>
|
||||
<a name='L233'></a><a href='#L233'>233</a>
|
||||
<a name='L234'></a><a href='#L234'>234</a>
|
||||
<a name='L235'></a><a href='#L235'>235</a>
|
||||
<a name='L236'></a><a href='#L236'>236</a>
|
||||
<a name='L237'></a><a href='#L237'>237</a>
|
||||
<a name='L238'></a><a href='#L238'>238</a>
|
||||
<a name='L239'></a><a href='#L239'>239</a>
|
||||
<a name='L240'></a><a href='#L240'>240</a>
|
||||
<a name='L241'></a><a href='#L241'>241</a>
|
||||
<a name='L242'></a><a href='#L242'>242</a>
|
||||
<a name='L243'></a><a href='#L243'>243</a>
|
||||
<a name='L244'></a><a href='#L244'>244</a>
|
||||
<a name='L245'></a><a href='#L245'>245</a>
|
||||
<a name='L246'></a><a href='#L246'>246</a>
|
||||
<a name='L247'></a><a href='#L247'>247</a>
|
||||
<a name='L248'></a><a href='#L248'>248</a>
|
||||
<a name='L249'></a><a href='#L249'>249</a>
|
||||
<a name='L250'></a><a href='#L250'>250</a>
|
||||
<a name='L251'></a><a href='#L251'>251</a>
|
||||
<a name='L252'></a><a href='#L252'>252</a>
|
||||
<a name='L253'></a><a href='#L253'>253</a>
|
||||
<a name='L254'></a><a href='#L254'>254</a>
|
||||
<a name='L255'></a><a href='#L255'>255</a>
|
||||
<a name='L256'></a><a href='#L256'>256</a>
|
||||
<a name='L257'></a><a href='#L257'>257</a>
|
||||
<a name='L258'></a><a href='#L258'>258</a>
|
||||
<a name='L259'></a><a href='#L259'>259</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">12x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">6x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">18x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">16x</span>
|
||||
<span class="cline-any cline-yes">16x</span>
|
||||
<span class="cline-any cline-yes">16x</span>
|
||||
<span class="cline-any cline-yes">16x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">4x</span>
|
||||
<span class="cline-any cline-yes">4x</span>
|
||||
<span class="cline-any cline-yes">4x</span>
|
||||
<span class="cline-any cline-yes">4x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">19x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">2x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">5x</span>
|
||||
<span class="cline-any cline-yes">8x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">20x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import net from 'net';
|
||||
import tls from 'tls';
|
||||
import EventParser from '../entities/EventParser.js';
|
||||
import Message from 'js-message';
|
||||
import fs from 'fs';
|
||||
import Queue from 'js-queue';
|
||||
import Events from 'event-pubsub';
|
||||
|
||||
let eventParser = new EventParser();
|
||||
|
||||
class Client extends Events{
|
||||
constructor(config,log){
|
||||
super();
|
||||
this.config=config;
|
||||
this.log=log;
|
||||
this.publish=super.emit;
|
||||
|
||||
(config.maxRetries)? this.retriesRemaining=config.maxRetries<span class="branch-0 cbranch-no" title="branch not covered" >:0;</span>
|
||||
|
||||
eventParser=new EventParser(this.config);
|
||||
}
|
||||
|
||||
Client=Client;
|
||||
queue =new Queue;
|
||||
socket=false;
|
||||
connect=connect;
|
||||
emit=emit;
|
||||
retriesRemaining=0;
|
||||
explicitlyDisconnected=false;
|
||||
}
|
||||
|
||||
function emit(type,data){
|
||||
this.log('dispatching event to ', this.id, this.path, ' : ', type, ',', data);
|
||||
|
||||
let message=new Message;
|
||||
message.type=type;
|
||||
message.data=data;
|
||||
|
||||
if(this.config.rawBuffer)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > message=Buffer.from(type,this.config.encoding);</span>
|
||||
}else{
|
||||
message=eventParser.format(message);
|
||||
}
|
||||
|
||||
//volitile emit
|
||||
if(!this.config.sync){
|
||||
this.socket.write(message);
|
||||
return;
|
||||
}
|
||||
|
||||
//sync, non-volitile, ack emit
|
||||
this.queue.add(
|
||||
syncEmit.bind(this,message)
|
||||
);
|
||||
}
|
||||
|
||||
function syncEmit(message){
|
||||
this.log('dispatching event to ', this.id, this.path, ' : ', message);
|
||||
this.socket.write(message);
|
||||
}
|
||||
|
||||
function connect(){
|
||||
//init client object for scope persistance especially inside of socket events.
|
||||
let client=this;
|
||||
|
||||
client.log('requested connection to ', client.id, client.path);
|
||||
if(!this.path)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.log('\n\n######\nerror: ', client.id ,' client has not specified socket path it wishes to connect to.');</span>
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
const options={};
|
||||
|
||||
if(!client.port){
|
||||
client.log('Connecting client on Unix Socket :', client.path);
|
||||
|
||||
options.path=client.path;
|
||||
|
||||
if (process.platform ==='win32' && !client.path.startsWith('\\\\.\\pipe\\')){
|
||||
options.path = options.path.replace(/^\//, '');
|
||||
options.path = options.path.replace(/\//g, '-');
|
||||
options.path= `\\\\.\\pipe\\${options.path}`;
|
||||
}
|
||||
|
||||
client.socket = net.connect(options);
|
||||
}else{
|
||||
options.host=client.path;
|
||||
options.port=client.port;
|
||||
|
||||
if(client.config.interface.localAddress)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > options.localAddress=client.config.interface.localAddress;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
if(client.config.interface.localPort)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > options.localPort=client.config.interface.localPort;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
if(client.config.interface.family)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > options.family=client.config.interface.family;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
if(client.config.interface.hints)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > options.hints=client.config.interface.hints;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
if(client.config.interface.lookup)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > options.lookup=client.config.interface.lookup;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
if(!client.config.tls){
|
||||
client.log('Connecting client via TCP to', options);
|
||||
client.socket = net.connect(options);
|
||||
}<span class="branch-0 cbranch-no" title="branch not covered" >else{</span>
|
||||
<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>
|
||||
<span class="cstat-no" title="statement not covered" > client.config.tls.key=fs.readFileSync(client.config.tls.private);</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(client.config.tls.public){</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.config.tls.cert=fs.readFileSync(client.config.tls.public);</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(client.config.tls.trustedConnections){</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(typeof client.config.tls.trustedConnections === 'string'){</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.config.tls.trustedConnections=[client.config.tls.trustedConnections];</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.config.tls.ca=[];</span>
|
||||
<span class="cstat-no" title="statement not covered" > for(let i=0; i<client.config.tls.trustedConnections.length; i++){</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.config.tls.ca.push(</span>
|
||||
<span class="cstat-no" title="statement not covered" > fs.readFileSync(client.config.tls.trustedConnections[i])</span>
|
||||
<span class="cstat-no" title="statement not covered" > );</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
<span class="cstat-no" title="statement not covered" ></span>
|
||||
<span class="cstat-no" title="statement not covered" > Object.assign(client.config.tls,options);</span>
|
||||
<span class="cstat-no" title="statement not covered" ></span>
|
||||
<span class="cstat-no" title="statement not covered" > client.socket = tls.connect(</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.config.tls</span>
|
||||
<span class="cstat-no" title="statement not covered" > );</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
}
|
||||
|
||||
client.socket.setEncoding(this.config.encoding);
|
||||
|
||||
client.socket.on(
|
||||
'error',
|
||||
function(err){
|
||||
client.log('\n\n######\nerror: ', err);
|
||||
client.publish('error', err);
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
client.socket.on(
|
||||
'connect',
|
||||
function connectionMade(){
|
||||
client.publish('connect');
|
||||
client.retriesRemaining=client.config.maxRetries;
|
||||
client.log('retrying reset');
|
||||
}
|
||||
);
|
||||
|
||||
client.socket.on(
|
||||
'close',
|
||||
function connectionClosed(){
|
||||
client.log('connection closed' ,client.id , client.path,
|
||||
client.retriesRemaining, 'tries remaining of', client.config.maxRetries
|
||||
);
|
||||
|
||||
if(
|
||||
client.config.stopRetrying ||
|
||||
client.retriesRemaining<1 ||
|
||||
client.explicitlyDisconnected
|
||||
|
||||
){
|
||||
client.publish('disconnect');
|
||||
client.log(
|
||||
(client.config.id),
|
||||
'exceeded connection rety amount of',
|
||||
' or stopRetrying flag set.'
|
||||
);
|
||||
|
||||
client.socket.destroy();
|
||||
client.publish('destroy');
|
||||
client=undefined;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(
|
||||
function retryTimeout(){
|
||||
if (client.explicitlyDisconnected) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
client.retriesRemaining--;
|
||||
client.connect();
|
||||
}.bind(null,client),
|
||||
client.config.retry
|
||||
);
|
||||
|
||||
client.publish('disconnect');
|
||||
}
|
||||
);
|
||||
|
||||
client.socket.on(
|
||||
'data',
|
||||
function(data) {
|
||||
client.log('## received events ##');
|
||||
if(client.config.rawBuffer)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > client.publish(</span>
|
||||
<span class="cstat-no" title="statement not covered" > 'data',</span>
|
||||
<span class="cstat-no" title="statement not covered" > Buffer.from(data,client.config.encoding)</span>
|
||||
<span class="cstat-no" title="statement not covered" > );</span>
|
||||
<span class="cstat-no" title="statement not covered" > if(!client.config.sync){</span>
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
<span class="cstat-no" title="statement not covered" ></span>
|
||||
<span class="cstat-no" title="statement not covered" > client.queue.next();</span>
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
if(!this.ipcBuffer){
|
||||
this.ipcBuffer='';
|
||||
}
|
||||
|
||||
data=(this.ipcBuffer+=data);
|
||||
|
||||
if(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1)<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<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>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
this.ipcBuffer='';
|
||||
|
||||
const events = eventParser.parse(data);
|
||||
const eCount = events.length;
|
||||
for(let i=0; i<eCount; i++){
|
||||
let message=new Message;
|
||||
message.load(events[i]);
|
||||
|
||||
client.log('detected event', message.type, message.data);
|
||||
client.publish(
|
||||
message.type,
|
||||
message.data
|
||||
);
|
||||
}
|
||||
|
||||
if(!client.config.sync){
|
||||
return;
|
||||
}
|
||||
|
||||
client.queue.next();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export {
|
||||
Client as default,
|
||||
Client
|
||||
};
|
||||
</pre></td></tr></table></pre>
|
||||
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:27 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/dao</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> node-ipc/dao</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">79.15% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>520/657</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">67.03% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>61/91</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">95.65% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>22/23</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">79.15% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>520/657</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line medium'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file medium" data-value="client.js"><a href="client.js.html">client.js</a></td>
|
||||
<td data-value="78.68" class="pic medium">
|
||||
<div class="chart"><div class="cover-fill" style="width: 78%"></div><div class="cover-empty" style="width: 22%"></div></div>
|
||||
</td>
|
||||
<td data-value="78.68" class="pct medium">78.68%</td>
|
||||
<td data-value="258" class="abs medium">203/258</td>
|
||||
<td data-value="63.64" class="pct medium">63.64%</td>
|
||||
<td data-value="33" class="abs medium">21/33</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="8" class="abs high">8/8</td>
|
||||
<td data-value="78.68" class="pct medium">78.68%</td>
|
||||
<td data-value="258" class="abs medium">203/258</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file medium" data-value="socketServer.js"><a href="socketServer.js.html">socketServer.js</a></td>
|
||||
<td data-value="79.45" class="pic medium">
|
||||
<div class="chart"><div class="cover-fill" style="width: 79%"></div><div class="cover-empty" style="width: 21%"></div></div>
|
||||
</td>
|
||||
<td data-value="79.45" class="pct medium">79.45%</td>
|
||||
<td data-value="399" class="abs medium">317/399</td>
|
||||
<td data-value="68.97" class="pct medium">68.97%</td>
|
||||
<td data-value="58" class="abs medium">40/58</td>
|
||||
<td data-value="93.33" class="pct high">93.33%</td>
|
||||
<td data-value="15" class="abs high">14/15</td>
|
||||
<td data-value="79.45" class="pct medium">79.45%</td>
|
||||
<td data-value="399" class="abs medium">317/399</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:27 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,278 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/entities/Defaults.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> / <a href="index.html">node-ipc/entities</a> Defaults.js</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">92.42% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>61/66</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">57.14% </span>
|
||||
<span class="quiet">Branches</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'>3/3</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">92.42% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>61/66</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a>
|
||||
<a name='L13'></a><a href='#L13'>13</a>
|
||||
<a name='L14'></a><a href='#L14'>14</a>
|
||||
<a name='L15'></a><a href='#L15'>15</a>
|
||||
<a name='L16'></a><a href='#L16'>16</a>
|
||||
<a name='L17'></a><a href='#L17'>17</a>
|
||||
<a name='L18'></a><a href='#L18'>18</a>
|
||||
<a name='L19'></a><a href='#L19'>19</a>
|
||||
<a name='L20'></a><a href='#L20'>20</a>
|
||||
<a name='L21'></a><a href='#L21'>21</a>
|
||||
<a name='L22'></a><a href='#L22'>22</a>
|
||||
<a name='L23'></a><a href='#L23'>23</a>
|
||||
<a name='L24'></a><a href='#L24'>24</a>
|
||||
<a name='L25'></a><a href='#L25'>25</a>
|
||||
<a name='L26'></a><a href='#L26'>26</a>
|
||||
<a name='L27'></a><a href='#L27'>27</a>
|
||||
<a name='L28'></a><a href='#L28'>28</a>
|
||||
<a name='L29'></a><a href='#L29'>29</a>
|
||||
<a name='L30'></a><a href='#L30'>30</a>
|
||||
<a name='L31'></a><a href='#L31'>31</a>
|
||||
<a name='L32'></a><a href='#L32'>32</a>
|
||||
<a name='L33'></a><a href='#L33'>33</a>
|
||||
<a name='L34'></a><a href='#L34'>34</a>
|
||||
<a name='L35'></a><a href='#L35'>35</a>
|
||||
<a name='L36'></a><a href='#L36'>36</a>
|
||||
<a name='L37'></a><a href='#L37'>37</a>
|
||||
<a name='L38'></a><a href='#L38'>38</a>
|
||||
<a name='L39'></a><a href='#L39'>39</a>
|
||||
<a name='L40'></a><a href='#L40'>40</a>
|
||||
<a name='L41'></a><a href='#L41'>41</a>
|
||||
<a name='L42'></a><a href='#L42'>42</a>
|
||||
<a name='L43'></a><a href='#L43'>43</a>
|
||||
<a name='L44'></a><a href='#L44'>44</a>
|
||||
<a name='L45'></a><a href='#L45'>45</a>
|
||||
<a name='L46'></a><a href='#L46'>46</a>
|
||||
<a name='L47'></a><a href='#L47'>47</a>
|
||||
<a name='L48'></a><a href='#L48'>48</a>
|
||||
<a name='L49'></a><a href='#L49'>49</a>
|
||||
<a name='L50'></a><a href='#L50'>50</a>
|
||||
<a name='L51'></a><a href='#L51'>51</a>
|
||||
<a name='L52'></a><a href='#L52'>52</a>
|
||||
<a name='L53'></a><a href='#L53'>53</a>
|
||||
<a name='L54'></a><a href='#L54'>54</a>
|
||||
<a name='L55'></a><a href='#L55'>55</a>
|
||||
<a name='L56'></a><a href='#L56'>56</a>
|
||||
<a name='L57'></a><a href='#L57'>57</a>
|
||||
<a name='L58'></a><a href='#L58'>58</a>
|
||||
<a name='L59'></a><a href='#L59'>59</a>
|
||||
<a name='L60'></a><a href='#L60'>60</a>
|
||||
<a name='L61'></a><a href='#L61'>61</a>
|
||||
<a name='L62'></a><a href='#L62'>62</a>
|
||||
<a name='L63'></a><a href='#L63'>63</a>
|
||||
<a name='L64'></a><a href='#L64'>64</a>
|
||||
<a name='L65'></a><a href='#L65'>65</a>
|
||||
<a name='L66'></a><a href='#L66'>66</a>
|
||||
<a name='L67'></a><a href='#L67'>67</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">29x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import os from 'os';
|
||||
|
||||
class Defaults{
|
||||
|
||||
constructor(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
appspace='app.';
|
||||
socketRoot='/tmp/';
|
||||
id=os.hostname();
|
||||
|
||||
encoding='utf8';
|
||||
rawBuffer=false;
|
||||
sync=false;
|
||||
unlink=true;
|
||||
|
||||
delimiter='\f';
|
||||
|
||||
silent=false;
|
||||
logDepth=5;
|
||||
logInColor=true;
|
||||
logger=console.log.bind(console);
|
||||
|
||||
maxConnections=100;
|
||||
retry=500;
|
||||
maxRetries=Infinity;
|
||||
stopRetrying=false;
|
||||
|
||||
IPType=getIPType();
|
||||
tls=false;
|
||||
networkHost = (this.IPType == 'IPv6') <span class="branch-0 cbranch-no" title="branch not covered" >? '::1' </span>: '127.0.0.1';
|
||||
networkPort = 8000;
|
||||
|
||||
readableAll = false;
|
||||
writableAll = false;
|
||||
|
||||
interface={
|
||||
localAddress:false,
|
||||
localPort:false,
|
||||
family:false,
|
||||
hints:false,
|
||||
lookup:false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getIPType() {
|
||||
const networkInterfaces = os.networkInterfaces();
|
||||
let IPType = '';
|
||||
if (networkInterfaces
|
||||
&& Array.isArray(networkInterfaces)
|
||||
<span class="branch-0 cbranch-no" title="branch not covered" > && networkInterfaces.length > 0)</span> <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > // getting the family of first network interface available</span>
|
||||
<span class="cstat-no" title="statement not covered" > IPType = networkInterfaces [</span>
|
||||
<span class="cstat-no" title="statement not covered" > Object.keys( networkInterfaces )[0]</span>
|
||||
<span class="cstat-no" title="statement not covered" > ][0].family;</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
return IPType;
|
||||
}
|
||||
|
||||
export {
|
||||
Defaults as default,
|
||||
Defaults
|
||||
}
|
||||
</pre></td></tr></table></pre>
|
||||
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:27 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,182 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/entities/EventParser.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> / <a href="index.html">node-ipc/entities</a> EventParser.js</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">94.12% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>32/34</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">88.89% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>8/9</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>3/3</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">94.12% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>32/34</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a>
|
||||
<a name='L13'></a><a href='#L13'>13</a>
|
||||
<a name='L14'></a><a href='#L14'>14</a>
|
||||
<a name='L15'></a><a href='#L15'>15</a>
|
||||
<a name='L16'></a><a href='#L16'>16</a>
|
||||
<a name='L17'></a><a href='#L17'>17</a>
|
||||
<a name='L18'></a><a href='#L18'>18</a>
|
||||
<a name='L19'></a><a href='#L19'>19</a>
|
||||
<a name='L20'></a><a href='#L20'>20</a>
|
||||
<a name='L21'></a><a href='#L21'>21</a>
|
||||
<a name='L22'></a><a href='#L22'>22</a>
|
||||
<a name='L23'></a><a href='#L23'>23</a>
|
||||
<a name='L24'></a><a href='#L24'>24</a>
|
||||
<a name='L25'></a><a href='#L25'>25</a>
|
||||
<a name='L26'></a><a href='#L26'>26</a>
|
||||
<a name='L27'></a><a href='#L27'>27</a>
|
||||
<a name='L28'></a><a href='#L28'>28</a>
|
||||
<a name='L29'></a><a href='#L29'>29</a>
|
||||
<a name='L30'></a><a href='#L30'>30</a>
|
||||
<a name='L31'></a><a href='#L31'>31</a>
|
||||
<a name='L32'></a><a href='#L32'>32</a>
|
||||
<a name='L33'></a><a href='#L33'>33</a>
|
||||
<a name='L34'></a><a href='#L34'>34</a>
|
||||
<a name='L35'></a><a href='#L35'>35</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">28x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">14x</span>
|
||||
<span class="cline-any cline-yes">28x</span>
|
||||
<span class="cline-any cline-yes">28x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">26x</span>
|
||||
<span class="cline-any cline-yes">9x</span>
|
||||
<span class="cline-any cline-yes">9x</span>
|
||||
<span class="cline-any cline-yes">26x</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-yes">26x</span>
|
||||
<span class="cline-any cline-yes">26x</span>
|
||||
<span class="cline-any cline-yes">26x</span>
|
||||
<span class="cline-any cline-yes">26x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">25x</span>
|
||||
<span class="cline-any cline-yes">25x</span>
|
||||
<span class="cline-any cline-yes">25x</span>
|
||||
<span class="cline-any cline-yes">25x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">
|
||||
import Defaults from './Defaults.js';
|
||||
|
||||
class Parser{
|
||||
constructor(config){
|
||||
if(!config){
|
||||
config=new Defaults;
|
||||
}
|
||||
this.delimiter=config.delimiter;
|
||||
}
|
||||
|
||||
format(message){
|
||||
if(!message.data && message.data!==false && message.data!==0){
|
||||
message.data={};
|
||||
}
|
||||
if(message.data['_maxListeners'])<span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
||||
<span class="cstat-no" title="statement not covered" > message.data={};</span>
|
||||
<span class="cstat-no" title="statement not covered" > }</span>
|
||||
|
||||
message=message.JSON+this.delimiter;
|
||||
return message;
|
||||
}
|
||||
|
||||
parse(data){
|
||||
let events=data.split(this.delimiter);
|
||||
events.pop();
|
||||
return events;
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
Parser as default,
|
||||
Parser
|
||||
};
|
||||
</pre></td></tr></table></pre>
|
||||
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:27 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/entities</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> node-ipc/entities</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">93% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>93/100</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">75% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>12/16</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>6/6</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">93% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>93/100</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file high" data-value="Defaults.js"><a href="Defaults.js.html">Defaults.js</a></td>
|
||||
<td data-value="92.42" 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.42" class="pct high">92.42%</td>
|
||||
<td data-value="66" class="abs high">61/66</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="3" class="abs high">3/3</td>
|
||||
<td data-value="92.42" class="pct high">92.42%</td>
|
||||
<td data-value="66" class="abs high">61/66</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="file high" data-value="EventParser.js"><a href="EventParser.js.html">EventParser.js</a></td>
|
||||
<td data-value="94.12" class="pic high">
|
||||
<div class="chart"><div class="cover-fill" style="width: 94%"></div><div class="cover-empty" style="width: 6%"></div></div>
|
||||
</td>
|
||||
<td data-value="94.12" class="pct high">94.12%</td>
|
||||
<td data-value="34" class="abs high">32/34</td>
|
||||
<td data-value="88.89" class="pct high">88.89%</td>
|
||||
<td data-value="9" class="abs high">8/9</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="3" class="abs high">3/3</td>
|
||||
<td data-value="94.12" class="pct high">94.12%</td>
|
||||
<td data-value="34" class="abs high">32/34</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:27 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/helpers/delay.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> / <a href="index.html">node-ipc/helpers</a> delay.js</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>12/12</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>3/3</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>1/1</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>12/12</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">10x</span>
|
||||
<span class="cline-any cline-yes">10x</span>
|
||||
<span class="cline-any cline-yes">10x</span>
|
||||
<span class="cline-any cline-yes">10x</span>
|
||||
<span class="cline-any cline-yes">10x</span>
|
||||
<span class="cline-any cline-yes">10x</span>
|
||||
<span class="cline-any cline-yes">10x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span>
|
||||
<span class="cline-any cline-yes">1x</span></td><td class="text"><pre class="prettyprint lang-js">async function delay(ms=100) {
|
||||
return new Promise(
|
||||
resolve => {
|
||||
setTimeout(resolve, ms);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export {
|
||||
delay as default,
|
||||
delay
|
||||
}</pre></td></tr></table></pre>
|
||||
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:27 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/helpers</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> node-ipc/helpers</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>12/12</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>3/3</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>1/1</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>12/12</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file high" data-value="delay.js"><a href="delay.js.html">delay.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="100" class="pct high">100%</td>
|
||||
<td data-value="12" class="abs high">12/12</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="3" class="abs high">3/3</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="12" class="abs high">12/12</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:27 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../prettify.css" />
|
||||
<link rel="stylesheet" href="../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../index.html">All files</a> node-ipc</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>17/17</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>3/3</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>2/2</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>17/17</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file high" data-value="node-ipc.js"><a href="node-ipc.js.html">node-ipc.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="100" class="pct high">100%</td>
|
||||
<td data-value="17" class="abs high">17/17</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="3" class="abs high">3/3</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="2" class="abs high">2/2</td>
|
||||
<td data-value="100" class="pct high">100%</td>
|
||||
<td data-value="17" class="abs high">17/17</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:27 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../sorter.js"></script>
|
||||
<script src="../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,131 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/node-ipc.js</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../prettify.css" />
|
||||
<link rel="stylesheet" href="../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../index.html">All files</a> / <a href="index.html">node-ipc</a> node-ipc.js</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>17/17</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>3/3</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>2/2</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>17/17</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a>
|
||||
<a name='L13'></a><a href='#L13'>13</a>
|
||||
<a name='L14'></a><a href='#L14'>14</a>
|
||||
<a name='L15'></a><a href='#L15'>15</a>
|
||||
<a name='L16'></a><a href='#L16'>16</a>
|
||||
<a name='L17'></a><a href='#L17'>17</a>
|
||||
<a name='L18'></a><a href='#L18'>18</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">15x</span>
|
||||
<span class="cline-any cline-yes">15x</span>
|
||||
<span class="cline-any cline-yes">15x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-yes">7x</span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import IPC from './services/IPC.js';
|
||||
|
||||
class IPCModule extends IPC{
|
||||
constructor(){
|
||||
super();
|
||||
|
||||
}
|
||||
|
||||
IPC=IPC;
|
||||
}
|
||||
|
||||
const singleton=new IPCModule;
|
||||
|
||||
export {
|
||||
singleton as default,
|
||||
IPCModule
|
||||
}
|
||||
</pre></td></tr></table></pre>
|
||||
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:27 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../sorter.js"></script>
|
||||
<script src="../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,111 +0,0 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Code coverage report for node-ipc/services</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1><a href="../../index.html">All files</a> node-ipc/services</h1>
|
||||
<div class='clearfix'>
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">74.48% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>251/337</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">64% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>32/50</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">66.67% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>14/21</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">74.48% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>251/337</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line medium'></div>
|
||||
<div class="pad1">
|
||||
<table class="coverage-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td class="file medium" data-value="IPC.js"><a href="IPC.js.html">IPC.js</a></td>
|
||||
<td data-value="74.48" class="pic medium">
|
||||
<div class="chart"><div class="cover-fill" style="width: 74%"></div><div class="cover-empty" style="width: 26%"></div></div>
|
||||
</td>
|
||||
<td data-value="74.48" class="pct medium">74.48%</td>
|
||||
<td data-value="337" class="abs medium">251/337</td>
|
||||
<td data-value="64" class="pct medium">64%</td>
|
||||
<td data-value="50" class="abs medium">32/50</td>
|
||||
<td data-value="66.67" class="pct medium">66.67%</td>
|
||||
<td data-value="21" class="abs medium">14/21</td>
|
||||
<td data-value="74.48" class="pct medium">74.48%</td>
|
||||
<td data-value="337" class="abs medium">251/337</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage generated by
|
||||
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||
at Wed Jul 07 2021 13:15:27 GMT-0700 (Pacific Daylight Time)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
prettyPrint();
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1 +0,0 @@
|
|||
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 209 B |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
140
dao/client.js
140
dao/client.js
|
@ -1,32 +1,27 @@
|
|||
import net from 'net';
|
||||
import tls from 'tls';
|
||||
import EventParser from '../entities/EventParser.js';
|
||||
import Message from 'js-message';
|
||||
import fs from 'fs';
|
||||
import Queue from 'js-queue';
|
||||
import Events from 'event-pubsub';
|
||||
'use strict';
|
||||
|
||||
let eventParser = new EventParser();
|
||||
const net = require('net'),
|
||||
tls = require('tls'),
|
||||
eventParser = require('./eventParser.js'),
|
||||
Pubsub = require('event-pubsub'),
|
||||
Message = require('js-message'),
|
||||
fs = require('fs'),
|
||||
Queue = require('js-queue');
|
||||
|
||||
class Client extends Events{
|
||||
constructor(config,log){
|
||||
super();
|
||||
this.config=config;
|
||||
this.log=log;
|
||||
this.publish=super.emit;
|
||||
|
||||
(config.maxRetries)? this.retriesRemaining=config.maxRetries:0;
|
||||
function init(config,log){
|
||||
let client={
|
||||
config : config,
|
||||
queue : new Queue,
|
||||
socket : false,
|
||||
connect : connect,
|
||||
emit : emit,
|
||||
log : log,
|
||||
retriesRemaining:config.maxRetries||0
|
||||
};
|
||||
|
||||
eventParser=new EventParser(this.config);
|
||||
}
|
||||
new Pubsub(client);
|
||||
|
||||
Client=Client;
|
||||
queue =new Queue;
|
||||
socket=false;
|
||||
connect=connect;
|
||||
emit=emit;
|
||||
retriesRemaining=0;
|
||||
explicitlyDisconnected=false;
|
||||
return client;
|
||||
}
|
||||
|
||||
function emit(type,data){
|
||||
|
@ -37,18 +32,16 @@ function emit(type,data){
|
|||
message.data=data;
|
||||
|
||||
if(this.config.rawBuffer){
|
||||
message=Buffer.from(type,this.config.encoding);
|
||||
message=new Buffer(type,this.config.encoding);
|
||||
}else{
|
||||
message=eventParser.format(message);
|
||||
}
|
||||
|
||||
//volitile emit
|
||||
if(!this.config.sync){
|
||||
this.socket.write(message);
|
||||
return;
|
||||
}
|
||||
|
||||
//sync, non-volitile, ack emit
|
||||
this.queue.add(
|
||||
syncEmit.bind(this,message)
|
||||
);
|
||||
|
@ -69,47 +62,30 @@ function connect(){
|
|||
return;
|
||||
}
|
||||
|
||||
const options={};
|
||||
|
||||
if(!client.port){
|
||||
client.log('Connecting client on Unix Socket :', client.path);
|
||||
|
||||
options.path=client.path;
|
||||
let path = client.path;
|
||||
|
||||
if (process.platform ==='win32' && !client.path.startsWith('\\\\.\\pipe\\')){
|
||||
options.path = options.path.replace(/^\//, '');
|
||||
options.path = options.path.replace(/\//g, '-');
|
||||
options.path= `\\\\.\\pipe\\${options.path}`;
|
||||
path = path.replace(/^\//, '');
|
||||
path = path.replace(/\//g, '-');
|
||||
path= `\\\\.\\pipe\\${path}`;
|
||||
}
|
||||
|
||||
client.socket = net.connect(options);
|
||||
client.socket = net.connect(
|
||||
{
|
||||
path: path
|
||||
}
|
||||
);
|
||||
}else{
|
||||
options.host=client.path;
|
||||
options.port=client.port;
|
||||
|
||||
if(client.config.interface.localAddress){
|
||||
options.localAddress=client.config.interface.localAddress;
|
||||
}
|
||||
|
||||
if(client.config.interface.localPort){
|
||||
options.localPort=client.config.interface.localPort;
|
||||
}
|
||||
|
||||
if(client.config.interface.family){
|
||||
options.family=client.config.interface.family;
|
||||
}
|
||||
|
||||
if(client.config.interface.hints){
|
||||
options.hints=client.config.interface.hints;
|
||||
}
|
||||
|
||||
if(client.config.interface.lookup){
|
||||
options.lookup=client.config.interface.lookup;
|
||||
}
|
||||
|
||||
if(!client.config.tls){
|
||||
client.log('Connecting client via TCP to', options);
|
||||
client.socket = net.connect(options);
|
||||
client.log('Connecting client via TCP to', client.path ,client.port);
|
||||
client.socket = net.connect(
|
||||
{
|
||||
port:client.port,
|
||||
host:client.path
|
||||
}
|
||||
);
|
||||
}else{
|
||||
client.log('Connecting client via TLS to', client.path ,client.port,client.config.tls);
|
||||
if(client.config.tls.private){
|
||||
|
@ -130,7 +106,8 @@ function connect(){
|
|||
}
|
||||
}
|
||||
|
||||
Object.assign(client.config.tls,options);
|
||||
client.config.tls.host=client.path;
|
||||
client.config.tls.port=client.port;
|
||||
|
||||
client.socket = tls.connect(
|
||||
client.config.tls
|
||||
|
@ -144,7 +121,7 @@ function connect(){
|
|||
'error',
|
||||
function(err){
|
||||
client.log('\n\n######\nerror: ', err);
|
||||
client.publish('error', err);
|
||||
client.trigger('error', err);
|
||||
|
||||
}
|
||||
);
|
||||
|
@ -152,7 +129,7 @@ function connect(){
|
|||
client.socket.on(
|
||||
'connect',
|
||||
function connectionMade(){
|
||||
client.publish('connect');
|
||||
client.trigger('connect');
|
||||
client.retriesRemaining=client.config.maxRetries;
|
||||
client.log('retrying reset');
|
||||
}
|
||||
|
@ -166,12 +143,10 @@ function connect(){
|
|||
);
|
||||
|
||||
if(
|
||||
client.config.stopRetrying ||
|
||||
client.retriesRemaining<1 ||
|
||||
client.explicitlyDisconnected
|
||||
client.config.stopRetrying || client.retriesRemaining<1
|
||||
|
||||
){
|
||||
client.publish('disconnect');
|
||||
client.trigger('disconnect');
|
||||
client.log(
|
||||
(client.config.id),
|
||||
'exceeded connection rety amount of',
|
||||
|
@ -179,24 +154,32 @@ function connect(){
|
|||
);
|
||||
|
||||
client.socket.destroy();
|
||||
client.publish('destroy');
|
||||
client.trigger('destroy');
|
||||
client=undefined;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
client.isRetrying=true;
|
||||
|
||||
setTimeout(
|
||||
function retryTimeout(){
|
||||
if (client.explicitlyDisconnected) {
|
||||
return;
|
||||
}
|
||||
client.retriesRemaining--;
|
||||
client.isRetrying=false;
|
||||
client.connect();
|
||||
setTimeout(
|
||||
function resetRetriesCheck(){
|
||||
if(!client.isRetrying){
|
||||
client.retriesRemaining=client.config.maxRetries;
|
||||
}
|
||||
},
|
||||
100
|
||||
);
|
||||
}.bind(null,client),
|
||||
client.config.retry
|
||||
);
|
||||
|
||||
client.publish('disconnect');
|
||||
client.trigger('disconnect');
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -205,9 +188,9 @@ function connect(){
|
|||
function(data) {
|
||||
client.log('## received events ##');
|
||||
if(client.config.rawBuffer){
|
||||
client.publish(
|
||||
client.trigger(
|
||||
'data',
|
||||
Buffer.from(data,client.config.encoding)
|
||||
new Buffer(data,client.config.encoding)
|
||||
);
|
||||
if(!client.config.sync){
|
||||
return;
|
||||
|
@ -237,7 +220,7 @@ function connect(){
|
|||
message.load(events[i]);
|
||||
|
||||
client.log('detected event', message.type, message.data);
|
||||
client.publish(
|
||||
client.trigger(
|
||||
message.type,
|
||||
message.data
|
||||
);
|
||||
|
@ -252,7 +235,4 @@ function connect(){
|
|||
);
|
||||
}
|
||||
|
||||
export {
|
||||
Client as default,
|
||||
Client
|
||||
};
|
||||
module.exports=init;
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
'use strict';
|
||||
|
||||
const parser={
|
||||
parse : parseDataEvents,
|
||||
format : formatData,
|
||||
delimiter : '\f'
|
||||
};
|
||||
|
||||
function formatData(message){
|
||||
if(!message.data && message.data!==false && message.data!==0){
|
||||
message.data={};
|
||||
}
|
||||
if(message.data['_maxListeners']){
|
||||
message.data={};
|
||||
}
|
||||
|
||||
message=message.JSON+parser.delimiter;
|
||||
return message;
|
||||
}
|
||||
|
||||
function parseDataEvents(data){
|
||||
let events=data.split(parser.delimiter);
|
||||
events.pop();
|
||||
return events;
|
||||
}
|
||||
|
||||
module.exports=parser;
|
|
@ -1,66 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
import net from 'net';
|
||||
import tls from 'tls';
|
||||
import fs from 'fs';
|
||||
import dgram from 'dgram';
|
||||
import EventParser from '../entities/EventParser.js';
|
||||
import Message from 'js-message';
|
||||
import Events from 'event-pubsub';
|
||||
|
||||
let eventParser = new EventParser();
|
||||
|
||||
class Server extends Events{
|
||||
constructor(path,config,log,port){
|
||||
super();
|
||||
this.config = config;
|
||||
this.path = path;
|
||||
this.port = port;
|
||||
this.log = log;
|
||||
|
||||
this.publish=super.emit;
|
||||
|
||||
eventParser=new EventParser(this.config);
|
||||
|
||||
this.on(
|
||||
'close',
|
||||
serverClosed.bind(this)
|
||||
);
|
||||
}
|
||||
|
||||
udp4=false;
|
||||
udp6=false;
|
||||
server=false;
|
||||
sockets=[];
|
||||
emit=emit;
|
||||
broadcast=broadcast;
|
||||
|
||||
onStart(socket){
|
||||
this.publish(
|
||||
'start',
|
||||
socket
|
||||
);
|
||||
}
|
||||
|
||||
stop(){
|
||||
this.server.close();
|
||||
}
|
||||
|
||||
start(){
|
||||
if(!this.path){
|
||||
this.log('Socket Server Path not specified, refusing to start');
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.config.unlink){
|
||||
fs.unlink(
|
||||
this.path,
|
||||
startServer.bind(this)
|
||||
);
|
||||
}else{
|
||||
startServer.bind(this)();
|
||||
}
|
||||
}
|
||||
}
|
||||
const net = require('net'),
|
||||
tls = require('tls'),
|
||||
fs = require('fs'),
|
||||
dgram = require('dgram'),
|
||||
eventParser = require('./eventParser.js'),
|
||||
Pubsub = require('event-pubsub'),
|
||||
Message = require('js-message');
|
||||
|
||||
function emit(socket, type, data){
|
||||
this.log('dispatching event to socket', ' : ', type, data);
|
||||
|
@ -70,8 +16,8 @@ function emit(socket, type, data){
|
|||
message.data=data;
|
||||
|
||||
if(this.config.rawBuffer){
|
||||
this.log(this.config.encoding)
|
||||
message=Buffer.from(type,this.config.encoding);
|
||||
console.log(this.config.encoding)
|
||||
message=new Buffer(type,this.config.encoding);
|
||||
}else{
|
||||
message=eventParser.format(message);
|
||||
}
|
||||
|
@ -90,7 +36,7 @@ function emit(socket, type, data){
|
|||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
socket.write(message);
|
||||
}
|
||||
|
||||
|
@ -101,7 +47,7 @@ function broadcast(type,data){
|
|||
message.data=data;
|
||||
|
||||
if(this.config.rawBuffer){
|
||||
message=Buffer.from(type,this.config.encoding);
|
||||
message=new Buffer(type,this.config.encoding);
|
||||
}else{
|
||||
message=eventParser.format(message);
|
||||
}
|
||||
|
@ -117,283 +63,312 @@ function broadcast(type,data){
|
|||
}
|
||||
}
|
||||
|
||||
function serverClosed(){
|
||||
for(let i=0, count=this.sockets.length; i<count; i++){
|
||||
let socket=this.sockets[i];
|
||||
let destroyedSocketId=false;
|
||||
|
||||
if(socket){
|
||||
if(socket.readable){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(socket.id){
|
||||
destroyedSocketId=socket.id;
|
||||
}
|
||||
|
||||
this.log('socket disconnected',destroyedSocketId.toString());
|
||||
|
||||
if(socket && socket.destroy){
|
||||
socket.destroy();
|
||||
}
|
||||
|
||||
this.sockets.splice(i,1);
|
||||
|
||||
this.publish('socket.disconnected', socket, destroyedSocketId);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function gotData(socket,data,UDPSocket){
|
||||
let sock=((this.udp4 || this.udp6)? UDPSocket : socket);
|
||||
if(this.config.rawBuffer){
|
||||
data=Buffer.from(data,this.config.encoding);
|
||||
this.publish(
|
||||
'data',
|
||||
data,
|
||||
sock
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!sock.ipcBuffer){
|
||||
sock.ipcBuffer='';
|
||||
}
|
||||
|
||||
data=(sock.ipcBuffer+=data);
|
||||
|
||||
if(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1){
|
||||
this.log('Messages are large, You may want to consider smaller messages.');
|
||||
return;
|
||||
}
|
||||
|
||||
sock.ipcBuffer='';
|
||||
|
||||
data=eventParser.parse(data);
|
||||
|
||||
while(data.length>0){
|
||||
let message=new Message;
|
||||
message.load(data.shift());
|
||||
|
||||
// Only set the sock id if it is specified.
|
||||
if (message.data && message.data.id){
|
||||
sock.id=message.data.id;
|
||||
}
|
||||
|
||||
this.log('received event of : ',message.type,message.data);
|
||||
|
||||
this.publish(
|
||||
message.type,
|
||||
message.data,
|
||||
sock
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function socketClosed(socket){
|
||||
this.publish(
|
||||
'close',
|
||||
socket
|
||||
);
|
||||
}
|
||||
|
||||
function serverCreated(socket) {
|
||||
this.sockets.push(socket);
|
||||
|
||||
if(socket.setEncoding){
|
||||
socket.setEncoding(this.config.encoding);
|
||||
}
|
||||
|
||||
this.log('## socket connection to server detected ##');
|
||||
socket.on(
|
||||
'close',
|
||||
socketClosed.bind(this)
|
||||
);
|
||||
|
||||
socket.on(
|
||||
'error',
|
||||
function(err){
|
||||
this.log('server socket error',err);
|
||||
|
||||
this.publish('error',err);
|
||||
}.bind(this)
|
||||
);
|
||||
|
||||
socket.on(
|
||||
'data',
|
||||
gotData.bind(this,socket)
|
||||
);
|
||||
|
||||
socket.on(
|
||||
'message',
|
||||
function(msg,rinfo) {
|
||||
if (!rinfo){
|
||||
function init(path,config,log,port){
|
||||
let server={
|
||||
config : config,
|
||||
path : path,
|
||||
port : port,
|
||||
udp4 : false,
|
||||
udp6 : false,
|
||||
log : log,
|
||||
server : false,
|
||||
sockets : [],
|
||||
emit : emit,
|
||||
broadcast : broadcast,
|
||||
onStart : function onStart(socket){
|
||||
this.trigger(
|
||||
'start',
|
||||
socket
|
||||
);
|
||||
},
|
||||
stop:function stop(){
|
||||
server.server.close();
|
||||
},
|
||||
start : function start(){
|
||||
if(!this.path){
|
||||
server.log('Socket Server Path not specified, refusing to start');
|
||||
return;
|
||||
}
|
||||
|
||||
this.log('Received UDP message from ', rinfo.address, rinfo.port);
|
||||
let data;
|
||||
fs.unlink(
|
||||
this.path,
|
||||
function () {
|
||||
server.log(
|
||||
'starting server on ',server.path,
|
||||
((server.port)?`:${server.port}`:'')
|
||||
);
|
||||
|
||||
if(this.config.rawSocket){
|
||||
data=Buffer.from(msg,this.config.encoding);
|
||||
}else{
|
||||
data=msg.toString();
|
||||
}
|
||||
socket.emit('data',data,rinfo);
|
||||
}.bind(this)
|
||||
);
|
||||
if(!server.udp4 && !server.udp6){
|
||||
if(!server.config.tls){
|
||||
server.server=net.createServer(
|
||||
serverCreated
|
||||
);
|
||||
}else{
|
||||
server.log('starting TLS server',server.config.tls);
|
||||
if(server.config.tls.private){
|
||||
server.config.tls.key=fs.readFileSync(server.config.tls.private);
|
||||
}else{
|
||||
server.config.tls.key=fs.readFileSync(`${__dirname}/../local-node-ipc-certs/private/server.key`);
|
||||
}
|
||||
if(server.config.tls.public){
|
||||
server.config.tls.cert=fs.readFileSync(server.config.tls.public);
|
||||
}else{
|
||||
server.config.tls.cert=fs.readFileSync(`${__dirname}/../local-node-ipc-certs/server.pub`);
|
||||
}
|
||||
if(server.config.tls.dhparam){
|
||||
server.config.tls.dhparam=fs.readFileSync(server.config.tls.dhparam);
|
||||
}
|
||||
if(server.config.tls.trustedConnections){
|
||||
if(typeof server.config.tls.trustedConnections === 'string'){
|
||||
server.config.tls.trustedConnections=[server.config.tls.trustedConnections];
|
||||
}
|
||||
server.config.tls.ca=[];
|
||||
for(let i=0; i<server.config.tls.trustedConnections.length; i++){
|
||||
server.config.tls.ca.push(
|
||||
fs.readFileSync(server.config.tls.trustedConnections[i])
|
||||
);
|
||||
}
|
||||
}
|
||||
server.server=tls.createServer(
|
||||
server.config.tls,
|
||||
serverCreated
|
||||
);
|
||||
}
|
||||
}else{
|
||||
function UDPWrite(message,socket){
|
||||
let data=new Buffer(message, server.config.encoding);
|
||||
server.server.send(
|
||||
data,
|
||||
0,
|
||||
data.length,
|
||||
socket.port,
|
||||
socket.address,
|
||||
function(err, bytes) {
|
||||
if(err){
|
||||
server.log('error writing data to socket',err);
|
||||
server.trigger(
|
||||
'error',
|
||||
function(err){
|
||||
server.trigger('error',err);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
this.publish(
|
||||
'connect',
|
||||
socket
|
||||
);
|
||||
|
||||
if(this.config.rawBuffer){
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function startServer() {
|
||||
this.log(
|
||||
'starting server on ',this.path,
|
||||
((this.port)?`:${this.port}`:'')
|
||||
);
|
||||
|
||||
if(!this.udp4 && !this.udp6){
|
||||
this.log('starting TLS server',this.config.tls);
|
||||
if(!this.config.tls){
|
||||
this.server=net.createServer(
|
||||
serverCreated.bind(this)
|
||||
);
|
||||
}else{
|
||||
startTLSServer.bind(this)();
|
||||
}
|
||||
}else{
|
||||
this.server=dgram.createSocket(
|
||||
((this.udp4)? 'udp4':'udp6')
|
||||
);
|
||||
this.server.write=UDPWrite.bind(this);
|
||||
this.server.on(
|
||||
'listening',
|
||||
function UDPServerStarted() {
|
||||
serverCreated.bind(this)(this.server);
|
||||
}.bind(this)
|
||||
);
|
||||
}
|
||||
|
||||
this.server.on(
|
||||
'error',
|
||||
function(err){
|
||||
this.log('server error',err);
|
||||
|
||||
this.publish(
|
||||
'error',
|
||||
err
|
||||
);
|
||||
}.bind(this)
|
||||
);
|
||||
|
||||
this.server.maxConnections=this.config.maxConnections;
|
||||
|
||||
if(!this.port){
|
||||
this.log('starting server as', 'Unix || Windows Socket');
|
||||
if (process.platform ==='win32'){
|
||||
this.path = this.path.replace(/^\//, '');
|
||||
this.path = this.path.replace(/\//g, '-');
|
||||
this.path= `\\\\.\\pipe\\${this.path}`;
|
||||
}
|
||||
|
||||
this.server.listen({
|
||||
path: this.path,
|
||||
readableAll: this.config.readableAll,
|
||||
writableAll: this.config.writableAll
|
||||
}, this.onStart.bind(this));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(!this.udp4 && !this.udp6){
|
||||
this.log('starting server as', (this.config.tls?'TLS':'TCP'));
|
||||
this.server.listen(
|
||||
this.port,
|
||||
this.path,
|
||||
this.onStart.bind(this)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
this.log('starting server as',((this.udp4)? 'udp4':'udp6'));
|
||||
|
||||
this.server.bind(
|
||||
this.port,
|
||||
this.path
|
||||
);
|
||||
|
||||
this.onStart(
|
||||
{
|
||||
address : this.path,
|
||||
port : this.port
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function startTLSServer(){
|
||||
this.log('starting TLS server',this.config.tls);
|
||||
if(this.config.tls.private){
|
||||
this.config.tls.key=fs.readFileSync(this.config.tls.private);
|
||||
}else{
|
||||
this.config.tls.key=fs.readFileSync(`${__dirname}/../local-node-ipc-certs/private/server.key`);
|
||||
}
|
||||
if(this.config.tls.public){
|
||||
this.config.tls.cert=fs.readFileSync(this.config.tls.public);
|
||||
}else{
|
||||
this.config.tls.cert=fs.readFileSync(`${__dirname}/../local-node-ipc-certs/server.pub`);
|
||||
}
|
||||
if(this.config.tls.dhparam){
|
||||
this.config.tls.dhparam=fs.readFileSync(this.config.tls.dhparam);
|
||||
}
|
||||
if(this.config.tls.trustedConnections){
|
||||
if(typeof this.config.tls.trustedConnections === 'string'){
|
||||
this.config.tls.trustedConnections=[this.config.tls.trustedConnections];
|
||||
}
|
||||
this.config.tls.ca=[];
|
||||
for(let i=0; i<this.config.tls.trustedConnections.length; i++){
|
||||
this.config.tls.ca.push(
|
||||
fs.readFileSync(this.config.tls.trustedConnections[i])
|
||||
);
|
||||
}
|
||||
}
|
||||
this.server=tls.createServer(
|
||||
this.config.tls,
|
||||
serverCreated.bind(this)
|
||||
);
|
||||
}
|
||||
|
||||
function UDPWrite(message,socket){
|
||||
let data=Buffer.from(message, this.config.encoding);
|
||||
this.server.send(
|
||||
data,
|
||||
0,
|
||||
data.length,
|
||||
socket.port,
|
||||
socket.address,
|
||||
function(err, bytes) {
|
||||
if(err){
|
||||
this.log('error writing data to socket',err);
|
||||
this.publish(
|
||||
'error',
|
||||
function(err){
|
||||
this.publish('error',err);
|
||||
server.server=dgram.createSocket(
|
||||
((server.udp4)? 'udp4':'udp6')
|
||||
);
|
||||
server.server.write=UDPWrite;
|
||||
server.server.on(
|
||||
'listening',
|
||||
function () {
|
||||
serverCreated(server.server);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
server.server.on(
|
||||
'error',
|
||||
function(err){
|
||||
server.log('server error',err);
|
||||
|
||||
server.trigger(
|
||||
'error',
|
||||
err
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
server.server.maxConnections=server.config.maxConnections;
|
||||
|
||||
function serverCreated(socket) {
|
||||
server.sockets.push(socket);
|
||||
|
||||
if(socket.setEncoding){
|
||||
socket.setEncoding(server.config.encoding);
|
||||
}
|
||||
|
||||
server.log('## socket connection to server detected ##');
|
||||
socket.on(
|
||||
'close',
|
||||
function(socket){
|
||||
server.trigger(
|
||||
'close',
|
||||
socket
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
socket.on(
|
||||
'error',
|
||||
function(err){
|
||||
server.log('server socket error',err);
|
||||
|
||||
server.trigger('error',err);
|
||||
}
|
||||
);
|
||||
|
||||
socket.on(
|
||||
'data',
|
||||
function(data,UDPSocket){
|
||||
let sock=((server.udp4 || server.udp6)? UDPSocket : socket);
|
||||
if(server.config.rawBuffer){
|
||||
data=new Buffer(data,server.config.encoding);
|
||||
server.trigger(
|
||||
'data',
|
||||
data,
|
||||
sock
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!this.ipcBuffer){
|
||||
this.ipcBuffer='';
|
||||
}
|
||||
|
||||
data=(this.ipcBuffer+=data);
|
||||
|
||||
if(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1){
|
||||
server.log('Messages are large, You may want to consider smaller messages.');
|
||||
return;
|
||||
}
|
||||
|
||||
this.ipcBuffer='';
|
||||
|
||||
data=eventParser.parse(data);
|
||||
|
||||
while(data.length>0){
|
||||
let message=new Message;
|
||||
message.load(data.shift());
|
||||
|
||||
server.log('received event of : ',message.type,message.data);
|
||||
|
||||
if(message.data.id){
|
||||
sock.id=message.data.id;
|
||||
}
|
||||
|
||||
server.trigger(
|
||||
message.type,
|
||||
message.data,
|
||||
sock
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
socket.on(
|
||||
'message',
|
||||
function(msg,rinfo) {
|
||||
if (!rinfo){
|
||||
return;
|
||||
}
|
||||
|
||||
server.log('Received UDP message from ', rinfo.address, rinfo.port);
|
||||
let data;
|
||||
|
||||
if(server.config.rawSocket){
|
||||
data=new Buffer(msg,server.config.encoding);
|
||||
}else{
|
||||
data=msg.toString();
|
||||
}
|
||||
socket.emit('data',data,rinfo);
|
||||
}
|
||||
);
|
||||
|
||||
server.trigger(
|
||||
'connect',
|
||||
socket
|
||||
);
|
||||
|
||||
if(server.config.rawBuffer){
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function started(socket){
|
||||
server.onStart(socket);
|
||||
}
|
||||
|
||||
if(!port){
|
||||
server.log('starting server as', 'Unix || Windows Socket');
|
||||
if (process.platform ==='win32'){
|
||||
server.path = server.path.replace(/^\//, '');
|
||||
server.path = server.path.replace(/\//g, '-');
|
||||
server.path= `\\\\.\\pipe\\${server.path}`;
|
||||
}
|
||||
|
||||
server.server.listen(
|
||||
server.path,
|
||||
started
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(!server.udp4 && !server.udp6){
|
||||
server.log('starting server as', (server.config.tls?'TLS':'TCP'));
|
||||
server.server.listen(
|
||||
server.port,
|
||||
server.path,
|
||||
started
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
server.log('starting server as',((server.udp4)? 'udp4':'udp6'));
|
||||
server.server.bind(
|
||||
server.port,
|
||||
server.path
|
||||
);
|
||||
|
||||
started(
|
||||
{
|
||||
address : server.path,
|
||||
port : server.port
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
new Pubsub(server);
|
||||
|
||||
server.on(
|
||||
'close',
|
||||
function(){
|
||||
for(let i=0, count=server.sockets.length; i<count; i++){
|
||||
let socket=server.sockets[i];
|
||||
let destroyedSocketId=false;
|
||||
|
||||
if(socket){
|
||||
if(socket.readable){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(socket.id){
|
||||
destroyedSocketId=socket.id;
|
||||
}
|
||||
|
||||
server.log('socket disconnected',destroyedSocketId.toString());
|
||||
|
||||
if(socket && socket.destroy){
|
||||
socket.destroy();
|
||||
}
|
||||
|
||||
server.sockets.splice(i,1);
|
||||
|
||||
server.trigger('socket.disconnected', socket, destroyedSocketId);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
return server;
|
||||
}
|
||||
|
||||
export {
|
||||
Server as default,
|
||||
Server
|
||||
};
|
||||
module.exports=init;
|
||||
|
|
|
@ -1,66 +1,104 @@
|
|||
import os from 'os';
|
||||
'use strict';
|
||||
|
||||
const os = require('os');
|
||||
|
||||
class Defaults{
|
||||
|
||||
constructor(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
appspace='app.';
|
||||
socketRoot='/tmp/';
|
||||
id=os.hostname();
|
||||
|
||||
encoding='utf8';
|
||||
rawBuffer=false;
|
||||
sync=false;
|
||||
unlink=true;
|
||||
|
||||
delimiter='\f';
|
||||
|
||||
silent=false;
|
||||
logDepth=5;
|
||||
logInColor=true;
|
||||
logger=console.log.bind(console);
|
||||
|
||||
maxConnections=100;
|
||||
retry=500;
|
||||
maxRetries=Infinity;
|
||||
stopRetrying=false;
|
||||
|
||||
IPType=getIPType();
|
||||
tls=false;
|
||||
networkHost = (this.IPType == 'IPv6') ? '::1' : '127.0.0.1';
|
||||
networkPort = 8000;
|
||||
|
||||
readableAll = false;
|
||||
writableAll = false;
|
||||
|
||||
interface={
|
||||
localAddress:false,
|
||||
localPort:false,
|
||||
family:false,
|
||||
hints:false,
|
||||
lookup:false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getIPType() {
|
||||
const networkInterfaces = os.networkInterfaces();
|
||||
let IPType = '';
|
||||
if (networkInterfaces
|
||||
&& Array.isArray(networkInterfaces)
|
||||
&& networkInterfaces.length > 0) {
|
||||
// getting the family of first network interface available
|
||||
IPType = networkInterfaces [
|
||||
Object.keys( networkInterfaces )[0]
|
||||
const IPType=os.networkInterfaces()[
|
||||
Object.keys(os.networkInterfaces())[0]
|
||||
][0].family;
|
||||
|
||||
Object.defineProperties(
|
||||
this,
|
||||
{
|
||||
appspace : {
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:'app.'
|
||||
},
|
||||
socketRoot : {
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:'/tmp/'
|
||||
},
|
||||
networkHost : {
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:(IPType=='IPv6')? '::1' : '127.0.0.1'
|
||||
},
|
||||
networkPort : {
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:8000
|
||||
},
|
||||
id : {
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:os.hostname()
|
||||
},
|
||||
encoding : {
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:'utf8'
|
||||
},
|
||||
rawBuffer : {
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:false
|
||||
},
|
||||
sync : {
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:false
|
||||
},
|
||||
silent : {
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:false
|
||||
},
|
||||
logDepth:{
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:5
|
||||
},
|
||||
logInColor:{
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:true
|
||||
},
|
||||
maxConnections : {
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:100
|
||||
},
|
||||
retry : {
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:500
|
||||
},
|
||||
maxRetries : {
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:Infinity
|
||||
},
|
||||
stopRetrying : {
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:false
|
||||
},
|
||||
IPType : {
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:IPType
|
||||
},
|
||||
tls : {
|
||||
enumerable:true,
|
||||
writable:true,
|
||||
value:false
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
return IPType;
|
||||
}
|
||||
|
||||
export {
|
||||
Defaults as default,
|
||||
Defaults
|
||||
}
|
||||
module.exports=Defaults;
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
|
||||
import Defaults from './Defaults.js';
|
||||
|
||||
class Parser{
|
||||
constructor(config){
|
||||
if(!config){
|
||||
config=new Defaults;
|
||||
}
|
||||
this.delimiter=config.delimiter;
|
||||
}
|
||||
|
||||
format(message){
|
||||
if(!message.data && message.data!==false && message.data!==0){
|
||||
message.data={};
|
||||
}
|
||||
if(message.data['_maxListeners']){
|
||||
message.data={};
|
||||
}
|
||||
|
||||
message=message.JSON+this.delimiter;
|
||||
return message;
|
||||
}
|
||||
|
||||
parse(data){
|
||||
let events=data.split(this.delimiter);
|
||||
events.pop();
|
||||
return events;
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
Parser as default,
|
||||
Parser
|
||||
};
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
*
|
||||
* You should start both hello and world
|
||||
* then you will see them communicating.
|
||||
*
|
||||
*
|
||||
* *************************************/
|
||||
|
||||
ipc.config.id = 'hello';
|
||||
|
@ -37,3 +37,5 @@ ipc.connectToNet(
|
|||
);
|
||||
}
|
||||
);
|
||||
|
||||
console.log(ipc);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
@ -28,7 +28,7 @@ ipc.serveNet(
|
|||
ipc.server.on(
|
||||
'socket.disconnected',
|
||||
function(data,socket){
|
||||
console.log('DISCONNECTED\n\n',arguments);
|
||||
console.log(arguments);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -6,14 +6,13 @@ Still working on this. If you look at the examples and can help, please jump rig
|
|||
#### important cli commands
|
||||
- openssl genrsa -out server.key 2048
|
||||
- openssl req -new -x509 -key server.key -out server.pub -days 365 -config openssl.cnf
|
||||
- openssl req -new -x509 -key client.key -out client.pub -days 365 -config openssl.cnf
|
||||
- talk about openssl.cnf edits
|
||||
|
||||
#### using the local node-ipc certs
|
||||
This should **ONLY** be done on your local machine. Both the public and private certs are available here on git hub, so its not a good idea to use them over the network.
|
||||
|
||||
#### talk about security
|
||||
- keep private keys private, don't share
|
||||
- keep private keys private, don't shared
|
||||
|
||||
#### talk about using hostname not ip for best security validation of certs
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
import fs from 'fs';
|
||||
import ipc from '../../node-ipc';
|
||||
|
||||
const socketPath = '/tmp/ipc.sock';
|
||||
|
||||
//loop forever so you can see the pid of the cluster sever change in the logs
|
||||
setInterval(
|
||||
function() {
|
||||
ipc.connectTo(
|
||||
'world',
|
||||
socketPath,
|
||||
connecting
|
||||
);
|
||||
},
|
||||
2000
|
||||
);
|
||||
|
||||
function connecting(socket) {
|
||||
ipc.of.world.on(
|
||||
'connect',
|
||||
function() {
|
||||
ipc.of.world.emit(
|
||||
'currentDate',
|
||||
{
|
||||
message: new Date().toISOString()
|
||||
}
|
||||
);
|
||||
ipc.disconnect('world');
|
||||
}
|
||||
);
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
import fs from 'fs';
|
||||
import {cpus} from 'os';
|
||||
import cluster from 'cluster';
|
||||
|
||||
const cpuCount=cpus().length;
|
||||
const socketPath = '/tmp/ipc.sock';
|
||||
|
||||
ipc.config.unlink = false;
|
||||
|
||||
if (cluster.isMaster) {
|
||||
if (fs.existsSync(socketPath)) {
|
||||
fs.unlinkSync(socketPath);
|
||||
}
|
||||
|
||||
for (let i = 0; i < cpuCount; i++) {
|
||||
cluster.fork();
|
||||
}
|
||||
}else{
|
||||
ipc.serve(
|
||||
socketPath,
|
||||
function() {
|
||||
ipc.server.on(
|
||||
'currentDate',
|
||||
function(data,socket) {
|
||||
console.log(`pid ${process.pid} got: `, data);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
ipc.server.start();
|
||||
console.log(`pid ${process.pid} listening on ${socketPath}`);
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
@ -20,7 +21,7 @@ ipc.connectTo(
|
|||
'connect',
|
||||
function(){
|
||||
//make a 6 byte buffer for example
|
||||
const myBuffer=Buffer.alloc(6).fill(0);
|
||||
const myBuffer=new Buffer(6).fill(0);
|
||||
|
||||
myBuffer.writeUInt16BE(0x02,0);
|
||||
myBuffer.writeUInt32BE(0xffeecc,2);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ipc from '../../../node-ipc.js';
|
||||
const ipc=require('../../../node-ipc');
|
||||
|
||||
/***************************************\
|
||||
*
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue