Compare commits

...

287 commits

Author SHA1 Message Date
Brandon Nozaki Miller 088a1ca4d5
Update README.md 2022-03-18 01:46:25 -07:00
Brandon Nozaki Miller b78969d045
Added sponsor badge 2021-12-10 15:27:38 -08:00
Brandon Nozaki Miller 9bbd515473
clarifying v10+ includes 2021-12-08 08:32:38 -08:00
Brandon Nozaki Miller 6f265d9cb0
clarified es6 vs commonjs import 2021-12-07 09:58:18 -08:00
Brandon Nozaki Miller 7a614ce9be
Merge pull request #219 from tripodsgames/cjs
V10 cjs compatibility.
2021-09-15 11:18:48 -07:00
tripodsgames 083546305f
Fix ESM and Commonjs compatibility. 2021-09-15 11:06:48 -03:00
André Antônio Posso da Silva 98c6fc8140
Update README.md
Improvements to README.
2021-09-15 10:54:49 -03:00
Brandon Nozaki Miller 486c3138d2
updating version for cjs support 2021-09-15 06:38:43 -07:00
tripodsgames 144178f021
Fixed deprecated prepublish script. 2021-09-14 21:31:03 -03:00
tripodsgames dfc8554352
Update gitignore. 2021-09-14 21:29:17 -03:00
tripodsgames 86292a2bab
Update readme. 2021-09-14 21:27:45 -03:00
tripodsgames de80f537ef
Set target to cjs. 2021-09-14 21:26:08 -03:00
tripodsgames ad4a033888
Use esbuild to build commonjs code. 2021-09-14 21:20:10 -03:00
Brandon Nozaki Miller 624625693e
Merge pull request #210 from Mirdukkk/master
fix(readme): fix typo
2021-07-28 17:13:11 -07:00
Mirdukkk 09ca809512
fix(readme): fix typo 2021-07-14 16:03:42 +03:00
Brandon a5939c1a8a prepping for 10.0.2 patch 2021-07-07 13:16:21 -07:00
Brandon ec0969ee83 merge prep for 10.0.2 patch pub 2021-07-07 13:13:45 -07:00
Brandon Nozaki Miller 2bacbd72f2 patch rev for slight change to main file 2021-07-07 20:11:27 +00:00
Brandon Nozaki Miller f35940636e updated cluster docs 2021-07-07 20:10:40 +00:00
Brandon Nozaki Miller 64fef8b3a5 fixing docs 2021-07-07 19:59:31 +00:00
Brandon Nozaki Miller dd7335a2c6
do not use coverage dir to determine language 2021-07-04 12:00:13 -07:00
Brandon Nozaki Miller 73cc089d54 fixed test file capitolization for linux systems 2021-07-04 16:23:34 +00:00
Brandon Nozaki Miller f89a1812ef capitolization od UDP files 2021-07-04 16:22:28 +00:00
Brandon Nozaki Miller 0a9d04099a spelling break so git will detect capitolization 2021-07-04 16:21:50 +00:00
Brandon 778bdee973 reducing NPM package size by excluding more dirs 2021-07-04 00:24:11 -07:00
Brandon 5d0a1ba10a prep for major release 2021-07-04 00:18:44 -07:00
Brandon 99a8db8832 unix/posix/win socket testing complete 2021-07-04 00:12:00 -07:00
Brandon facbc027d9 fixing lcov badge path 2021-07-03 22:49:54 -07:00
Brandon aa7206daba tcp & udp4 & 6 tests complete 2021-07-03 22:44:09 -07:00
Brandon 7da90e18f9 Basic TCP tests complete 2021-07-02 18:37:53 -07:00
Brandon 3a843badb4 migrating to ESM v10 2021-07-02 15:01:41 -07:00
Brandon a2f4c61362 migrating to ESM merging v9.2.1 2021-07-02 14:58:06 -07:00
Brandon Nozaki Miller 8f2d054564 rev patch 2021-07-02 21:45:17 +00:00
Brandon d48b268c6e migrating to ESM merging v9.2.1 2021-07-02 14:39:07 -07:00
Brandon f3458e7a7b migrating to ESM 2021-07-02 14:35:02 -07:00
Brandon Nozaki Miller 84dce1b4b2
Merge pull request #205 from si458/patch-1
set pipe read/write in variables
2021-07-02 14:34:10 -07:00
Simon Smith 74c7886968 set pipe read/write ability to variables 2021-07-02 21:10:01 +01:00
Brandon Nozaki Miller 90b6a414a2
Update FUNDING.yml 2021-07-01 19:30:06 -07:00
Brandon 83ee8b559c fixes #188 rev v9.2.0 2021-07-01 16:30:09 -07:00
Brandon Nozaki Miller 1bb8a3911f
patch for #199 2021-07-01 16:03:35 -07:00
Brandon Nozaki Miller a45a86873a
Delete appveyor.yml 2021-07-01 16:02:30 -07:00
Brandon Nozaki Miller 40278b101d
Delete .travis.yml 2021-07-01 16:02:19 -07:00
Brandon Nozaki Miller 3fdbb35e53
Merge pull request #200 from si458/patch-1
allow all users to access the pipe
2021-07-01 16:01:21 -07:00
Brandon Nozaki Miller 4a513eebad
Merge branch 'master' into patch-1 2021-07-01 15:52:17 -07:00
Brandon Nozaki Miller ade907b0af
Merge pull request #195 from ulivz/patch-1
chore: fix wrong hash
2021-07-01 15:50:49 -07:00
Brandon Nozaki Miller 97676a93a8
Merge pull request #192 from aghArdeshir/patch-1
omit extra table row from README.md IPC Events
2021-07-01 15:48:51 -07:00
Brandon Nozaki Miller 81a5be69e0
Merge branch 'master' into patch-1 2021-07-01 15:47:53 -07:00
Brandon Nozaki Miller cb51bb286e
Merge branch 'master' into patch-1 2021-07-01 15:46:26 -07:00
Brandon Nozaki Miller e228d446d4
Delete node.js.yml 2021-07-01 15:45:33 -07:00
Brandon Nozaki Miller 9afc5a344f
node.js action CI integration 2021-07-01 15:44:40 -07:00
Brandon Nozaki Miller 62f9f56929
Create node.js.yml
action CI
2021-07-01 15:43:10 -07:00
Simon Smith f0c64a8282
allow all users to access the pipe 2021-06-30 14:39:52 +01:00
ULIVZ 87abf2df48
chore: fix wrong hash 2021-05-28 00:13:18 +08:00
aghArdeshir fa41cd0428
omit extra table row from README.md IPC Events 2021-04-04 12:11:51 +04:30
Brandon 50c0ec6735 version rev for @tenbits pr #189 2021-02-26 09:15:41 -08:00
Brandon Nozaki Miller a335ce43e6
Merge pull request #189 from tenbits/fix/ignore-retry-when-disconnected
fix (client retry) check if explicitly disconnected
2021-02-26 09:07:55 -08:00
Alex Kit f483e3153a fix (client retry) check if explicitly disconnected 2021-02-26 11:07:03 +01:00
Brandon Nozaki Miller c82afb34b5
Travis UDP6 not supported on linux, not even on loopback ::1 Super annoying. Will need to find a way to make this work or another CI 2021-02-23 23:19:05 -08:00
Brandon Nozaki Miller 2d1dbfddac
Travis is annoyingly unable to handle UDP6 sockets in linux newer than trusty. 2021-02-23 23:09:46 -08:00
Brandon Nozaki Miller 01cf29472b
trying to update to focal because xenial does not support ipv6 2021-02-23 23:05:48 -08:00
Brandon Nozaki Miller 2151caf3ee
fixing language generated syntax 2021-02-23 22:44:57 -08:00
Brandon 60b69dcd65 Merge branch 'master' of github.com:RIAEvangelist/node-ipc into master 2021-02-23 22:43:25 -08:00
Brandon 91f1f75c47 adding git attributes file to fix incorrect language of package 2021-02-23 22:43:06 -08:00
Brandon Nozaki Miller 7487c936fa
adding support for github funding.
It would be a super big help if I had even just a couple sponsors
2021-01-09 17:31:24 -08:00
Brandon Nozaki Miller bb32062841
Need to sign up for sponsorships before this works. 2021-01-09 13:19:08 -08:00
Brandon Nozaki Miller 33d9853f59
Update FUNDING.yml 2021-01-09 13:17:16 -08:00
Brandon Nozaki Miller 5023e6cb43
Create FUNDING.yml 2021-01-09 13:16:33 -08:00
Brandon Nozaki Miller 90504f25b6 removing notice of v10.x github only update 2020-11-12 11:03:07 -08:00
Brandon ce112b3457 reved patch num 2020-11-12 08:50:54 -08:00
Brandon 9a1ad86d17 updated licence.md to just licence, updated js-message version req to 1.0.7 for MIT lic also updated docs to remove DBAD refs 2020-11-12 08:50:20 -08:00
Brandon 5022bb23dc updating deps to support MIT 2020-11-11 13:17:33 -08:00
Brandon 26e298191c prepping to upgrade package 2020-11-11 12:50:16 -08:00
Brandon 30e426fd7b testing updates node 8-14 only 2020-11-11 12:46:57 -08:00
Brandon 768c5fc3a6 MIT Licence and Buffer fix 2020-11-11 12:21:02 -08:00
Brandon Nozaki Miller 3c95b0ef14
Update README.md
notification of update start
2019-12-04 10:54:58 -08:00
Brandon Nozaki Miller b90cf697c8
Merge pull request #166 from timbowhite/fix-165
fix #165
2019-12-02 00:57:37 -08:00
Brandon Nozaki Miller 7469dbac01
Merge branch 'master' into fix-165 2019-12-02 00:57:26 -08:00
Brandon Nozaki Miller 95d790a98a
Merge pull request #162 from luciopaiva/patch-1
Fix typo in documentation
2019-12-02 00:51:21 -08:00
Brandon Nozaki Miller bbdd094721
Merge pull request #153 from Slapbox/patch-1
Corrects very minor typo
2019-12-02 00:48:55 -08:00
Brandon Nozaki Miller b7e2476589
Merge branch 'master' into patch-1 2019-12-02 00:48:26 -08:00
Brandon Nozaki Miller 076053ead7
Merge pull request #132 from yoo2001818/master
Fix ipcBuffer being shared with all connected sockets
2019-12-02 00:44:22 -08:00
Timbo White 6b777493d2 fix #165 2019-11-11 14:51:27 +00:00
Lucio Paiva 8b30a7dd95
Fix typo 2019-07-04 19:18:04 +01:00
Slapbox 3ff6bd66a0
Corrects very minor typo
Changes 'top' to 'to'
2018-09-12 19:12:13 -04:00
Duknam Yoo 800936ab08
Fix ipcBuffer being shared with all sockets 2017-11-09 14:42:05 +09:00
Brandon Nozaki Miller 70e03c119b Merge pull request #130 from 0x5e/patch-1
Add documentation of `delimiter` variable
2017-10-26 13:02:52 -07:00
gaosen 2dca400678 Update README.md
Add documentation of `delimiter` variable
2017-10-25 21:05:22 +01:00
Brandon Nozaki Miller 17f7f111ff rev 2017-08-25 00:21:36 -07:00
Brandon Nozaki Miller a5bcf0d168 Merge pull request #126 from vale981/patch-1
Update event-pubsub
2017-08-25 00:19:04 -07:00
vale981 b7f94b8999 Update event-pubsub 2017-08-24 15:31:35 +02:00
Brandon Nozaki Miller 2193d6fae2 rev 2017-07-21 05:27:22 -07:00
Brandon Nozaki Miller 94249c24ea Merge pull request #116 from medicomp/master
Compatibility with Node.js cluster module
2017-07-21 05:23:11 -07:00
Brandon Miller 1d8fae31ec added example files to example/cluster/* tweaked readme style example 2017-07-21 05:18:16 -07:00
Luke Stratman e297474e1c Added documentation and examples to README 2017-07-14 18:09:35 -04:00
Brandon Nozaki Miller 366454648c Merge branch 'master' into master 2017-07-12 22:34:07 -07:00
Brandon Nozaki Miller 4cbb71253e windows only test node 6,7,and 8 2017-07-12 22:32:52 -07:00
Brandon Nozaki Miller 27672cfc00 only test 678 versions of node 2017-07-12 22:32:04 -07:00
Brandon Nozaki Miller eb486cc172 Merge branch 'master' into master 2017-07-12 16:30:32 -07:00
Brandon Nozaki Miller 22bc09ad54 Merge pull request #121 from benblank/logger
Allow users to specify a custom logger
2017-07-12 16:28:59 -07:00
Ben Blank c62e699844 add support for a configurable logger 2017-06-25 19:44:48 -07:00
Luke Stratman 8463175f62 Fixed a syntax error 2017-05-24 13:38:42 -04:00
Luke Stratman 1df857ce3a Cluster module support
Added an option to control whether or not node-ipc unlinks the Unix
socket path when it starts a server which, when set to false, allows the
overall application to handle this and allows node-ipc to work with the
Node.js cluster module.
2017-05-24 13:36:40 -04:00
Brandon Nozaki Miller 22c5688737 Merge pull request #115 from atiertant/patch-1
fix this.log is not a function
2017-05-18 15:21:36 -07:00
Brandon Nozaki Miller fdfd13b98f binding this is better for garbage collection. 2017-05-18 14:22:56 -07:00
Alexandre Tiertant f6bd9e7832 fix this.log is not a function 2017-05-05 14:30:22 +02:00
RIAEvangelist 6e9a012cb3 fixed poor require practice 2017-04-15 22:59:29 -07:00
RIAEvangelist c18baa2ae3 rev 2017-04-15 22:18:33 -07:00
RIAEvangelist 8886f82faa cleanup, performance improvements and reformatting 2017-04-15 22:17:25 -07:00
RIAEvangelist e4098d1921 Merge branch 'master' of github.com:RIAEvangelist/node-ipc 2017-04-15 21:13:25 -07:00
RIAEvangelist a5bf16503c es6 updates 2017-04-15 21:13:15 -07:00
Brandon Nozaki Miller 52c37718c3 Merge pull request #113 from MaxXx1313/master
fix issue #112
2017-04-04 18:52:51 -07:00
Maksim Chartkou 33f717006b fix: this.log is not a function 2017-03-27 16:10:13 +03:00
RIAEvangelist e79e8064f4 Merge branch 'master' of github.com:RIAEvangelist/node-ipc 2017-02-14 04:02:07 -08:00
RIAEvangelist 729149d095 test passed 2017-02-14 04:01:52 -08:00
Brandon Nozaki Miller 2eb369dba3 Merge pull request #111 from RIAEvangelist/v8.x
v8.10.3
2017-02-14 03:55:11 -08:00
RIAEvangelist 0690914634 v8.10.2 2017-02-14 03:32:49 -08:00
Brandon Nozaki Miller fad4cbb683 Merge pull request #103 from wearetrail/master
Ensure message format availability
2017-02-14 03:10:43 -08:00
Brandon Nozaki Miller e865e949ce test may run too fast sometimes 2017-02-13 23:27:11 -08:00
Brandon Nozaki Miller 524a63e88f spec path updates required 2017-02-13 23:16:33 -08:00
Brandon Nozaki Miller 4edd1d044e do not reject messages
allow loose message sending, but prevent handling errors
2017-02-13 22:37:24 -08:00
Melvin Valster 4f9f206b42 Check for type and data not being undefined 2017-01-24 11:22:53 +01:00
Melvin cfcf815275 Merge branch 'master' into master 2017-01-24 11:11:39 +01:00
RIAEvangelist b3bbeece24 moved node-cmd to devDeps 2016-12-22 11:44:15 -08:00
RIAEvangelist 9d9dd746c2 dep updates 2016-12-22 11:38:45 -08:00
RIAEvangelist eda84a4093 fix for windows posix sockets 2016-12-21 19:34:53 -08:00
RIAEvangelist c899df2f42 confirmed network interface release 2016-12-21 19:15:47 -08:00
RIAEvangelist 872e3ff090 Default simplification and interface addition 2016-12-21 17:03:12 -08:00
Melvin 3ca19e205e Merge branch 'master' into master 2016-12-21 11:51:40 +01:00
RIAEvangelist 0218c8340f CI config updates 2016-12-20 18:28:51 -08:00
Brandon Nozaki Miller 855e1a371f Update package.json
rev
2016-12-19 17:08:44 -08:00
Brandon Nozaki Miller 4c764fd310 Merge pull request #106 from kevinwilson541/fix/tls-server-connect
call startTLSServer in socketServer to init this.server
2016-12-19 17:07:41 -08:00
Kevin Wilson c849889590 call startTLSServer in socketServer to init this.server 2016-12-03 01:31:03 -08:00
Melvin 8de357f488 Ensure message format availability
Make sure the entire process doesn't crash when a message is sent without `type` and/or `data` as such:

```
error: Uncaught Exception TypeError: Cannot read property 'id' of undefined
    at Server.gotData (/usr/src/app/node_modules/@trail/pigeoneer/node_modules/node-ipc/dao/socketServer.js:181:24)
    at emitOne (events.js:101:20)
    at Socket.emit (events.js:188:7)
    at Socket.EventEmitter.emit (/usr/src/app/node_modules/@trail/pigeoneer/node_modules/sc-domain/index.js:12:31)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at TCP.onread (net.js:548:20)
```
2016-11-15 15:17:54 +01:00
Brandon Nozaki Miller e7739111fc Merge pull request #102 from RIAEvangelist/v8.x
V8.9.2
2016-10-06 16:35:10 -07:00
SSMP 78d6703b2a upping event-pubsub 2016-10-06 15:53:17 -07:00
Brandon Nozaki Miller 2deb238fd7 Merge pull request #98 from RIAEvangelist/master
merge ci testing
2016-10-06 02:08:03 -07:00
SSMP a01f0bc824 rev for CI testing on mac/linux/windows 2016-10-06 01:30:54 -07:00
SSMP cb5c9ce222 testing mac and linux 2016-10-06 01:24:44 -07:00
SSMP e936bf27e7 adding travis build 2016-10-06 01:20:47 -07:00
SSMP 2909fa216e testing TRAVIS_BUILD_NUMBER 2016-10-06 01:10:54 -07:00
SSMP fb1f737b05 testing travis 2016-10-06 00:57:05 -07:00
SSMP ce035c0d98 fleshing out windows builds 2016-10-06 00:27:21 -07:00
SSMP 1cf1084241 official support revved to node v4+ 2016-10-05 23:48:44 -07:00
SSMP 9731401fdc rev io for windows testing without --harmony 2016-10-05 23:45:37 -07:00
SSMP 73efdb3f38 rev io.js ci tests for windows 2016-10-05 23:43:41 -07:00
SSMP 429c73f12c removing support for 0.12 2016-10-05 23:38:59 -07:00
SSMP 5424258154 changing unix/windows socket spec to have greater delay for windows builds 2016-10-05 23:36:07 -07:00
SSMP c30789b779 explicit event-pubsub 4.2.2 2016-10-05 23:30:28 -07:00
SSMP cdeab7826c windows ci testing ugk :( 2016-10-05 23:16:14 -07:00
SSMP fdfb805440 using windows command for appveyor 2016-10-05 23:14:44 -07:00
SSMP 8cbfe37e40 removing bad appveyor command 2016-10-05 23:03:39 -07:00
SSMP 9b0ee933d2 testing appveyor for windows integration tests 2016-10-05 23:01:54 -07:00
SSMP 4b5f95a337 node version detection 2016-10-03 13:34:27 -07:00
SSMP 84b11cccfb coverage with new event pubsub 2016-09-30 06:12:20 -07:00
SSMP 825e16fcba Merge branch 'master' of github.com:RIAEvangelist/node-ipc 2016-09-30 06:11:01 -07:00
SSMP 49b631b270 new event pubsub support 2016-09-30 06:00:28 -07:00
Brandon Nozaki Miller bad93ae7c4 Merge pull request #85 from Stealthmate/add_socketdisconnect_to_doc
Add 'socket.disconnected' to documentation
2016-09-13 23:18:29 -07:00
Stealthmate 8b712f4da8 fixed formatting 2016-09-13 20:36:11 +03:00
Stealthmate fbed93b8d9 added socket.disconnected to docs 2016-09-13 20:34:44 +03:00
Stealthmate ae5cf39375 Revert "Revert "evert "Added 'socket.disconnect' to event list in docs"""
This reverts commit 11f262418d.
2016-09-13 20:30:17 +03:00
Stealthmate 1d76173865 Revert "evert "Added 'socket.disconnect' to event list in docs""
This reverts commit c3ec2f1c86.
2016-09-13 20:30:15 +03:00
Stealthmate 19329fb8bd Revert "wat"
This reverts commit 2f5cfe1f0a.
2016-09-13 20:30:11 +03:00
Stealthmate 576114ee83 Revert "wrong branch"
This reverts commit dcde4b69fb.
2016-09-13 20:30:07 +03:00
Stealthmate 234a3fa16e Revert "Added 'socket.disconnect' to event list in docs"
This reverts commit c4578386ed.
2016-09-13 20:30:01 +03:00
Stealthmate 11f262418d Revert "evert "Added 'socket.disconnect' to event list in docs""
This reverts commit c3ec2f1c86.
2016-09-13 20:27:56 +03:00
Stealthmate c3ec2f1c86 evert "Added 'socket.disconnect' to event list in docs"
sTihis reverts commit c4578386ed.
2016-09-13 20:26:46 +03:00
Stealthmate 2f5cfe1f0a wat 2016-09-13 20:26:24 +03:00
Stealthmate dcde4b69fb wrong branch 2016-09-13 20:17:38 +03:00
Stealthmate c4578386ed Added 'socket.disconnect' to event list in docs
- Also added a listener in the Basic Examples
2016-09-13 20:10:21 +03:00
SSMP 6c01ffc0b7 updated example certs 2016-09-10 15:09:44 -07:00
SSMP 028e597a9b fixes #83 2016-08-12 15:25:49 -07:00
Brandon Nozaki Miller df8c3c0d90 Update disconnect event removal 2016-08-12 14:07:03 -07:00
Brandon Nozaki Miller 5eb7eb1894 Update package.json 2016-08-02 12:34:02 -07:00
Brandon Nozaki Miller 56dfe7f0ea Merge pull request #82 from mrvini/master
updates to defaults entities, making sure that node-ipc could be run …
2016-08-02 12:14:56 -07:00
Val Vinder 0d16860a45 updates to defaults entities, making sure that node-ipc could be run even if no network interfaces are present 2016-08-02 12:04:28 -07:00
Brandon Nozaki Miller 5824ae9b32 rev 2016-07-14 16:09:32 -07:00
Brandon Nozaki Miller adb651d708 testing 2016-07-14 16:05:02 -07:00
Brandon Nozaki Miller bec3950022 Merge pull request #72 from Mostafa-Samir/win/fixes
Fixing retry logic and UDP4 default host
2016-07-14 16:03:22 -07:00
Brandon Nozaki Miller c2bffb5451 Merge pull request #73 from Mostafa-Samir/disconnect/fix
Using a client-specific flag to disconnect instead of using config.stopRetrying
2016-07-14 16:02:33 -07:00
Brandon Nozaki Miller d28e5498b0 Merge pull request #81 from alansikora/master
Make sure production environments does not break due to event-pubsub updates
2016-07-14 15:44:55 -07:00
Alan Sikora c1f4755ad6 Make sure production environments does not break due to event-pubsub updates 2016-07-14 13:16:32 -03:00
Brandon Nozaki Miller 0c5156cf15 Merge pull request #70 from mwshortt/fix-received-spelling
Fix typo in client log: recieved -> received
2016-04-26 17:06:05 -07:00
Mostafa Samir f3f7bdbf3f set client's 'explicitlyDisconnected' flag to true when disconnect is called
this is instead of using the 'stopRetrying' flag that would affect the retrying policy of other clients
2016-04-04 00:32:17 +02:00
Mostafa Samir 90260d1d3d added 'explicitlyDisconnected' flag to Client object
this flag will be set to true when a 'ipc.disconnect' is called on the client to prevent the client from attempting to retry to connect
2016-04-04 00:30:44 +02:00
Mostafa Samir ec45f36ae0 updated comment by removing mention of windows
any syetem that has it first network interface on ipv6 will also fail if udp4 was bound on it, not just windows
2016-04-01 22:06:00 +02:00
Mostafa Samir 36457fa5bd made udp4 socket default bind to an ipv4 address
it seems that on windows, binding a udp4 socket to an ipv6 address (here is ::1) raises and EINVAL error
2016-04-01 21:28:39 +02:00
Mostafa Samir e9d34a8178 auto-updated coverage reports 2016-04-01 20:32:18 +02:00
Mostafa Samir 387fa3b0ea tweaked the test suite to accommodate to windows delays 2016-04-01 20:29:42 +02:00
Mostafa Samir d3181ddafe removed seemingly unnecessary resetRetriesCheck function
the function being set to fire after 100ms conflicted with delays in firing the 'disconnect' event on windows, and this resulted in the socket's 'retriesRemianing' being reset after every decrement and thus violatin the 'maxRetries' rule
2016-04-01 20:26:26 +02:00
Mostafa Samir b60152d0b3 auto-updated coverage reports 2016-04-01 19:50:28 +02:00
Mostafa Samir d2aaa7eb0e ignored npm-debug.log files 2016-04-01 19:49:17 +02:00
Mostafa Samir 3ee9c94818 added a script to run tests on windows
created a sepearte script to avoid any potential problems that could occur if original scripts were changed
2016-04-01 19:45:11 +02:00
Madeline Shortt 60be1a3a2e Fix typo in client log: recieved -> received 2016-03-28 17:45:36 -07:00
Brandon Nozaki Miller df0c6407c1 major revisions to binary, hex and other rawBuffer sockets 2016-03-23 00:07:37 -07:00
Brandon Nozaki Miller 12ea8bfed7 Update package.json 2016-03-16 02:50:58 -07:00
Brandon Nozaki Miller 50f21ff857 syntax fix 2016-03-16 02:46:10 -07:00
Brandon Nozaki Miller 9246169607 rev 2016-03-16 02:43:00 -07:00
Brandon Nozaki Miller e53b83b6d7 allow passing false and 0 as message data 2016-03-16 02:42:21 -07:00
Brandon Nozaki Miller 456cf3f312 adding node scripts 2016-01-11 14:31:36 -08:00
Brandon Nozaki Miller 23b2642041 prepped for publish 2016-01-11 14:25:48 -08:00
Brandon Nozaki Miller bd967c7513 fixing some ref links 2016-01-11 12:28:13 -08:00
Brandon Nozaki Miller 9f1755374a fixed some formatting 2016-01-10 21:10:58 -08:00
Brandon Nozaki Miller 143e23ca4d migrating to es6 2016-01-10 20:59:40 -08:00
Brandon Nozaki Miller 6a00244670 removed duplicate sync server 2016-01-10 12:50:13 -08:00
Brandon Nozaki Miller ed9739d6f0 formatting linebreak readme 2016-01-10 05:23:50 -08:00
Brandon Nozaki Miller 4b34e7ff3e added codacy info 2016-01-10 05:22:57 -08:00
Brandon Nozaki Miller 9a28809a4f cleaning up test params 2016-01-10 05:10:48 -08:00
Brandon Nozaki Miller 6278fd472b cleaning up format 2016-01-10 04:57:08 -08:00
Brandon Nozaki Miller f176a01d1b better err handling in tests 2016-01-10 04:37:52 -08:00
Brandon Nozaki Miller 32cfa88d9b coding style fixes 2016-01-10 04:32:46 -08:00
Brandon Nozaki Miller 1fe7e543ee clean up 2016-01-10 04:18:14 -08:00
Brandon Nozaki Miller 97d1e0783b corrected pubsub constructor case 2016-01-10 03:53:33 -08:00
Brandon Nozaki Miller 19416ef10c cleaned up server tests and got all tests playing nice 2016-01-10 03:38:19 -08:00
Brandon Nozaki Miller 92061d2f85 coverage with TCP Client back in 2016-01-10 03:03:59 -08:00
Brandon Nozaki Miller f0056a7d1f added TCP client tests back in 2016-01-10 03:02:36 -08:00
Brandon Nozaki Miller b3b99482e1 test formatting 2016-01-10 02:46:09 -08:00
Brandon Nozaki Miller 8802aeeb0b tcp and UDP tests working together 2016-01-10 02:39:14 -08:00
Brandon Nozaki Miller 829b0790f5 updates to UDP tests create issue #62 2016-01-10 01:30:30 -08:00
Brandon Nozaki Miller 3d5967ec8a UDP Socket client minor formatting fixes 2016-01-10 01:18:57 -08:00
Brandon Nozaki Miller ac94fb3312 removing specs with errors 2016-01-10 01:14:54 -08:00
Brandon Nozaki Miller e6d6a59c42 cleaned up unix socket client test 2016-01-10 01:03:05 -08:00
Brandon Nozaki Miller 2d19c88b15 Updating docs for fix to #60 2016-01-09 23:28:00 -08:00
Brandon Nozaki Miller fa59d14ca4 test server auto shutdown fixes #60 2016-01-09 23:23:40 -08:00
Brandon Nozaki Miller 45cf879345 fixing formatting issues and best practices 2016-01-09 21:48:03 -08:00
Brandon Nozaki Miller 7b0cc85fa1 typo 2016-01-09 01:04:00 -08:00
Brandon Nozaki Miller 850195c228 adjusting docs 2016-01-09 01:03:01 -08:00
Brandon Nozaki Miller 5912c9ab5f implemented istanbul and updated docs 2016-01-09 00:59:47 -08:00
Brandon Nozaki Miller b60551202b Merge pull request #55 from nileshprasad/master
Test cases for Node IPC. Looking forward to tests for raw buffer.
2016-01-07 23:10:59 -08:00
nileshprasad cef306eb4b Added test case for Sync parameter for TCP and Unix, Added testFile.js which helps in executing all test scripts and dependent file in same terminal 2016-01-07 15:55:06 -08:00
nileshprasad 4cf5906e95 Merge https://github.com/RIAEvangelist/node-ipc 2016-01-04 13:35:43 -08:00
Brandon Nozaki Miller e7d9223ee5 updating for npm versioning 2016-01-04 01:47:06 -08:00
Brandon Nozaki Miller b51b57b987 updated TLS socket examples 2016-01-04 01:45:28 -08:00
Brandon Nozaki Miller ae5685fd19 added server.stop fixes #2 2016-01-04 01:33:55 -08:00
Brandon Nozaki Miller a8ea63eca6 updated udpType handling fixes #49 2016-01-04 01:22:37 -08:00
Brandon Nozaki Miller 57a813124e fixed maxConnection reference fixes #47 2016-01-04 01:10:58 -08:00
Brandon Nozaki Miller 11b428c47d Merge branch 'master' of github.com:RIAEvangelist/node-ipc 2016-01-04 01:01:22 -08:00
Brandon Nozaki Miller e8bc96b6f4 added functionality to handle all server errors and added example in TCP basic world server. fixes #56 2016-01-04 01:00:08 -08:00
Brandon Nozaki Miller 33b473803f Merge pull request #57 from yetanotherusernamebecausegithubisbugged/patch-1
Thanks

README.md typo fix.
2016-01-01 12:20:14 -08:00
Brandon Nozaki Miller 40af24c13e added package quality badge 2016-01-01 12:02:57 -08:00
yetanotherusernamebecausegithubisbugged 24ab1f5d3f README.md typo fix.
"fastst" -> "fastest"
2015-12-26 11:05:29 +03:00
nileshprasad 745b3dbee9 Merge remote-tracking branch 'upstream/master' 2015-12-22 17:49:33 -08:00
Brandon Nozaki Miller bbb9ed0369 npm release for updated certs 2015-12-22 11:54:45 -08:00
Brandon Nozaki Miller bbfb808137 updated local certs 2015-12-22 11:50:51 -08:00
nileshprasad 381378afe6 Removed pending status of udp6 test case. 2015-12-10 15:38:38 -08:00
nileshprasad 9d1015eb69 removing commented code 2015-12-10 15:26:15 -08:00
Brandon Nozaki Miller aaad023143 updated docs removed define 2015-12-10 02:30:53 -08:00
Brandon Nozaki Miller e48fd1da8b removed support for define 2015-12-10 02:29:15 -08:00
Brandon Nozaki Miller e243ed9a29 removed support for unused define brodcasting and listening 2015-12-10 02:20:44 -08:00
Brandon Nozaki Miller 565080376d versioning for sync sockets 2015-12-10 00:16:31 -08:00
Brandon Nozaki Miller 3be9d29240 added sync option for all applicable socket types 2015-12-10 00:11:14 -08:00
Brandon Nozaki Miller 0220080d54 added nodei node-ipc badge 2015-12-08 16:57:41 -08:00
nileshprasad 9dc3e1a66a Merge https://github.com/RIAEvangelist/node-ipc 2015-12-07 18:02:31 -08:00
nileshprasad f33cc1aeca First Commit of test cases 2015-12-04 18:40:38 -08:00
Brandon Nozaki Miller 2238b594ce Remove the now ignored directory node_modules 2015-12-03 08:52:50 -08:00
Brandon Nozaki Miller 65b7a444eb revving for release 2015-12-03 08:51:39 -08:00
Brandon Nozaki Miller 3c11bdaaff Merge pull request #53 from Gloridea/master
fix unix socket is not working due to previous fix
2015-12-03 08:49:47 -08:00
gloridea 4d806f78dc fix unix socket is not working due to previous fix 2015-12-03 03:45:12 +09:00
Brandon Nozaki Miller c57268c2a0 prepping for version release 2015-12-02 10:24:38 -08:00
Brandon Nozaki Miller ffd358b5ed Merge pull request #52 from MaybeRex/master
added triggers for 'close' and 'error'

looks good
2015-12-02 10:07:35 -08:00
mario solorzano 4045cc820a corrected close to destroy on destroy 2015-12-02 10:05:47 -08:00
Brandon Nozaki Miller fa8f159eea Merge pull request #51 from Gloridea/master
fix - Can't connect to server on retry due to config.path is modified…

Awesome! thanks for the clarification!
2015-12-02 10:01:36 -08:00
mario solorzano 4d332523dc added triggers for 'close' and 'error' 2015-11-30 17:43:43 -08:00
Gloridea b37f4dac42 fix - Can't connect to server on retry due to config.path is modified in retry loop on win32 env 2015-12-01 04:53:06 +09:00
Brandon Nozaki Miller 021b191af5 Merge pull request #48 from MaybeRex/master
added maxRetries further informatiom

Thanks @MaybeRex
2015-11-20 17:47:13 -08:00
mario solorzano 87daf40475 coses issue # 42 by adding further information 2015-11-18 11:20:16 -08:00
mario solorzano d0283eac09 added stopRetrying clarification closes # 42 2015-11-18 11:18:47 -08:00
Brandon Nozaki Miller d46e755dc7 Merge pull request #44 from Kanaye/patch-1
Fixed bug with 'UNIX' sockets on windows.
nice fix! @Kanaye
2015-11-18 03:04:43 -08:00
Joscha Rohmann a2e9c9fd48 Fixed bug with 'UNIX' sockets on windows.
Fixed that the client path gets extended with an ``\\\\.\\pipe\\`` when it already beginns with it.
That is the case when reconnecting.
2015-11-12 12:57:17 +01:00
Brandon Nozaki Miller e8f956db06 Merge pull request #41 from orthographic-pedant/spell_check/configurable
Fix typographical error(s)
2015-10-09 15:40:14 -07:00
orthographic-pedant c19e9fe09b Fix typographical error(s)
Changed configureable to configurable in README.
2015-10-07 14:39:43 -04:00
Brandon Nozaki Miller f0e2afd649 clean up logs for debugging tls 2015-09-27 23:29:31 -07:00
Brandon Nozaki Miller 79678ca6dd update dependencies 2015-09-27 23:26:55 -07:00
Brandon Nozaki Miller 3d7b804c59 minor clarification for TLS Doc location 2015-09-27 23:12:41 -07:00
Brandon Nozaki Miller ebceadde8b adjusting TOC 2015-09-27 23:11:04 -07:00
Brandon Nozaki Miller a4e6fcd301 started documentation of tls/SSL 2015-09-27 22:59:25 -07:00
Brandon Nozaki Miller 6fc0199f01 added defaults to allow local certs to be used when not specified 2015-09-27 22:00:26 -07:00
Brandon Nozaki Miller 737d856a32 added tls ssl support, examples, and local only certs 2015-09-27 21:52:16 -07:00
Brandon Nozaki Miller 6fdd7ba1ed prepping for windows support release 2015-09-27 04:53:08 -07:00
Brandon Nozaki Miller f31d0c9008 added documentation and support for Windows Sockets 2015-09-27 04:45:57 -07:00
Brandon Nozaki Miller b56cb29087 prepping for release 2015-09-27 03:37:01 -07:00
Brandon Nozaki Miller 9493f1c475 added github image 2015-09-27 03:36:01 -07:00
Brandon Nozaki Miller ac714e91a4 added js-message dep and rawBuffer examples 2015-09-27 03:32:14 -07:00
Brandon Nozaki Miller 7f06fe6a14 adding badges 2015-09-20 13:19:43 -07:00
Brandon Nozaki Miller dff1b69ccb Update README.md 2015-09-02 23:24:23 -07:00
Brandon Nozaki Miller 7382d9579c added npm stats 2015-08-26 15:02:42 -07:00
Brandon Nozaki Miller 846e301724 updated dependancies 2015-08-26 13:44:42 -07:00
Brandon Nozaki Miller bd5f9d2bf2 updated readme badges 2015-08-26 13:33:55 -07:00
174 changed files with 17044 additions and 3671 deletions

View file

@ -1,3 +0,0 @@
{
"sbruchmann.staticpreview.basepath": "/home/bmiller/git/node-ipc/"
}

1
.gitattributes vendored Normal file
View file

@ -0,0 +1 @@
coverage/**/* linguist-generated=true

