+1
-1
| { | ||
| "name": "tail-file", | ||
| "version": "1.4.9", | ||
| "version": "1.4.10", | ||
| "description": "Tail files fast, easy, persistent, fault tolerant and flexible", | ||
@@ -5,0 +5,0 @@ "main": "tail.js", |
+2
-2
@@ -48,3 +48,3 @@ # tail-file | ||
| if( reason == 'TRUNCATE' ) console.log("The file got smaller. I will go up and continue"); | ||
| if( reason == 'CATCHUP' ) console.log("We found a start in an earlier file and are now moving to the nextt one in the list"); | ||
| if( reason == 'CATCHUP' ) console.log("We found a start in an earlier file and are now moving to the next one in the list"); | ||
| }); | ||
@@ -64,3 +64,3 @@ | ||
| * When switching to a new file, it will start from the beginning, as to not miss any rows. | ||
| * except if the new file actually was copied or moved into place, with too many existing rows, in which case it will continue from the bottom. | ||
| * Optionally skipping to the bottom if the file is larger than a given limit. | ||
| * You can let tail-file search for the starting position, and it will continue at that position, even if it's in the secondary file. | ||
@@ -67,0 +67,0 @@ * It will never throw exceptions. No matter what type of errors. All errors are emitted as messages. |
+13
-2
@@ -94,2 +94,3 @@ 'use strict'; | ||
| reading: false, | ||
| readable: false, // only used by checkDir | ||
| fd: null, | ||
@@ -538,3 +539,6 @@ buf: null, | ||
| // It will decide if it's time to switch over | ||
| if( this.fd ) return this.readStuff(); | ||
| if( this.fd ){ | ||
| this.readable = true; | ||
| return this.readStuff(); | ||
| } | ||
@@ -545,3 +549,3 @@ const basename = path.basename( this.filename ); | ||
| this._stop(); | ||
| this.setCharPos(0); | ||
| this.setBytePos(0); | ||
| this.emit('restart','PRIMEFOUND'); | ||
@@ -613,2 +617,3 @@ return this.start(); | ||
| // Stops without waiting on current task | ||
| _stop(){ | ||
@@ -681,2 +686,3 @@ if( this.started ){ | ||
| this.reading = true; | ||
| this.readable = false; | ||
@@ -713,2 +719,3 @@ // debug("Starts reading at " + this.pos); | ||
| decode( chunk, cnt ){ | ||
| // cnt is for debug | ||
| // this.reading = false; | ||
@@ -807,3 +814,5 @@ | ||
| self.reading = true; | ||
| fs.stat(self.filename, (err,stat) =>{ | ||
| self.reading = false; | ||
| if( err ){ | ||
@@ -835,2 +844,4 @@ debug( err ); | ||
| if( self.readable ) return self.readStuff(); | ||
| self.emit('eof', self.pos); | ||
@@ -837,0 +848,0 @@ }); |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
42972
0.47%1175
0.86%