@threadbase-sh/scanner 0.24.6 → 0.24.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +12 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +11 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/scanner.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5422,9 +5422,17 @@ var ConversationScanner = class {
|
|
|
5422
5422
|
try {
|
|
5423
5423
|
const fd = openSync3(filePath, "r");
|
|
5424
5424
|
try {
|
|
5425
|
-
const
|
|
5426
|
-
|
|
5427
|
-
|
|
5425
|
+
const chunks = [];
|
|
5426
|
+
let pos = 0;
|
|
5427
|
+
while (pos < 1024 * 1024) {
|
|
5428
|
+
const chunk = Buffer.alloc(8192);
|
|
5429
|
+
const n = readSync3(fd, chunk, 0, chunk.length, pos);
|
|
5430
|
+
if (n === 0) break;
|
|
5431
|
+
chunks.push(chunk.subarray(0, n));
|
|
5432
|
+
pos += n;
|
|
5433
|
+
if (chunk.subarray(0, n).includes(10)) break;
|
|
5434
|
+
}
|
|
5435
|
+
sample = Buffer.concat(chunks).toString("utf8");
|
|
5428
5436
|
} finally {
|
|
5429
5437
|
closeSync3(fd);
|
|
5430
5438
|
}
|