@@ -75,7 +75,7 @@ var readdir = _util["default"].promisify(_fs["default"].readdir);
7575var chmod = _util [ "default" ] . promisify ( _fs [ "default" ] . chmod ) ;
7676var rmDir = _util [ "default" ] . promisify ( _fs [ "default" ] . rm ) ;
7777var removeDir = /*#__PURE__*/ function ( ) {
78- var _ref = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee ( p ) {
78+ var _ref = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee ( p ) {
7979 return _regenerator [ "default" ] . wrap ( function _callee$ ( _context ) {
8080 while ( 1 ) switch ( _context . prev = _context . next ) {
8181 case 0 :
@@ -142,7 +142,7 @@ function ensureBaseFolderExists() {
142142 return _ensureBaseFolderExists . apply ( this , arguments ) ;
143143}
144144function _ensureBaseFolderExists ( ) {
145- _ensureBaseFolderExists = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee4 ( ) {
145+ _ensureBaseFolderExists = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee4 ( ) {
146146 return _regenerator [ "default" ] . wrap ( function _callee4$ ( _context4 ) {
147147 while ( 1 ) switch ( _context4 . prev = _context4 . next ) {
148148 case 0 :
@@ -168,7 +168,7 @@ function ensureFoldersExist(_x2, _x3) {
168168 * @return {Promise<true> }
169169 */
170170function _ensureFoldersExist ( ) {
171- _ensureFoldersExist = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee5 ( channelName , paths ) {
171+ _ensureFoldersExist = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee5 ( channelName , paths ) {
172172 var chmodValue ;
173173 return _regenerator [ "default" ] . wrap ( function _callee5$ ( _context5 ) {
174174 while ( 1 ) switch ( _context5 . prev = _context5 . next ) {
@@ -207,7 +207,7 @@ function clearNodeFolder() {
207207 return _clearNodeFolder . apply ( this , arguments ) ;
208208}
209209function _clearNodeFolder ( ) {
210- _clearNodeFolder = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee6 ( ) {
210+ _clearNodeFolder = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee6 ( ) {
211211 return _regenerator [ "default" ] . wrap ( function _callee6$ ( _context6 ) {
212212 while ( 1 ) switch ( _context6 . prev = _context6 . next ) {
213213 case 0 :
@@ -263,7 +263,7 @@ function countChannelFolders() {
263263 return _countChannelFolders . apply ( this , arguments ) ;
264264}
265265function _countChannelFolders ( ) {
266- _countChannelFolders = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee7 ( ) {
266+ _countChannelFolders = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee7 ( ) {
267267 var folders ;
268268 return _regenerator [ "default" ] . wrap ( function _callee7$ ( _context7 ) {
269269 while ( 1 ) switch ( _context7 . prev = _context7 . next ) {
@@ -292,7 +292,7 @@ function connectionError(_x4) {
292292 * @return {{emitter: EventEmitter, server: any} }
293293 */
294294function _connectionError ( ) {
295- _connectionError = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee8 ( originalError ) {
295+ _connectionError = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee8 ( originalError ) {
296296 var count , addObj , text ;
297297 return _regenerator [ "default" ] . wrap ( function _callee8$ ( _context8 ) {
298298 while ( 1 ) switch ( _context8 . prev = _context8 . next ) {
@@ -327,7 +327,7 @@ function createSocketEventEmitter(_x5, _x6, _x7) {
327327 return _createSocketEventEmitter . apply ( this , arguments ) ;
328328}
329329function _createSocketEventEmitter ( ) {
330- _createSocketEventEmitter = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee11 ( channelName , readerUuid , paths ) {
330+ _createSocketEventEmitter = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee11 ( channelName , readerUuid , paths ) {
331331 var pathToSocket , emitter , server ;
332332 return _regenerator [ "default" ] . wrap ( function _callee11$ ( _context11 ) {
333333 while ( 1 ) switch ( _context11 . prev = _context11 . next ) {
@@ -343,7 +343,7 @@ function _createSocketEventEmitter() {
343343 _context11 . next = 5 ;
344344 return new Promise ( function ( resolve , reject ) {
345345 server . on ( 'error' , /*#__PURE__*/ function ( ) {
346- var _ref5 = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee9 ( err ) {
346+ var _ref5 = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee9 ( err ) {
347347 var useErr ;
348348 return _regenerator [ "default" ] . wrap ( function _callee9$ ( _context9 ) {
349349 while ( 1 ) switch ( _context9 . prev = _context9 . next ) {
@@ -364,7 +364,7 @@ function _createSocketEventEmitter() {
364364 } ;
365365 } ( ) ) ;
366366 server . listen ( pathToSocket , /*#__PURE__*/ function ( ) {
367- var _ref6 = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee10 ( err , res ) {
367+ var _ref6 = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee10 ( err , res ) {
368368 var useErr ;
369369 return _regenerator [ "default" ] . wrap ( function _callee10$ ( _context10 ) {
370370 while ( 1 ) switch ( _context10 . prev = _context10 . next ) {
@@ -416,7 +416,7 @@ function openClientConnection(_x8, _x9) {
416416 * @return {Promise }
417417 */
418418function _openClientConnection ( ) {
419- _openClientConnection = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee12 ( channelName , readerUuid ) {
419+ _openClientConnection = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee12 ( channelName , readerUuid ) {
420420 var pathToSocket , client ;
421421 return _regenerator [ "default" ] . wrap ( function _callee12$ ( _context12 ) {
422422 while ( 1 ) switch ( _context12 . prev = _context12 . next ) {
@@ -470,7 +470,7 @@ function getReadersUuids(_x10, _x11) {
470470 return _getReadersUuids . apply ( this , arguments ) ;
471471}
472472function _getReadersUuids ( ) {
473- _getReadersUuids = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee13 ( channelName , paths ) {
473+ _getReadersUuids = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee13 ( channelName , paths ) {
474474 var readersPath , files ;
475475 return _regenerator [ "default" ] . wrap ( function _callee13$ ( _context13 ) {
476476 while ( 1 ) switch ( _context13 . prev = _context13 . next ) {
@@ -501,7 +501,7 @@ function messagePath(_x12, _x13, _x14, _x15) {
501501 return _messagePath . apply ( this , arguments ) ;
502502}
503503function _messagePath ( ) {
504- _messagePath = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee14 ( channelName , time , token , writerUuid ) {
504+ _messagePath = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee14 ( channelName , time , token , writerUuid ) {
505505 var fileName ;
506506 return _regenerator [ "default" ] . wrap ( function _callee14$ ( _context14 ) {
507507 while ( 1 ) switch ( _context14 . prev = _context14 . next ) {
@@ -520,7 +520,7 @@ function getAllMessages(_x16, _x17) {
520520 return _getAllMessages . apply ( this , arguments ) ;
521521}
522522function _getAllMessages ( ) {
523- _getAllMessages = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee15 ( channelName , paths ) {
523+ _getAllMessages = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee15 ( channelName , paths ) {
524524 var messagesPath , files ;
525525 return _regenerator [ "default" ] . wrap ( function _callee15$ ( _context15 ) {
526526 while ( 1 ) switch ( _context15 . prev = _context15 . next ) {
@@ -567,7 +567,7 @@ function cleanOldMessages(_x18, _x19) {
567567 return _cleanOldMessages . apply ( this , arguments ) ;
568568}
569569function _cleanOldMessages ( ) {
570- _cleanOldMessages = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee16 ( messageObjects , ttl ) {
570+ _cleanOldMessages = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee16 ( messageObjects , ttl ) {
571571 var olderThan ;
572572 return _regenerator [ "default" ] . wrap ( function _callee16$ ( _context16 ) {
573573 while ( 1 ) switch ( _context16 . prev = _context16 . next ) {
@@ -599,7 +599,7 @@ function create(_x20) {
599599 return _create . apply ( this , arguments ) ;
600600}
601601function _create ( ) {
602- _create = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee17 ( channelName ) {
602+ _create = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee17 ( channelName ) {
603603 var options ,
604604 time ,
605605 paths ,
@@ -708,7 +708,7 @@ function handleMessagePing(_x21, _x22) {
708708 * @return {Promise<void> }
709709 */
710710function _handleMessagePing ( ) {
711- _handleMessagePing = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee18 ( state , msgObj ) {
711+ _handleMessagePing = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee18 ( state , msgObj ) {
712712 var messages , useMessages ;
713713 return _regenerator [ "default" ] . wrap ( function _callee18$ ( _context18 ) {
714714 while ( 1 ) switch ( _context18 . prev = _context18 . next ) {
@@ -772,8 +772,8 @@ function refreshReaderClients(channelState) {
772772 // remove subscriptions to closed readers
773773 Object . keys ( channelState . otherReaderClients ) . filter ( function ( readerUuid ) {
774774 return ! otherReaders . includes ( readerUuid ) ;
775- } ) . forEach ( /*#__PURE__*/ function ( ) {
776- var _ref2 = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee2 ( readerUuid ) {
775+ } ) . forEach ( /*#__PURE__*/ function ( ) {
776+ var _ref2 = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee2 ( readerUuid ) {
777777 return _regenerator [ "default" ] . wrap ( function _callee2$ ( _context2 ) {
778778 while ( 1 ) switch ( _context2 . prev = _context2 . next ) {
779779 case 0 :
@@ -806,8 +806,8 @@ function refreshReaderClients(channelState) {
806806 . filter ( function ( readerUuid ) {
807807 return ! channelState . otherReaderClients [ readerUuid ] ;
808808 } ) // not already has client
809- . map ( /*#__PURE__*/ function ( ) {
810- var _ref3 = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee3 ( readerUuid ) {
809+ . map ( /*#__PURE__*/ function ( ) {
810+ var _ref3 = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee3 ( readerUuid ) {
811811 var client ;
812812 return _regenerator [ "default" ] . wrap ( function _callee3$ ( _context3 ) {
813813 while ( 1 ) switch ( _context3 . prev = _context3 . next ) {
@@ -863,15 +863,15 @@ function postMessage(_x25, _x26) {
863863 * but will speed up things when this module is used in unit-tests.
864864 */
865865function _postMessage ( ) {
866- _postMessage = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee20 ( channelState , messageJson ) {
866+ _postMessage = ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee20 ( channelState , messageJson ) {
867867 var writePromise ;
868868 return _regenerator [ "default" ] . wrap ( function _callee20$ ( _context20 ) {
869869 while ( 1 ) switch ( _context20 . prev = _context20 . next ) {
870870 case 0 :
871871 writePromise = channelState . writeFileQueue . add ( function ( ) {
872872 return writeMessage ( channelState . channelName , channelState . uuid , messageJson , channelState . paths ) ;
873873 } ) ;
874- channelState . writeBlockPromise = channelState . writeBlockPromise . then ( /*#__PURE__*/ ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee19 ( ) {
874+ channelState . writeBlockPromise = channelState . writeBlockPromise . then ( /*#__PURE__*/ ( 0 , _asyncToGenerator2 [ "default" ] ) ( /*#__PURE__*/ _regenerator [ "default" ] . mark ( function _callee19 ( ) {
875875 var _yield$Promise$all2 , msgObj , pingStr , writeToReadersPromise ;
876876 return _regenerator [ "default" ] . wrap ( function _callee19$ ( _context19 ) {
877877 while ( 1 ) switch ( _context19 . prev = _context19 . next ) {
0 commit comments