@threadbase-sh/scanner 0.24.6 → 0.24.8
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/README.md +25 -0
- 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.cjs
CHANGED
|
@@ -5512,9 +5512,17 @@ var ConversationScanner = class {
|
|
|
5512
5512
|
try {
|
|
5513
5513
|
const fd = (0, import_fs14.openSync)(filePath, "r");
|
|
5514
5514
|
try {
|
|
5515
|
-
const
|
|
5516
|
-
|
|
5517
|
-
|
|
5515
|
+
const chunks = [];
|
|
5516
|
+
let pos = 0;
|
|
5517
|
+
while (pos < 1024 * 1024) {
|
|
5518
|
+
const chunk = Buffer.alloc(8192);
|
|
5519
|
+
const n = (0, import_fs14.readSync)(fd, chunk, 0, chunk.length, pos);
|
|
5520
|
+
if (n === 0) break;
|
|
5521
|
+
chunks.push(chunk.subarray(0, n));
|
|
5522
|
+
pos += n;
|
|
5523
|
+
if (chunk.subarray(0, n).includes(10)) break;
|
|
5524
|
+
}
|
|
5525
|
+
sample = Buffer.concat(chunks).toString("utf8");
|
|
5518
5526
|
} finally {
|
|
5519
5527
|
(0, import_fs14.closeSync)(fd);
|
|
5520
5528
|
}
|