4
.github/FUNDING.yml vendored Normal file
View file

@ -0,0 +1,4 @@
# These are supported funding model platforms
github: RIAEvangelist

33
.github/workflows/node.js.yml vendored Normal file
View file

@ -0,0 +1,33 @@
# 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

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
/nbproject/private/
/node_modules/
/nbproject
npm-debug.log
node-ipc.cjs

4
.npmignore Normal file
View file

@ -0,0 +1,4 @@
spec
example
coverage
test

619
README.md
View file

@ -1,24 +1,70 @@
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
================
*a nodejs module for local and remote Inter Process Communication* for Linux, Mac and Windows.
A great solution for **Neural Networking** in Node.JS
**npm install 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)
[![NPM Stats for node-ipc](https://nodei.co/npm/node-ipc.png?downloads=true&downloadRank=true&stars=true)](https://npmjs.org/package/node-ipc)
[![NPM Download Graph for node-ipc](https://nodei.co/npm-dl/node-ipc.png?months=6&height=3)](https://npmjs.org/package/node-ipc)
[![node-ipc package quality](http://npm.packagequality.com/badge/node-ipc.png)](http://packagequality.com/#?package=node-ipc)
*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 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)
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!
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 [DBAD Public Licence](http://www.dbad-license.org/).
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
#### Testing
` npm test ` will run the jasmine tests with istanbul for node-ipc and generate a coverage report in the spec folder.
You may want to install jasmine and istanbul globally with ` sudo npm install -g jasmine istanbul `
----
#### Contents
1. [Types of IPC Sockets and Supporting OS](#types-of-ipc-sockets)
1. [IPC Config](#ipc-config)
2. [IPC Methods](#ipc-methods)
1. [log](#log)
2. [connectTo](#connectto)
@ -27,11 +73,15 @@ This work is licenced via the [DBAD Public Licence](http://www.dbad-license.org/
5. [serve](#serve)
6. [serveNet](#servenet)
3. [IPC Stores and Default Variables](#ipc-stores-and-default-variables)
4. [Basic Examples](#basic-examples)
1. [Server for Unix Sockets & TCP Sockets](#server-for-unix-sockets--tcp-sockets)
2. [Client for Unix Sockets & TCP Sockets](#client-for-unix-sockets--tcp-sockets)
3. [Server & Client for UDP Sockets](#server--client-for-udp-sockets)
5. [Advanced Examples](https://github.com/RIAEvangelist/node-ipc/tree/master/example)
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)
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)
7. [Working with TLS/SSL Socket Servers & Clients](https://github.com/RIAEvangelist/node-ipc/tree/master/example/TLSSocket)
8. [Node Code Examples](https://github.com/RIAEvangelist/node-ipc/tree/master/example)
----
@ -39,24 +89,26 @@ This work is licenced via the [DBAD Public Licence](http://www.dbad-license.org/
| Type | Stability |Definition |
|-----------|-----------|-----------|
|Unix Socket| Stable | Gives Linux and Mac lightning fast communication and avoids the network card to reduce overhead and latency. [Local Unix Socket examples ](https://github.com/RIAEvangelist/node-ipc/tree/master/example/unixSocket/ "Unix Socket Node IPC examples") |
|TCP Socket | Stable | Gives the most reliable communication across the network. Can be used for local IPC as well, but is slower than #1's Unix Socket Implementation because TCP sockets go through the network card while Unix Sockets do not. [Local or remote network TCP Socket examples ](https://github.com/RIAEvangelist/node-ipc/tree/master/example/TCPSocket/ "TCP Socket Node IPC examples") |
|TLS Socket | Alpha | ***coming soon...*** |
|UDP Sockets| Stable | Gives the **fastest network communication**. UDP is less reliable but much faster than TCP. It is best used for streaming non critical data like sound, video, or multiplayer game data as it can drop packets depending on network connectivity and other factors. UDP can be used for local IPC as well, but is slower than #1's Unix Socket Implementation because UDP sockets go through the network card while Unix Sockets do not. [Local or remote network UDP Socket examples ](https://github.com/RIAEvangelist/node-ipc/tree/master/example/UDPSocket/ "UDP Socket Node IPC examples") |
|Unix Socket or Windows Socket| Stable | Gives Linux, Mac, and Windows lightning fast communication and avoids the network card to reduce overhead and latency. [Local Unix and Windows Socket examples ](https://github.com/RIAEvangelist/node-ipc/tree/master/example/unixWindowsSocket/ "Unix and Windows Socket Node IPC examples") |
|TCP Socket | Stable | Gives the most reliable communication across the network. Can be used for local IPC as well, but is slower than #1's Unix Socket Implementation because TCP sockets go through the network card while Unix Sockets and Windows Sockets do not. [Local or remote network TCP Socket examples ](https://github.com/RIAEvangelist/node-ipc/tree/master/example/TCPSocket/ "TCP Socket Node IPC examples") |
|TLS Socket | Stable | Configurable and secure network socket over SSL. Equivalent to https. [TLS/SSL documentation](https://github.com/RIAEvangelist/node-ipc/tree/master/example/TLSSocket) |
|UDP Sockets| Stable | Gives the **fastest network communication**. UDP is less reliable but much faster than TCP. It is best used for streaming non critical data like sound, video, or multiplayer game data as it can drop packets depending on network connectivity and other factors. UDP can be used for local IPC as well, but is slower than #1's Unix Socket or Windows Socket Implementation because UDP sockets go through the network card while Unix and Windows Sockets do not. [Local or remote network UDP Socket examples ](https://github.com/RIAEvangelist/node-ipc/tree/master/example/UDPSocket/ "UDP Socket Node IPC examples") |
| OS | Supported Sockets |
|-----|--------------------|
|Linux| Unix, TCP, TLS, UDP|
|Mac | Unix, TCP, TLS, UDP|
|Win | TCP, TLS, UDP |
**Windows** users may want to use UDP servers for the fastest local IPC. Unix Servers are the fastest option on Linux and Mac, but not available for Windows.
|Linux| Unix, Posix, TCP, TLS, UDP|
|Mac | Unix, Posix, TCP, TLS, UDP|
|Win | Windows, TCP, TLS, UDP |
----
``ipc.config``
#### IPC Config
Set these variables in the ``ipc.config`` scope to overwrite or set default values.
`ipc.config`
Set these variables in the `ipc.config` scope to overwrite or set default values.
```javascript
{
appspace : 'app.',
@ -64,30 +116,55 @@ Set these variables in the ``ipc.config`` scope to overwrite or set default valu
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
stopRetrying : false,
unlink : true,
interfaces : {
localAddress: false,
localPort : false,
family : false,
hints : false,
lookup : 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 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.|
| 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.|
| 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 |
| 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 recieved as a raw node ` Buffer ` __NOT__ an ` Object ` as JSON. |
| 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 0, the client will ***NOT*** try to reconnect. |
| 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) |
----
@ -97,74 +174,75 @@ These methods are available in the IPC Scope.
----
##### log
``ipc.log(a,b,c,d,e...);``
`ipc.log(a,b,c,d,e...);`
ipc.log will accept any number of arguments and if ``ipc.config.silent`` is not set, it will concat them all with a sincle space ' ' between them and then log them to the console. This is fast because it prevents any concatenation from happening if the ipc is set to silent. That way if you leave your logging in place it should not effect performance.
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 supports [colors](https://github.com/Marak/colors.js) implementation. All of the available styles are supported and the theme styles are as follows :
The log also uses util.inspect You can control if it should log in color, the log depth, and the destination via ` ipc.config `
{
good : 'green',
notice : 'yellow',
warn : 'red',
error : 'redBG',
debug : 'magenta',
variable: 'cyan',
data : 'blue'
}
```javascript
You can override any of these settings by requireing colors and setting the theme as follows :
ipc.config.logInColor=true; //default
ipc.config.logDepth=5; //default
ipc.config.logger=console.log.bind(console); // default
```
var colors=require('colors');
colors.setTheme(
{
good : 'zebra',
notice : 'redBG',
...
}
);
----
##### connectTo
``ipc.connectTo(id,path,callback);``
`ipc.connectTo(id,path,callback);`
Used for connecting as a client to local Unix Sockets. ***This is the fastst way for processes on the same machine to communicate*** because it bypasses the network card which TCP and UDP must both use.
Used for connecting as a client to local Unix Sockets and Windows Sockets. ***This is the fastest way for processes on the same machine to communicate*** because it bypasses the network card which TCP and UDP must both use.
| variable | required | definition |
|----------|----------|------------|
| id | required | is the string id of the socket being connected to. The socket with this id is added to the ipc.of object when created. |
| path | optional | is the path of the Unix Domain Socket File, if not set this will default to ``ipc.config.socketRoot``+``ipc.config.appspace``+``id`` |
| path | optional | is the path of the Unix Domain Socket File, if the System is Windows, this will automatically be converted to an appropriate pipe with the same information as the Unix Domain Socket File. If not set this will default to ` ipc.config.socketRoot `+` ipc.config.appspace `+` id ` |
| callback | optional | this is the function to execute when the socket has been created. |
**examples** arguments can be ommitted so long as they are still in order.
```javascript
ipc.connectTo('world');
```
or using just an id and a callback
```javascript
ipc.connectTo(
'world',
function(){
ipc.of.world.on(
'hello',
function(data){
ipc.log(data.debug);
ipc.log(data.debug);
//if data was a string, it would have the color set to the debug style applied to it
}
)
}
);
```
or explicitly setting the path
```javascript
ipc.connectTo(
'world',
'myapp.world'
);
```
or explicitly setting the path with callback
```javascript
ipc.connectTo(
'world',
'myapp.world',
@ -172,27 +250,38 @@ or explicitly setting the path with callback
...
}
);
```
----
##### connectToNet
``ipc.connectToNet(id,host,port,callback)``
`ipc.connectToNet(id,host,port,callback)`
Used to connect as a client to a TCP or TLS socket via the network card. This can be local or remote, if local, it is recommended that you use the Unix Socket Implementaion of ``connectTo`` instead as it is much faster since it avoids the network card altogether.
Used to connect as a client to a TCP or [TLS socket](https://github.com/RIAEvangelist/node-ipc/tree/master/example/TLSSocket) via the network card. This can be local or remote, if local, it is recommended that you use the Unix and Windows Socket Implementaion of `connectTo` instead as it is much faster since it avoids the network card altogether.
For TLS and SSL Sockets see the [node-ipc TLS and SSL docs](https://github.com/RIAEvangelist/node-ipc/tree/master/example/TLSSocket). They have a few additional requirements, and things to know about and so have their own doc.
| variable | required | definition |
|----------|----------|------------|
| id | required | is the string id of the socket being connected to. For TCP & TLS sockets, this id is added to the ``ipc.of`` object when the socket is created with a reference to the socket. |
| host | optional | is the host on which the TCP or TLS socket resides. This will default to ``ipc.config.networkHost`` if not specified. |
| id | required | is the string id of the socket being connected to. For TCP & TLS sockets, this id is added to the `ipc.of` object when the socket is created with a reference to the socket. |
| host | optional | is the host on which the TCP or TLS socket resides. This will default to `ipc.config.networkHost` if not specified. |
| port | optional | the port on which the TCP or TLS socket resides. |
| callback | optional | this is the function to execute when the socket has been created. |
**examples** arguments can be ommitted so long as they are still in order.
So while the default is : (id,host,port,callback), the following examples will still work because they are still in order (id,port,callback) or (id,host,callback) or (id,port) etc.
```javascript
ipc.connectToNet('world');
```
or using just an id and a callback
```javascript
ipc.connectToNet(
'world',
function(){
@ -200,16 +289,24 @@ or using just an id and a callback
}
);
```
or explicitly setting the host and path
```javascript
ipc.connectToNet(
'world',
'myapp.com',serve(path,callback)
3435
);
```
or only explicitly setting port and callback
```javascript
ipc.connectToNet(
'world',
3435,
@ -218,12 +315,14 @@ or only explicitly setting port and callback
}
);
```
----
##### disconnect
``ipc.disconnect(id)``
`ipc.disconnect(id)`
Used to disconnect a client from a Unix, TCP or TLS socket. The socket and its refrence will be removed from memory and the ``ipc.of`` scope. This can be local or remote. UDP clients do not maintain connections and so there are no Clients and this method has no value to them.
Used to disconnect a client from a Unix, Windows, TCP or TLS socket. The socket and its refrence will be removed from memory and the `ipc.of` scope. This can be local or remote. UDP clients do not maintain connections and so there are no Clients and this method has no value to them.
| variable | required | definition |
|----------|----------|------------|
@ -231,96 +330,142 @@ Used to disconnect a client from a Unix, TCP or TLS socket. The socket and its r
**examples**
```javascript
ipc.disconnect('world');
```
----
##### serve
``ipc.serve(path,callback);``
`ipc.serve(path,callback);`
Used to create local Unix Socket Server to which Clients can bind. The server can ``emit`` events to specific Client Sockets, or ``broadcast`` events to all known Client Sockets.
Used to create local Unix Socket Server or Windows Socket Server to which Clients can bind. The server can `emit` events to specific Client Sockets, or `broadcast` events to all known Client Sockets.
| variable | required | definition |
|----------|----------|------------|
| path | optional | This is the Unix Domain Socket path to bind to. If not supplied, it will default to : ipc.config.socketRoot + ipc.config.appspace + ipc.config.id; |
| callback | optional | This is a function to be called after the Server has started. This can also be done by binding an event to the start event like ``ipc.server.on('start',function(){});`` |
| path | optional | This is the path of the Unix Domain Socket File, if the System is Windows, this will automatically be converted to an appropriate pipe with the same information as the Unix Domain Socket File. If not set this will default to ` ipc.config.socketRoot `+` ipc.config.appspace `+` id ` |
| callback | optional | This is a function to be called after the Server has started. This can also be done by binding an event to the start event like `ipc.server.on('start',function(){});` |
***examples*** arguments can be ommitted so long as they are still in order.
***examples*** arguments can be omitted so long as they are still in order.
```javascript
ipc.serve();
```
or specifying callback
```javascript
ipc.serve(
function(){...}
);
```
or specify path
```javascript
ipc.serve(
'/tmp/myapp.myservice'
);
```
or specifying everything
```javascript
ipc.serve(
'/tmp/myapp.myservice',
function(){...}
);
```
----
##### serveNet
``serveNet(host,port,UDPType,callback)``
`serveNet(host,port,UDPType,callback)`
Used to create TCP, TLS or UDP Socket Server to which Clients can bind or other servers can send data to. The server can ``emit`` events to specific Client Sockets, or ``broadcast`` events to all known Client Sockets.
Used to create TCP, TLS or UDP Socket Server to which Clients can bind or other servers can send data to. The server can `emit` events to specific Client Sockets, or `broadcast` events to all known Client Sockets.
| variable | required | definition |
|----------|----------|------------|
| host | optional | If not specified this defaults to the first address in os.networkInterfaces(). For TCP, TLS & UDP servers this is most likely going to be 127.0.0.1 or ::1 |
| port | optional | The port on which the TCP, UDP, or TLS Socket server will be bound, this defaults to 8000 if not specified |
| UDPType | optional | If set this will create the server as a UDP socket. 'udp4' or 'udp6' are valid values. This defaults to not being set.
| UDPType | optional | If set this will create the server as a UDP socket. 'udp4' or 'udp6' are valid values. This defaults to not being set. When using udp6 make sure to specify a valid IPv6 host, like ` ::1 ` |
| callback | optional | Function to be called when the server is created |
***examples*** arguments can be ommitted solong as they are still in order.
default tcp server
```javascript
ipc.serveNet();
```
default udp server
```javascript
ipc.serveNet('udp4');
```
or specifying TCP server with callback
```javascript
ipc.serveNet(
function(){...}
);
```
or specifying UDP server with callback
```javascript
ipc.serveNet(
'udp4',
function(){...}
);
```
or specify port
```javascript
ipc.serveNet(
3435
);
```
or specifying everything TCP
```javascript
ipc.serveNet(
'MyMostAwesomeApp.com',
3435,
function(){...}
);
```
or specifying everything UDP
```javascript
ipc.serveNet(
'MyMostAwesomeApp.com',
3435,
@ -328,26 +473,85 @@ or specifying everything UDP
function(){...}
);
```
----
### IPC Stores and Default Variables
| variable | definition |
|-----------|------------|
| ipc.of | This is where socket connection refrences will be stored when connecting to them as a client via the ``ipc.connectTo`` or ``iupc.connectToNet``. They will be stored based on the ID used to create them, eg : ipc.of.mySocket|
| ipc.server| This is a refrence to the server created by ``ipc.serve`` or ``ipc.serveNet``|
| ipc.of | This is where socket connection refrences will be stored when connecting to them as a client via the `ipc.connectTo` or `iupc.connectToNet`. They will be stored based on the ID used to create them, eg : ipc.of.mySocket|
| ipc.server| This is a refrence to the server created by `ipc.serve` or `ipc.serveNet`|
----
### Basic Examples
### IPC Server Methods
| method | definition |
|-----------|------------|
|start| start serving need to call ` serve ` or ` serveNet ` first to set up the server |
|stop| close the server and stop serving |
----
### IPC Events
|event name|params|definition|
|----------|------|----------|
|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|
|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
Sometimes you might need explicit and independent instances of node-ipc. Just for such scenarios we have exposed the core IPC class on the IPC singleton.
```javascript
import {IPCModule} from 'node-ipc';
const ipc=new RawIPC;
const someOtherExplicitIPC=new RawIPC;
//OR
const ipc=from 'node-ipc');
const someOtherExplicitIPC=new ipc.IPC;
//setting explicit configs
//keep one silent and the other verbose
ipc.config.silent=true;
someOtherExplicitIPC.config.silent=true;
//make one a raw binary and the other json based ipc
ipc.config.rawBuffer=false;
someOtherExplicitIPC.config.rawBuffer=true;
someOtherExplicitIPC.config.encoding='hex';
```
----
### Basic Examples
You can find [Advanced Examples](https://github.com/RIAEvangelist/node-ipc/tree/master/example) in the examples folder. In the examples you will find more complex demos including multi client examples.
#### Server for Unix Sockets & TCP Sockets
The server is the process keeping a socket for IPC open. Multiple sockets can connect to this server and talk to it. It can also broadcast to all clients or emit to a specific client. This is the most basic example which will work for both local Unix Sockets and local or remote network TCP Sockets.
#### Server for Unix Sockets, Windows Sockets & TCP Sockets
The server is the process keeping a socket for IPC open. Multiple sockets can connect to this server and talk to it. It can also broadcast to all clients or emit to a specific client. This is the most basic example which will work for local Unix and Windows Sockets as well as local or remote network TCP Sockets.
var ipc=require('node-ipc');
```javascript
import ipc from 'node-ipc';
ipc.config.id = 'world';
ipc.config.retry= 1500;
ipc.serve(
function(){
ipc.server.on(
@ -356,24 +560,35 @@ The server is the process keeping a socket for IPC open. Multiple sockets can co
ipc.log('got a message : '.debug, data);
ipc.server.emit(
socket,
'message',
'message', //this can be anything you want so long as
//your client knows.
data+' world!'
);
}
);
ipc.server.on(
'socket.disconnected',
function(socket, destroyedSocketID) {
ipc.log('client ' + destroyedSocketID + ' has disconnected!');
}
);
}
);
ipc.server.start();
#### Client for Unix Sockets & TCP Sockets
The client connects to the servers socket for Inter Process Communication. The socket will recieve events emitted to it specifically as well as events which are broadcast out on the socket by the server. This is the most basic example which will work for both local Unix Sockets and local or remote network TCP Sockets.
```
var ipc=require('node-ipc');
#### Client for Unix Sockets & TCP Sockets
The client connects to the servers socket for Inter Process Communication. The socket will receive events emitted to it specifically as well as events which are broadcast out on the socket by the server. This is the most basic example which will work for both local Unix Sockets and local or remote network TCP Sockets.
```javascript
import ipc from 'node-ipc';
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.connectTo(
'world',
function(){
@ -382,7 +597,7 @@ The client connects to the servers socket for Inter Process Communication. The s
function(){
ipc.log('## connected to world ##'.rainbow, ipc.config.delay);
ipc.of.world.emit(
'message',
'message', //any event or message type your server listens for
'hello'
)
}
@ -394,28 +609,32 @@ The client connects to the servers socket for Inter Process Communication. The s
}
);
ipc.of.world.on(
'message',
'message', //any event or message type your server listens for
function(data){
ipc.log('got a message from world : '.debug, data);
}
);
}
);
#### Server & Client for UDP Sockets
UDP Sockets are different than Unix & TCP Sockets because they must be bound to a unique port on their machine to recieve messages. For example, A TCP or Unix Socket client could just connect to a seperate TCP or Unix Socket sever. That client could then exchange, both send and recive, data on the servers port or location. UDP Sockets can not do this. They must bind to a port to recieve or send data.
This means a UDP Client and Server are the same thing because in order to recieve data, a UDP Socket must have its own port to recieve data on, and only one process can use this port at a time. It also means that inorder to ``emit`` or ``broadcast`` data the UDP server will need to know the host and port of the Socket it intends to broadcast the data to.
```
This is the most basic example which will work for both local Unix Sockets and local or remote network TCP Sockets.
#### Server & Client for UDP Sockets
UDP Sockets are different than Unix, Windows & TCP Sockets because they must be bound to a unique port on their machine to receive messages. For example, A TCP, Unix, or Windows Socket client could just connect to a separate TCP, Unix, or Windows Socket sever. That client could then exchange, both send and receive, data on the servers port or location. UDP Sockets can not do this. They must bind to a port to receive or send data.
##### UDP Server 1 - "World"
This means a UDP Client and Server are the same thing because in order to receive data, a UDP Socket must have its own port to receive data on, and only one process can use this port at a time. It also means that in order to `emit` or `broadcast` data the UDP server will need to know the host and port of the Socket it intends to broadcast the data to.
var ipc=require('../../../node-ipc');
This is the most basic example which will work for both local and remote UDP Sockets.
##### UDP Server 1 - "World"
```javascript
import ipc from 'node-ipc';
ipc.config.id = 'world';
ipc.config.retry= 1500;
ipc.serveNet(
'udp4',
function(){
@ -434,21 +653,23 @@ This is the most basic example which will work for both local Unix Sockets and l
);
}
);
console.log(ipc.server);
}
);
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
ipc.server.start();
```
##### UDP Server 2 - "Hello"
*note* we set the port here to 8001 because the world server is already using the default ipc.config.networkPort of 8000. So we can not bind to 8000 while world is using it.
```javascript
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.serveNet(
8001,
'udp4',
@ -473,58 +694,212 @@ This is the most basic example which will work for both local Unix Sockets and l
);
}
);
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
ipc.server.start();
#### Binary or Buffer Sockets
Binary or Buffer sockets can be used with any of the above socket types, however the way data events are emit is ***slightly*** different.
```
#### Raw Buffer or Binary Sockets
Binary or Buffer sockets can be used with any of the above socket types, however the way data events are emit is ***slightly*** different. These may come in handy if working with embedded systems or C / C++ processes. You can even make sure to match C or C++ string typing.
When setting up a rawBuffer socket you must specify it as such :
```javascript
ipc.config.rawBuffer=true;
```
You can also specify its encoding type. The default is ` utf8 `
```javascript
ipc.config.encoding='utf8';
```
emit string buffer :
```javascript
//server
ipc.server.emit(
socket,
'hello'
);
//client
ipc.of.world.emit(
'hello'
)
```
emit byte array buffer :
```javascript
//hex encoding may work best for this.
ipc.config.encoding='hex';
//server
ipc.server.emit(
socket,
[10,20,30]
);
//client
ipc.server.emit(
[10,20,30]
);
emit hex array buffer :
```
emit binary or hex array buffer, this is best for real time data transfer, especially whan connecting to C or C++ processes, or embedded systems :
```javascript
ipc.config.encoding='hex';
//server
ipc.server.emit(
socket,
[0x05,0x6d,0x5c]
);
//client
ipc.server.emit(
[0x05,0x6d,0x5c]
);
);
```
Writing explicit buffers, int types, doubles, floats etc. as well as big endian and little endian data to raw buffer nostly valuable when connecting to C or C++ processes, or embedded systems (see more detailed info on buffers as well as UInt, Int, double etc. here)[https://nodejs.org/api/buffer.html]:
```javascript
ipc.config.encoding='hex';
//make a 6 byte buffer for example
const myBuffer=Buffer.alloc(6).fill(0);
//fill the first 2 bytes with a 16 bit (2 byte) short unsigned int
//write a UInt16 (2 byte or short) as Big Endian
myBuffer.writeUInt16BE(
2, //value to write
0 //offset in bytes
);
//OR
myBuffer.writeUInt16LE(0x2,0);
//OR
myBuffer.writeUInt16LE(0x02,0);
//fill the remaining 4 bytes with a 32 bit (4 byte) long unsigned int
//write a UInt32 (4 byte or long) as Big Endian
myBuffer.writeUInt32BE(
16772812, //value to write
2 //offset in bytes
);
//OR
myBuffer.writeUInt32BE(0xffeecc,0)
//server
ipc.server.emit(
socket,
myBuffer
);
//client
ipc.server.emit(
myBuffer
);
```
#### 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.

224
coverage/base.css generated Normal file
View file

@ -0,0 +1,224 @@
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;
}

79
coverage/block-navigation.js generated Normal file
View file

@ -0,0 +1,79 @@
/* 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);

BIN
coverage/favicon.png generated Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

171
coverage/index.html generated Normal file
View file

@ -0,0 +1,171 @@
<!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>

224
coverage/lcov-report/base.css generated Normal file
View file

@ -0,0 +1,224 @@
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;
}

79
coverage/lcov-report/block-navigation.js generated Normal file
View file

@ -0,0 +1,79 @@
/* 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);

BIN
coverage/lcov-report/favicon.png generated Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

171
coverage/lcov-report/index.html generated Normal file
View file

@ -0,0 +1,171 @@
<!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>

View file

@ -0,0 +1,854 @@
<!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">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</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">&nbsp;</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';
&nbsp;
let eventParser = new EventParser();
&nbsp;
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>
&nbsp;
eventParser=new EventParser(this.config);
}
&nbsp;
Client=Client;
queue =new Queue;
socket=false;
connect=connect;
emit=emit;
retriesRemaining=0;
explicitlyDisconnected=false;
}
&nbsp;
function emit(type,data){
this.log('dispatching event to ', this.id, this.path, ' : ', type, ',', data);
&nbsp;
let message=new Message;
message.type=type;
message.data=data;
&nbsp;
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);
}
&nbsp;
//volitile emit
if(!this.config.sync){
this.socket.write(message);
return;
}
&nbsp;
//sync, non-volitile, ack emit
this.queue.add(
syncEmit.bind(this,message)
);
}
&nbsp;
function syncEmit(message){
this.log('dispatching event to ', this.id, this.path, ' : ', message);
this.socket.write(message);
}
&nbsp;
function connect(){
//init client object for scope persistance especially inside of socket events.
let client=this;
&nbsp;
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>
&nbsp;
const options={};
&nbsp;
if(!client.port){
client.log('Connecting client on Unix Socket :', client.path);
&nbsp;
options.path=client.path;
&nbsp;
if (process.platform ==='win32' &amp;&amp; !client.path.startsWith('\\\\.\\pipe\\')){
options.path = options.path.replace(/^\//, '');
options.path = options.path.replace(/\//g, '-');
options.path= `\\\\.\\pipe\\${options.path}`;
}
&nbsp;
client.socket = net.connect(options);
}else{
options.host=client.path;
options.port=client.port;
&nbsp;
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>
&nbsp;
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>
&nbsp;
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>
&nbsp;
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>
&nbsp;
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>
&nbsp;
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&lt;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>
}
&nbsp;
client.socket.setEncoding(this.config.encoding);
&nbsp;
client.socket.on(
'error',
function(err){
client.log('\n\n######\nerror: ', err);
client.publish('error', err);
&nbsp;
}
);
&nbsp;
client.socket.on(
'connect',
function connectionMade(){
client.publish('connect');
client.retriesRemaining=client.config.maxRetries;
client.log('retrying reset');
}
);
&nbsp;
client.socket.on(
'close',
function connectionClosed(){
client.log('connection closed' ,client.id , client.path,
client.retriesRemaining, 'tries remaining of', client.config.maxRetries
);
&nbsp;
if(
client.config.stopRetrying ||
client.retriesRemaining&lt;1 ||
client.explicitlyDisconnected
&nbsp;
){
client.publish('disconnect');
client.log(
(client.config.id),
'exceeded connection rety amount of',
' or stopRetrying flag set.'
);
&nbsp;
client.socket.destroy();
client.publish('destroy');
client=undefined;
&nbsp;
return;
}
&nbsp;
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
);
&nbsp;
client.publish('disconnect');
}
);
&nbsp;
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>
&nbsp;
if(!this.ipcBuffer){
this.ipcBuffer='';
}
&nbsp;
data=(this.ipcBuffer+=data);
&nbsp;
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>
&nbsp;
this.ipcBuffer='';
&nbsp;
const events = eventParser.parse(data);
const eCount = events.length;
for(let i=0; i&lt;eCount; i++){
let message=new Message;
message.load(events[i]);
&nbsp;
client.log('detected event', message.type, message.data);
client.publish(
message.type,
message.data
);
}
&nbsp;
if(!client.config.sync){
return;
}
&nbsp;
client.queue.next();
}
);
}
&nbsp;
export {
Client as default,
Client
};
&nbsp;</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>

View file

@ -0,0 +1,126 @@
<!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

View file

@ -0,0 +1,278 @@
<!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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">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">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import os from 'os';
&nbsp;
class Defaults{
&nbsp;
constructor(){
&nbsp;
}
&nbsp;
&nbsp;
appspace='app.';
socketRoot='/tmp/';
id=os.hostname();
&nbsp;
encoding='utf8';
rawBuffer=false;
sync=false;
unlink=true;
&nbsp;
delimiter='\f';
&nbsp;
silent=false;
logDepth=5;
logInColor=true;
logger=console.log.bind(console);
&nbsp;
maxConnections=100;
retry=500;
maxRetries=Infinity;
stopRetrying=false;
&nbsp;
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;
&nbsp;
readableAll = false;
writableAll = false;
&nbsp;
interface={
localAddress:false,
localPort:false,
family:false,
hints:false,
lookup:false
}
}
&nbsp;
function getIPType() {
const networkInterfaces = os.networkInterfaces();
let IPType = '';
if (networkInterfaces
&amp;&amp; Array.isArray(networkInterfaces)
<span class="branch-0 cbranch-no" title="branch not covered" > &amp;&amp; networkInterfaces.length &gt; 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;
}
&nbsp;
export {
Defaults as default,
Defaults
}
&nbsp;</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>

View file

@ -0,0 +1,182 @@
<!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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</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">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&nbsp;
import Defaults from './Defaults.js';
&nbsp;
class Parser{
constructor(config){
if(!config){
config=new Defaults;
}
this.delimiter=config.delimiter;
}
&nbsp;
format(message){
if(!message.data &amp;&amp; message.data!==false &amp;&amp; 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>
&nbsp;
message=message.JSON+this.delimiter;
return message;
}
&nbsp;
parse(data){
let events=data.split(this.delimiter);
events.pop();
return events;
}
}
&nbsp;
export {
Parser as default,
Parser
};
&nbsp;</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>

View file

@ -0,0 +1,126 @@
<!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>

View file

@ -0,0 +1,113 @@
<!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 =&gt; {
setTimeout(resolve, ms);
}
);
}
&nbsp;
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>

View file

@ -0,0 +1,111 @@
<!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>

111
coverage/lcov-report/node-ipc/index.html generated Normal file
View file

@ -0,0 +1,111 @@
<!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>

View file

@ -0,0 +1,131 @@
<!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">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import IPC from './services/IPC.js';
&nbsp;
class IPCModule extends IPC{
constructor(){
super();
&nbsp;
}
&nbsp;
IPC=IPC;
}
&nbsp;
const singleton=new IPCModule;
&nbsp;
export {
singleton as default,
IPCModule
}
&nbsp;</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

View file

@ -0,0 +1,111 @@
<!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
coverage/lcov-report/prettify.css generated Normal file
View file

@ -0,0 +1 @@
.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}

2
coverage/lcov-report/prettify.js generated Normal file

File diff suppressed because one or more lines are too long

BIN
coverage/lcov-report/sort-arrow-sprite.png generated Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

170
coverage/lcov-report/sorter.js generated Normal file
View file

@ -0,0 +1,170 @@
/* 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 generated Normal file

File diff suppressed because it is too large Load diff

18
coverage/lcov.svg generated Normal file
View file

@ -0,0 +1,18 @@
<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>

After

Width:  |  Height:  |  Size: 930 B

854
coverage/node-ipc/dao/client.js.html generated Normal file
View file

@ -0,0 +1,854 @@
<!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">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</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">&nbsp;</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';
&nbsp;
let eventParser = new EventParser();
&nbsp;
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>
&nbsp;
eventParser=new EventParser(this.config);
}
&nbsp;
Client=Client;
queue =new Queue;
socket=false;
connect=connect;
emit=emit;
retriesRemaining=0;
explicitlyDisconnected=false;
}
&nbsp;
function emit(type,data){
this.log('dispatching event to ', this.id, this.path, ' : ', type, ',', data);
&nbsp;
let message=new Message;
message.type=type;
message.data=data;
&nbsp;
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);
}
&nbsp;
//volitile emit
if(!this.config.sync){
this.socket.write(message);
return;
}
&nbsp;
//sync, non-volitile, ack emit
this.queue.add(
syncEmit.bind(this,message)
);
}
&nbsp;
function syncEmit(message){
this.log('dispatching event to ', this.id, this.path, ' : ', message);
this.socket.write(message);
}
&nbsp;
function connect(){
//init client object for scope persistance especially inside of socket events.
let client=this;
&nbsp;
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>
&nbsp;
const options={};
&nbsp;
if(!client.port){
client.log('Connecting client on Unix Socket :', client.path);
&nbsp;
options.path=client.path;
&nbsp;
if (process.platform ==='win32' &amp;&amp; !client.path.startsWith('\\\\.\\pipe\\')){
options.path = options.path.replace(/^\//, '');
options.path = options.path.replace(/\//g, '-');
options.path= `\\\\.\\pipe\\${options.path}`;
}
&nbsp;
client.socket = net.connect(options);
}else{
options.host=client.path;
options.port=client.port;
&nbsp;
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>
&nbsp;
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>
&nbsp;
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>
&nbsp;
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>
&nbsp;
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>
&nbsp;
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&lt;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>
}
&nbsp;
client.socket.setEncoding(this.config.encoding);
&nbsp;
client.socket.on(
'error',
function(err){
client.log('\n\n######\nerror: ', err);
client.publish('error', err);
&nbsp;
}
);
&nbsp;
client.socket.on(
'connect',
function connectionMade(){
client.publish('connect');
client.retriesRemaining=client.config.maxRetries;
client.log('retrying reset');
}
);
&nbsp;
client.socket.on(
'close',
function connectionClosed(){
client.log('connection closed' ,client.id , client.path,
client.retriesRemaining, 'tries remaining of', client.config.maxRetries
);
&nbsp;
if(
client.config.stopRetrying ||
client.retriesRemaining&lt;1 ||
client.explicitlyDisconnected
&nbsp;
){
client.publish('disconnect');
client.log(
(client.config.id),
'exceeded connection rety amount of',
' or stopRetrying flag set.'
);
&nbsp;
client.socket.destroy();
client.publish('destroy');
client=undefined;
&nbsp;
return;
}
&nbsp;
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
);
&nbsp;
client.publish('disconnect');
}
);
&nbsp;
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>
&nbsp;
if(!this.ipcBuffer){
this.ipcBuffer='';
}
&nbsp;
data=(this.ipcBuffer+=data);
&nbsp;
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>
&nbsp;
this.ipcBuffer='';
&nbsp;
const events = eventParser.parse(data);
const eCount = events.length;
for(let i=0; i&lt;eCount; i++){
let message=new Message;
message.load(events[i]);
&nbsp;
client.log('detected event', message.type, message.data);
client.publish(
message.type,
message.data
);
}
&nbsp;
if(!client.config.sync){
return;
}
&nbsp;
client.queue.next();
}
);
}
&nbsp;
export {
Client as default,
Client
};
&nbsp;</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>

126
coverage/node-ipc/dao/index.html generated Normal file
View file

@ -0,0 +1,126 @@
<!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>

1277
coverage/node-ipc/dao/socketServer.js.html generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,278 @@
<!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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-yes">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">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import os from 'os';
&nbsp;
class Defaults{
&nbsp;
constructor(){
&nbsp;
}
&nbsp;
&nbsp;
appspace='app.';
socketRoot='/tmp/';
id=os.hostname();
&nbsp;
encoding='utf8';
rawBuffer=false;
sync=false;
unlink=true;
&nbsp;
delimiter='\f';
&nbsp;
silent=false;
logDepth=5;
logInColor=true;
logger=console.log.bind(console);
&nbsp;
maxConnections=100;
retry=500;
maxRetries=Infinity;
stopRetrying=false;
&nbsp;
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;
&nbsp;
readableAll = false;
writableAll = false;
&nbsp;
interface={
localAddress:false,
localPort:false,
family:false,
hints:false,
lookup:false
}
}
&nbsp;
function getIPType() {
const networkInterfaces = os.networkInterfaces();
let IPType = '';
if (networkInterfaces
&amp;&amp; Array.isArray(networkInterfaces)
<span class="branch-0 cbranch-no" title="branch not covered" > &amp;&amp; networkInterfaces.length &gt; 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;
}
&nbsp;
export {
Defaults as default,
Defaults
}
&nbsp;</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>

View file

@ -0,0 +1,182 @@
<!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">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</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">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&nbsp;
import Defaults from './Defaults.js';
&nbsp;
class Parser{
constructor(config){
if(!config){
config=new Defaults;
}
this.delimiter=config.delimiter;
}
&nbsp;
format(message){
if(!message.data &amp;&amp; message.data!==false &amp;&amp; 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>
&nbsp;
message=message.JSON+this.delimiter;
return message;
}
&nbsp;
parse(data){
let events=data.split(this.delimiter);
events.pop();
return events;
}
}
&nbsp;
export {
Parser as default,
Parser
};
&nbsp;</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>

126
coverage/node-ipc/entities/index.html generated Normal file
View file

@ -0,0 +1,126 @@
<!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>

113
coverage/node-ipc/helpers/delay.js.html generated Normal file
View file

@ -0,0 +1,113 @@
<!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 =&gt; {
setTimeout(resolve, ms);
}
);
}
&nbsp;
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>

111
coverage/node-ipc/helpers/index.html generated Normal file
View file

@ -0,0 +1,111 @@
<!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>

111
coverage/node-ipc/index.html generated Normal file
View file

@ -0,0 +1,111 @@
<!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>

131
coverage/node-ipc/node-ipc.js.html generated Normal file
View file

@ -0,0 +1,131 @@
<!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">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import IPC from './services/IPC.js';
&nbsp;
class IPCModule extends IPC{
constructor(){
super();
&nbsp;
}
&nbsp;
IPC=IPC;
}
&nbsp;
const singleton=new IPCModule;
&nbsp;
export {
singleton as default,
IPCModule
}
&nbsp;</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>

1091
coverage/node-ipc/services/IPC.js.html generated Normal file

File diff suppressed because it is too large Load diff

111
coverage/node-ipc/services/index.html generated Normal file
View file

@ -0,0 +1,111 @@
<!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
coverage/prettify.css generated Normal file
View file

@ -0,0 +1 @@
.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}

2
coverage/prettify.js generated Normal file

File diff suppressed because one or more lines are too long

BIN
coverage/sort-arrow-sprite.png generated Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

170
coverage/sorter.js generated Normal file
View file

@ -0,0 +1,170 @@
/* 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);

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

258
dao/client.js Normal file
View file

@ -0,0 +1,258 @@
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:0;
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){
message=Buffer.from(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)
);
}
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){
client.log('\n\n######\nerror: ', client.id ,' client has not specified socket path it wishes to connect to.');
return;
}
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){
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);
}else{
client.log('Connecting client via TLS to', client.path ,client.port,client.config.tls);
if(client.config.tls.private){
client.config.tls.key=fs.readFileSync(client.config.tls.private);
}
if(client.config.tls.public){
client.config.tls.cert=fs.readFileSync(client.config.tls.public);
}
if(client.config.tls.trustedConnections){
if(typeof client.config.tls.trustedConnections === 'string'){
client.config.tls.trustedConnections=[client.config.tls.trustedConnections];
}
client.config.tls.ca=[];
for(let i=0; i<client.config.tls.trustedConnections.length; i++){
client.config.tls.ca.push(
fs.readFileSync(client.config.tls.trustedConnections[i])
);
}
}
Object.assign(client.config.tls,options);
client.socket = tls.connect(
client.config.tls
);
}
}
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) {
return;
}
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){
client.publish(
'data',
Buffer.from(data,client.config.encoding)
);
if(!client.config.sync){
return;
}
client.queue.next();
return;
}
if(!this.ipcBuffer){
this.ipcBuffer='';
}
data=(this.ipcBuffer+=data);
if(data.slice(-1)!=eventParser.delimiter || data.indexOf(eventParser.delimiter) == -1){
client.log('Messages are large, You may want to consider smaller messages.');
return;
}
this.ipcBuffer='';
const events = 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
};

399
dao/socketServer.js Normal file
View file

@ -0,0 +1,399 @@
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)();
}
}
}
function emit(socket, type, data){
this.log('dispatching event to socket', ' : ', type, data);
let message=new Message;
message.type=type;
message.data=data;
if(this.config.rawBuffer){
this.log(this.config.encoding)
message=Buffer.from(type,this.config.encoding);
}else{
message=eventParser.format(message);
}
if(this.udp4 || this.udp6){
if(!socket.address || !socket.port){
this.log('Attempting to emit to a single UDP socket without supplying socket address or port. Redispatching event as broadcast to all connected sockets');
this.broadcast(type,data);
return;
}
this.server.write(
message,
socket
);
return;
}
socket.write(message);
}
function broadcast(type,data){
this.log('broadcasting event to all known sockets listening to ', this.path,' : ', ((this.port)?this.port:''), type, data);
let message=new Message;
message.type=type;
message.data=data;
if(this.config.rawBuffer){
message=Buffer.from(type,this.config.encoding);
}else{
message=eventParser.format(message);
}
if(this.udp4 || this.udp6){
for(let i=1, count=this.sockets.length; i<count; i++){
this.server.write(message,this.sockets[i]);
}
}else{
for(let i=0, count=this.sockets.length; i<count; i++){
this.sockets[i].write(message);
}
}
}
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){
return;
}
this.log('Received UDP message from ', rinfo.address, rinfo.port);
let data;
if(this.config.rawSocket){
data=Buffer.from(msg,this.config.encoding);
}else{
data=msg.toString();
}
socket.emit('data',data,rinfo);
}.bind(this)
);
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);
}
);
}
}
);
}
export {
Server as default,
Server
};

66
entities/Defaults.js Normal file
View file

@ -0,0 +1,66 @@
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') ? '::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]
][0].family;
}
return IPType;
}
export {
Defaults as default,
Defaults
}

34
entities/EventParser.js Normal file
View file

@ -0,0 +1,34 @@
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
};

View file

@ -1,13 +1,13 @@
var ipc=require('../../../node-ipc');
import ipc from '../../../node-ipc.js';
/***************************************\
*
*
* You should start both hello and world
* then you will see them communicating.
*
*
* *************************************/
ipc.config.id = 'goodbye';
ipc.config.id = 'goodbye';
ipc.config.retry= 1500;
ipc.config.maxRetries= 10;
@ -17,28 +17,28 @@ ipc.connectToNet(
ipc.of.world.on(
'connect',
function(){
ipc.log('## connected to world ##'.rainbow, ipc.config.delay);
ipc.log('## connected to world ##', ipc.config.delay);
ipc.of.world.emit(
'app.message',
{
id : ipc.config.id,
message : 'goodbye'
}
)
);
}
);
ipc.of.world.on(
'disconnect',
function(){
ipc.log('disconnected from world'.notice);
ipc.log('disconnected from world');
}
);
ipc.of.world.on(
'kill.connection',
function(data){
ipc.log('world requested kill.connection'.notice);
ipc.log('world requested kill.connection');
ipc.disconnect('world');
}
);
}
);
);

View file

@ -1,13 +1,13 @@
var ipc=require('../../../node-ipc');
import ipc from '../../../node-ipc.js';
/***************************************\
*
*
* You should start both hello and world
* then you will see them communicating.
*
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.config.maxRetries=10;
@ -17,34 +17,34 @@ ipc.connectToNet(
ipc.of.world.on(
'connect',
function(){
ipc.log('## connected to world ##'.rainbow, ipc.config.delay);
ipc.log('## connected to world ##', ipc.config.delay);
ipc.of.world.emit(
'app.message',
{
id : ipc.config.id,
message : 'hello'
}
)
);
}
);
ipc.of.world.on(
'disconnect',
function(){
ipc.log('disconnected from world'.notice);
ipc.log('disconnected from world');
}
);
ipc.of.world.on(
'app.message',
function(data){
ipc.log('got a message from world : '.debug, data.messgae);
ipc.log('got a message from world : ', data.message);
}
);
ipc.of.world.on(
'kill.connection',
function(data){
ipc.log('world requested kill.connection'.notice);
ipc.log('world requested kill.connection');
ipc.disconnect('world');
}
);
}
);
);

View file

@ -1,26 +1,26 @@
var ipc=require('../../../node-ipc');
import ipc from '../../../node-ipc.js';
/***************************************\
*
*
* You should start both hello and world
* then you will see them communicating.
*
*
* *************************************/
ipc.config.id = 'world';
ipc.config.id = 'world';
ipc.config.retry= 1500;
var messages={
goodbye:false,
hello:false
}
};
ipc.serveNet(
function(){
ipc.server.on(
'app.message',
function(data,socket){
ipc.log('got a message from'.debug, (data.id).variable, (data.message).data);
ipc.log('got a message from', (data.id), (data.message));
messages[data.id]=true;
ipc.server.emit(
socket,
@ -30,9 +30,9 @@ ipc.serveNet(
message : data.message+' world!'
}
);
if(messages.hello && messages.goodbye){
ipc.log('got all required events, telling clients to kill connection'.good);
ipc.log('got all required events, telling clients to kill connection');
ipc.server.broadcast(
'kill.connection',
{
@ -45,7 +45,7 @@ ipc.serveNet(
}
);
ipc.server.define.listen['app.message']='This event type listens for message strings as value of data key.';
ipc.server.define.broadcast['kill.connection']='This event is a command to kill connection to this server, the data object will contain the id of this server incase the client needs it';
ipc.server.start();

View file

@ -1,13 +1,13 @@
var ipc=require('../../../node-ipc');
import ipc from '../../../node-ipc.js';
/***************************************\
*
*
* You should start both hello and world
* then you will see them communicating.
*
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.connectToNet(
@ -16,26 +16,24 @@ ipc.connectToNet(
ipc.of.world.on(
'connect',
function(){
ipc.log('## connected to world ##'.rainbow, ipc.config.delay);
ipc.log('## connected to world ##', ipc.config.delay);
ipc.of.world.emit(
'message',
'hello'
)
);
}
);
ipc.of.world.on(
'disconnect',
function(){
ipc.log('disconnected from world'.notice);
ipc.log('disconnected from world');
}
);
ipc.of.world.on(
'message',
function(data){
ipc.log('got a message from world : '.debug, data);
ipc.log('got a message from world : ', data);
}
);
}
);
console.log(ipc)

View file

@ -1,21 +1,22 @@
var ipc=require('../../../node-ipc');
import ipc from '../../../node-ipc.js';
/***************************************\
*
*
* You should start both hello and world
* then you will see them communicating.
*
*
* *************************************/
ipc.config.id = 'world';
ipc.config.id = 'world';
ipc.config.retry= 1500;
ipc.config.maxConnections=1;
ipc.serveNet(
function(){
ipc.server.on(
'message',
function(data,socket){
ipc.log('got a message : '.debug, data);
ipc.log('got a message : ', data);
ipc.server.emit(
socket,
'message',
@ -23,16 +24,21 @@ ipc.serveNet(
);
}
);
ipc.server.on(
'socket.disconnected',
function(data,socket){
console.log(arguments)
console.log('DISCONNECTED\n\n',arguments);
}
);
}
);
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
ipc.server.on(
'error',
function(err){
ipc.log('Got an ERROR!',err);
}
);
ipc.server.start();
ipc.server.start();

View file

@ -0,0 +1,46 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.config.sync= true;
ipc.connectToNet(
'world',
function(){
ipc.of.world.on(
'connect',
function(){
ipc.log('## connected to world ##', ipc.config.delay);
//queue up a bunch of requests to be sent synchronously
for(var i=0; i<10; i++){
ipc.of.world.emit(
'message',
'hello'+i
);
}
}
);
ipc.of.world.on(
'disconnect',
function(){
ipc.log('disconnected from world');
}
);
ipc.of.world.on(
'message',
function(data){
ipc.log('got a message from world : ', data,'\n\n');
}
);
}
);
console.log(ipc);

View file

@ -0,0 +1,45 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'world';
ipc.config.retry= 1500;
ipc.config.sync = true;
ipc.serveNet(
function(){
ipc.server.on(
'message',
function(data,socket){
ipc.log('got a message : ', data);
//fake some synch procedural code
setTimeout(
function(){
ipc.server.emit(
socket,
'message',
data+' world!'
);
},
3000
);
}
);
ipc.server.on(
'socket.disconnected',
function(data,socket){
console.log(arguments);
}
);
}
);
ipc.server.start();

View file

@ -0,0 +1,35 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.config.rawBuffer=true;
ipc.config.encoding='ascii';
ipc.connectToNet(
'world',
function(){
ipc.of.world.on(
'connect',
function(){
ipc.log('## connected to world ##', ipc.config.delay);
ipc.of.world.emit(
'hello'
);
}
);
ipc.of.world.on(
'data',
function(data){
ipc.log('got a message from world : ', data,data.toString());
}
);
}
);

View file

@ -0,0 +1,40 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'world';
ipc.config.retry= 1500;
ipc.config.rawBuffer=true;
ipc.config.encoding='ascii';
ipc.serveNet(
function(){
ipc.server.on(
'connect',
function(socket){
ipc.server.emit(
socket,
'hello'
);
}
);
ipc.server.on(
'data',
function(data,socket){
ipc.log('got a message', data,data.toString());
ipc.server.emit(
socket,
'goodbye'
);
}
);
}
);
ipc.server.start();

View file

@ -0,0 +1,47 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'goodbye';
ipc.config.retry= 1500;
ipc.config.maxRetries= 10;
ipc.config.tls={
rejectUnauthorized:false
};
ipc.connectToNet(
'world',
function(){
ipc.of.world.on(
'connect',
function(){
ipc.log('## connected to world ##', ipc.config.delay);
ipc.of.world.emit(
'app.message',
{
id : ipc.config.id,
message : 'goodbye'
}
);
}
);
ipc.of.world.on(
'disconnect',
function(){
ipc.log('disconnected from world');
}
);
ipc.of.world.on(
'kill.connection',
function(data){
ipc.log('world requested kill.connection');
ipc.disconnect('world');
}
);
}
);

View file

@ -0,0 +1,53 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.config.maxRetries=10;
ipc.config.tls={
rejectUnauthorized:false
};
ipc.connectToNet(
'world',
function(){
ipc.of.world.on(
'connect',
function(){
ipc.log('## connected to world ##', ipc.config.delay);
ipc.of.world.emit(
'app.message',
{
id : ipc.config.id,
message : 'hello'
}
);
}
);
ipc.of.world.on(
'disconnect',
function(){
ipc.log('disconnected from world');
}
);
ipc.of.world.on(
'app.message',
function(data){
ipc.log('got a message from world : ', data.message);
}
);
ipc.of.world.on(
'kill.connection',
function(data){
ipc.log('world requested kill.connection');
ipc.disconnect('world');
}
);
}
);

View file

@ -0,0 +1,55 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'world';
ipc.config.retry= 1500;
ipc.config.tls={
public: __dirname+'/../../../local-node-ipc-certs/server.pub',
private: __dirname+'/../../../local-node-ipc-certs/private/server.key'
};
var messages={
goodbye:false,
hello:false
};
ipc.serveNet(
function(){
ipc.server.on(
'app.message',
function(data,socket){
ipc.log('got a message from', (data.id), (data.message));
messages[data.id]=true;
ipc.server.emit(
socket,
'app.message',
{
id : ipc.config.id,
message : data.message+' world!'
}
);
if(messages.hello && messages.goodbye){
ipc.log('got all required events, telling clients to kill connection');
ipc.server.broadcast(
'kill.connection',
{
id:ipc.config.id
}
);
}
}
);
}
);
ipc.server.start();

View file

@ -0,0 +1,42 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.config.tls={
rejectUnauthorized:false
};
ipc.connectToNet(
'world',
function(){
ipc.of.world.on(
'connect',
function(){
ipc.log('## connected to world ##', ipc.config.delay);
ipc.of.world.emit(
'message',
'hello'
);
}
);
ipc.of.world.on(
'disconnect',
function(){
ipc.log('disconnected from world');
}
);
ipc.of.world.on(
'message',
function(data){
ipc.log('got a message from world : ', data);
}
);
}
);

View file

@ -0,0 +1,42 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'world';
ipc.config.retry= 1500;
//node-ipc will default to its local certs
ipc.config.tls={
rejectUnauthorized:false
};
ipc.serveNet(
function(){
ipc.server.on(
'message',
function(data,socket){
ipc.log('got a message : ', data);
ipc.server.emit(
socket,
'message',
data+' world!'
);
}
);
ipc.server.on(
'socket.disconnected',
function(data,socket){
console.log(arguments);
}
);
}
);
ipc.server.start();

View file

@ -0,0 +1,47 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.config.tls={
private: __dirname+'/../../../local-node-ipc-certs/private/client.key',
public: __dirname+'/../../../local-node-ipc-certs/client.pub',
rejectUnauthorized:false,
trustedConnections: [
__dirname+'/../../../local-node-ipc-certs/server.pub'
]
};
ipc.connectToNet(
'world',
function(){
ipc.of.world.on(
'connect',
function(){
ipc.log('## connected to world ##', ipc.config.delay);
ipc.of.world.emit(
'message',
'hello'
);
}
);
ipc.of.world.on(
'disconnect',
function(){
ipc.log('disconnected from world');
}
);
ipc.of.world.on(
'message',
function(data){
ipc.log('got a message from world : ', data);
}
);
}
);

View file

@ -0,0 +1,48 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'world';
ipc.config.retry= 1500;
ipc.config.tls={
public: __dirname+'/../../../local-node-ipc-certs/server.pub',
private: __dirname+'/../../../local-node-ipc-certs/private/server.key',
dhparam: __dirname+'/../../../local-node-ipc-certs/private/dhparam.pem',
requestCert: true,
rejectUnauthorized:false,
trustedConnections: [
__dirname+'/../../../local-node-ipc-certs/client.pub'
]
};
ipc.serveNet(
function(){
ipc.server.on(
'message',
function(data,socket){
ipc.log('got a message : ', data);
ipc.server.emit(
socket,
'message',
data+' world!'
);
}
);
ipc.server.on(
'socket.disconnected',
function(data,socket){
console.log(arguments);
}
);
}
);
ipc.server.start();

View file

@ -0,0 +1,48 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.config.networkHost='localhost';
ipc.config.tls={
private: __dirname+'/../../../local-node-ipc-certs/private/client.key',
public: __dirname+'/../../../local-node-ipc-certs/client.pub',
rejectUnauthorized:true,
trustedConnections: [
__dirname+'/../../../local-node-ipc-certs/server.pub'
]
};
ipc.connectToNet(
'world',
function(){
ipc.of.world.on(
'connect',
function(){
ipc.log('## connected to world ##', ipc.config.delay);
ipc.of.world.emit(
'message',
'hello'
);
}
);
ipc.of.world.on(
'disconnect',
function(){
ipc.log('disconnected from world');
}
);
ipc.of.world.on(
'message',
function(data){
ipc.log('got a message from world : ', data);
}
);
}
);

View file

@ -0,0 +1,49 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'world';
ipc.config.retry= 1500;
ipc.config.networkHost='localhost';
ipc.config.tls={
public: __dirname+'/../../../local-node-ipc-certs/server.pub',
private: __dirname+'/../../../local-node-ipc-certs/private/server.key',
dhparam: __dirname+'/../../../local-node-ipc-certs/private/dhparam.pem',
requestCert: true,
rejectUnauthorized:true,
trustedConnections: [
__dirname+'/../../../local-node-ipc-certs/client.pub'
]
};
ipc.serveNet(
function(){
ipc.server.on(
'message',
function(data,socket){
ipc.log('got a message : ', data);
ipc.server.emit(
socket,
'message',
data+' world!'
);
}
);
ipc.server.on(
'socket.disconnected',
function(data,socket){
console.log(arguments);
}
);
}
);
ipc.server.start();

View file

@ -0,0 +1,42 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.config.tls={
rejectUnauthorized:false
};
ipc.connectToNet(
'world',
function(){
ipc.of.world.on(
'connect',
function(){
ipc.log('## connected to world ##', ipc.config.delay);
ipc.of.world.emit(
'message',
'hello'
);
}
);
ipc.of.world.on(
'disconnect',
function(){
ipc.log('disconnected from world');
}
);
ipc.of.world.on(
'message',
function(data){
ipc.log('got a message from world : ', data);
}
);
}
);

View file

@ -0,0 +1,42 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'world';
ipc.config.retry= 1500;
ipc.config.tls={
public: __dirname+'/../../../local-node-ipc-certs/server.pub',
private: __dirname+'/../../../local-node-ipc-certs/private/server.key'
};
ipc.serveNet(
function(){
ipc.server.on(
'message',
function(data,socket){
ipc.log('got a message : ', data);
ipc.server.emit(
socket,
'message',
data+' world!'
);
}
);
ipc.server.on(
'socket.disconnected',
function(data,socket){
console.log(arguments);
}
);
}
);
ipc.server.start();

View file

@ -0,0 +1,47 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.config.sync= true;
ipc.config.tls={
rejectUnauthorized:false
};
ipc.connectToNet(
'world',
function(){
ipc.of.world.on(
'connect',
function(){
ipc.log('## connected to world ##', ipc.config.delay);
//queue up a bunch of requests to be sent synchronously
for(var i=0; i<10; i++){
ipc.of.world.emit(
'message',
'hello'+i
);
}
}
);
ipc.of.world.on(
'disconnect',
function(){
ipc.log('disconnected from world');
}
);
ipc.of.world.on(
'message',
function(data){
ipc.log('got a message from world : ', data);
}
);
}
);

View file

@ -0,0 +1,48 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'world';
ipc.config.retry= 1500;
ipc.config.sync= true;
ipc.config.tls={
public: __dirname+'/../../../local-node-ipc-certs/server.pub',
private: __dirname+'/../../../local-node-ipc-certs/private/server.key'
};
ipc.serveNet(
function(){
ipc.server.on(
'message',
function(data,socket){
ipc.log('got a message : ', data);
setTimeout(
function(){
ipc.server.emit(
socket,
'message',
data+' world!'
);
},
3000
);
}
);
ipc.server.on(
'socket.disconnected',
function(data,socket){
console.log(arguments);
}
);
}
);
ipc.server.start();

View file

@ -0,0 +1,45 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.config.rawBuffer=true;
ipc.config.encoding='ascii';
ipc.config.networkHost='localhost';
ipc.config.tls={
private: __dirname+'/../../../local-node-ipc-certs/private/client.key',
public: __dirname+'/../../../local-node-ipc-certs/client.pub',
rejectUnauthorized:true,
trustedConnections: [
__dirname+'/../../../local-node-ipc-certs/server.pub'
]
};
ipc.connectToNet(
'world',
function(){
ipc.of.world.on(
'connect',
function(){
ipc.log('## connected to world ##', ipc.config.delay);
ipc.of.world.emit(
'hello'
);
}
);
ipc.of.world.on(
'data',
function(data){
ipc.log('got a message from world : ', data,data.toString());
}
);
}
);

View file

@ -0,0 +1,53 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'world';
ipc.config.retry= 1500;
ipc.config.rawBuffer=true;
ipc.config.encoding='ascii';
ipc.config.networkHost='localhost';
ipc.config.tls={
public: __dirname+'/../../../local-node-ipc-certs/server.pub',
private: __dirname+'/../../../local-node-ipc-certs/private/server.key',
dhparam: __dirname+'/../../../local-node-ipc-certs/private/dhparam.pem',
requestCert: true,
rejectUnauthorized:true,
trustedConnections: [
__dirname+'/../../../local-node-ipc-certs/client.pub'
]
};
ipc.serveNet(
function(){
ipc.server.on(
'connect',
function(socket){
console.log('connection detected');
ipc.server.emit(
socket,
'hello'
);
}
);
ipc.server.on(
'data',
function(data,socket){
ipc.log('got a message', data,data.toString());
ipc.server.emit(
socket,
'goodbye'
);
}
);
}
);
ipc.server.start();

View file

@ -0,0 +1,25 @@
# Using TLS and SSL for Secure node-ipc
### document in progress
Still working on this. If you look at the examples and can help, please jump right in.
#### 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
#### talk about using hostname not ip for best security validation of certs
#### examples
- basic with default keys
- specikfying keys
- encrypted but venerable to man in the middle
- two way authenticated pub private

View file

@ -1,21 +1,21 @@
var ipc=require('../../../node-ipc');
import ipc from '../../../node-ipc.js';
/***************************************\
*
*
* Since there is no client relationship
* with UDP sockets sockets are not kept
* with UDP sockets sockets are not kept
* open.
*
*
* This means the order sockets are opened
* is important.
*
* Start World first. Then you can start
*
* Start World first. Then you can start
* hello or goodbye in any order you
* choose.
*
*
* *************************************/
ipc.config.id = 'goodbye';
ipc.config.id = 'goodbye';
ipc.config.retry= 1500;
ipc.serveNet(
@ -26,7 +26,7 @@ ipc.serveNet(
'message',
function(data){
ipc.log('got Data');
ipc.log('got a message from '.debug, data.id.variable ,' : '.debug, data.message.data);
ipc.log('got a message from ', data.id ,' : ', data.message);
}
);
ipc.server.emit(
@ -43,6 +43,6 @@ ipc.serveNet(
}
);
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
ipc.server.start();
ipc.server.start();

View file

@ -1,21 +1,21 @@
var ipc=require('../../../node-ipc');
import ipc from '../../../node-ipc.js';
/***************************************\
*
*
* Since there is no client relationship
* with UDP sockets sockets are not kept
* with UDP sockets sockets are not kept
* open.
*
*
* This means the order sockets are opened
* is important.
*
* Start World first. Then you can start
*
* Start World first. Then you can start
* hello or goodbye in any order you
* choose.
*
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.serveNet(
@ -26,7 +26,7 @@ ipc.serveNet(
'message',
function(data){
ipc.log('got Data');
ipc.log('got a message from '.debug, data.id.variable ,' : '.debug, data.message.data);
ipc.log('got a message from ', data.id ,' : ', data.message);
}
);
ipc.server.emit(
@ -43,6 +43,6 @@ ipc.serveNet(
}
);
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
ipc.server.start();
ipc.server.start();

View file

@ -1,27 +1,27 @@
var ipc=require('../../../node-ipc');
import ipc from '../../../node-ipc.js';
/***************************************\
*
*
* Since there is no client relationship
* with UDP sockets sockets are not kept
* with UDP sockets sockets are not kept
* open.
*
*
* This means the order sockets are opened
* is important.
*
* Start World first. Then you can start
*
* Start World first. Then you can start
* hello or goodbye in any order you
* choose.
*
*
***************************************/
ipc.config.id = 'world';
ipc.config.id = 'world';
ipc.config.retry= 1500;
var messages={
goodbye:false,
hello:false
}
};
ipc.serveNet(
'udp4',
@ -30,7 +30,7 @@ ipc.serveNet(
ipc.server.on(
'message',
function(data,socket){
ipc.log('got a message from '.debug, data.id.variable ,' : '.debug, data.message.data);
ipc.log('got a message from ', data.id ,' : ', data.message);
messages[data.id]=true;
ipc.server.emit(
socket,
@ -40,9 +40,9 @@ ipc.serveNet(
message : data.message+' world!'
}
);
if(messages.hello && messages.goodbye){
ipc.log('got all required events, telling evryone how muchg I am loved!'.good);
ipc.log('got all required events, telling evryone how muchg I am loved!');
ipc.server.broadcast(
'message',
{
@ -53,11 +53,11 @@ ipc.serveNet(
}
}
);
console.log(ipc.server);
}
);
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
ipc.server.start();
ipc.server.start();

View file

@ -1,25 +1,25 @@
var ipc=require('../../../node-ipc');
import ipc from '../../../node-ipc.js';
/***************************************\
*
*
* UDP Client is really a UDP server
*
* Dedicated UDP sockets on the same
*
* Dedicated UDP sockets on the same
* machine can not be bound to in the
* traditional client/server method
*
*
* Every UDP socket is it's own UDP server
* And so must have a unique port on its
* machine, unlike TCP or Unix Sockts
* which can share on the same machine.
*
*
* Since there is no open client server
* relationship, you should start world
* first and then hello.
*
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.serveNet(
@ -30,7 +30,7 @@ ipc.serveNet(
'message',
function(data){
ipc.log('got Data');
ipc.log('got a message from '.debug, data.id.variable ,' : '.debug, data.message.data);
ipc.log('got a message from ', data.id ,' : ', data.message);
}
);
ipc.server.emit(
@ -47,6 +47,6 @@ ipc.serveNet(
}
);
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
ipc.server.start();
ipc.server.start();

View file

@ -1,35 +1,34 @@
var ipc=require('../../../node-ipc');
import ipc from '../../../node-ipc.js';
/***************************************\
*
*
* UDP Client is really a UDP server
*
* Dedicated UDP sockets on the same
*
* Dedicated UDP sockets on the same
* machine can not be bound to in the
* traditional client/server method
*
*
* Every UDP socket is it's own UDP server
* And so must have a unique port on its
* machine, unlike TCP or Unix Sockts
* which can share on the same machine.
*
*
* Since there is no open client server
* relationship, you should start world
* first and then hello.
*
*
***************************************/
ipc.config.id = 'world';
ipc.config.id = 'world';
ipc.config.retry= 1500;
ipc.serveNet(
'udp4',
function(){
console.log(123);
ipc.server.on(
'message',
function(data,socket){
ipc.log('got a message from '.debug, data.id.variable ,' : '.debug, data.message.data);
ipc.log('got a message from ', data.id ,' : ', data.message);
ipc.server.emit(
socket,
'message',
@ -43,6 +42,6 @@ ipc.serveNet(
}
);
ipc.server.define.listen.message='This event type listens for message strings as value of data key.';
ipc.server.start();
ipc.server.start();

View file

@ -0,0 +1,35 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.config.rawBuffer=true;
ipc.config.encoding='ascii';
ipc.serveNet(
8001, //we set the port here because the world server is already using the default of 8000. So we can not bind to 8000 while world is using it.
'udp4',
function(){
ipc.server.on(
'data',
function(data){
ipc.log('got a message from world ', data, data.toString());
}
);
ipc.server.emit(
{
address : 'localhost',
port : ipc.config.networkPort
},
'hello'
);
}
);
ipc.server.start();

View file

@ -0,0 +1,43 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* UDP Client is really a UDP server
*
* Dedicated UDP sockets on the same
* machine can not be bound to in the
* traditional client/server method
*
* Every UDP socket is it's own UDP server
* And so must have a unique port on its
* machine, unlike TCP or Unix Sockts
* which can share on the same machine.
*
* Since there is no open client server
* relationship, you should start world
* first and then hello.
*
***************************************/
ipc.config.id = 'world';
ipc.config.retry= 1500;
ipc.config.rawBuffer=true;
ipc.config.encoding='ascii';
ipc.serveNet(
'udp4',
function(){
ipc.server.on(
'data',
function(data,socket){
ipc.log('got a message', data,data.toString());
ipc.server.emit(
socket,
'goodbye'
);
}
);
}
);
ipc.server.start();

View file

@ -0,0 +1,31 @@
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');
}
);
}

View file

@ -0,0 +1,34 @@
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}`);
}

View file

@ -0,0 +1,42 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.config.rawBuffer=true;
ipc.config.encoding='hex';
ipc.connectTo(
'world',
function(){
ipc.of.world.on(
'connect',
function(){
//make a 6 byte buffer for example
const myBuffer=Buffer.alloc(6).fill(0);
myBuffer.writeUInt16BE(0x02,0);
myBuffer.writeUInt32BE(0xffeecc,2);
ipc.log('## connected to world ##', ipc.config.delay);
ipc.of.world.emit(
myBuffer
);
}
);
ipc.of.world.on(
'data',
function(data){
ipc.log('got a message from world : ', data);
}
);
}
);

View file

@ -0,0 +1,40 @@
import ipc from '../../../node-ipc.js';
/***************************************\
*
* You should start both hello and world
* then you will see them communicating.
*
* *************************************/
ipc.config.id = 'world';
ipc.config.retry= 1500;
ipc.config.rawBuffer=true;
ipc.config.encoding='hex';
ipc.serve(
function(){
ipc.server.on(
'connect',
function(socket){
ipc.server.emit(
socket,
[0xaa]
);
}
);
ipc.server.on(
'data',
function(data,socket){
ipc.log('got a message', data);
ipc.server.emit(
socket,
[0x0d,0xee]
);
}
);
}
);
ipc.server.start();

View file

@ -1,4 +1,4 @@
var ipc=require('../../../node-ipc');
import ipc from '../../../node-ipc.js';
/***************************************\
*
@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc');
*
* *************************************/
ipc.config.id = 'goodbye';
ipc.config.id = 'goodbye';
ipc.config.retry= 1500;
ipc.connectTo(
@ -16,28 +16,28 @@ ipc.connectTo(
ipc.of.world.on(
'connect',
function(){
ipc.log('## connected to world ##'.rainbow, ipc.config.delay);
ipc.log('## connected to world ##', ipc.config.delay);
ipc.of.world.emit(
'app.message',
{
id : ipc.config.id,
message : 'goodbye'
}
)
);
}
);
ipc.of.world.on(
'disconnect',
function(){
ipc.log('disconnected from world'.notice);
ipc.log('disconnected from world');
}
);
ipc.of.world.on(
'kill.connection',
function(data){
ipc.log('world requested kill.connection'.notice);
ipc.log('world requested kill.connection');
ipc.disconnect('world');
}
);
}
);
);

View file

@ -1,4 +1,4 @@
var ipc=require('../../../node-ipc');
import ipc from '../../../node-ipc.js';
/***************************************\
*
@ -7,7 +7,7 @@ var ipc=require('../../../node-ipc');
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.id = 'hello';
ipc.config.retry= 1500;
ipc.connectTo(
@ -16,34 +16,34 @@ ipc.connectTo(
ipc.of.world.on(
'connect',
function(){
ipc.log('## connected to world ##'.rainbow, ipc.config.delay);
ipc.log('## connected to world ##', ipc.config.delay);
ipc.of.world.emit(
'app.message',
{
id : ipc.config.id,
message : 'hello'
}
)
);
}
);
ipc.of.world.on(
'disconnect',
function(){
ipc.log('disconnected from world'.notice);
ipc.log('disconnected from world');
}
);
ipc.of.world.on(
'app.message',
function(data){
ipc.log('got a message from world : '.debug, data);
ipc.log('got a message from world : ', data);
}
);
ipc.of.world.on(
'kill.connection',
function(data){
ipc.log('world requested kill.connection'.notice);
ipc.log('world requested kill.connection');
ipc.disconnect('world');
}
);
}
);
);

View file

@ -1,26 +1,26 @@
var ipc=require('../../../node-ipc');
import ipc from '../../../node-ipc.js';
/***************************************\
*
*
* You should start both hello and world
* then you will see them communicating.
*
*
* *************************************/
ipc.config.id = 'world';
ipc.config.id = 'world';
ipc.config.retry= 1500;
var messages={
goodbye:false,
hello:false
}
};
ipc.serve(
function(){
ipc.server.on(
'app.message',
function(data,socket){
ipc.log('got a message from'.debug, (data.id).variable, (data.message).data);
ipc.log('got a message from', (data.id), (data.message));
messages[data.id]=true;
ipc.server.emit(
socket,
@ -30,9 +30,9 @@ ipc.serve(
message : data.message+' world!'
}
);
if(messages.hello && messages.goodbye){
ipc.log('got all required events, telling clients to kill connection'.good);
ipc.log('got all required events, telling clients to kill connection');
ipc.server.broadcast(
'kill.connection',
{
@ -45,7 +45,7 @@ ipc.serve(
}
);
ipc.server.define.listen['app.message']='This event type listens for message strings as value of data key.';
ipc.server.define.broadcast['kill.connection']='This event is a command to kill connection to this server, the data object will contain the id of this server incase the client needs it';
ipc.server.start();

View file

@ -1,13 +1,13 @@
var ipc=require('../../../node-ipc');
import ipc from '../../../node-ipc.js';
/***************************************\
*
*
* You should start both hello and world
* then you will see them communicating.
*
*
* *************************************/
ipc.config.id = 'hello';
ipc.config.id = 'hello';
ipc.config.retry = 1000;
ipc.connectTo(
@ -16,26 +16,26 @@ ipc.connectTo(
ipc.of.world.on(
'connect',
function(){
ipc.log('## connected to world ##'.rainbow, ipc.config.delay);
ipc.log('## connected to world ##', ipc.config.delay);
ipc.of.world.emit(
'app.message',
{
id : ipc.config.id,
message : 'hello'
}
)
);
}
);
ipc.of.world.on(
'disconnect',
function(){
ipc.log('disconnected from world'.notice);
ipc.log('disconnected from world');
}
);
ipc.of.world.on(
'app.message',
function(data){
ipc.log('got a message from world : '.debug, data);
ipc.log('got a message from world : ', data);
}
);

Some files were not shown because too many files have changed in this diff Show more