speclore 0.1.7 → 0.1.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/dist/cli/index.js +2 -6
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.js +2 -6
- package/dist/mcp/server.js.map +1 -1
- package/package.json +2 -2
package/dist/cli/index.js
CHANGED
|
@@ -1503,8 +1503,7 @@ var init_pdf_reader = __esm({
|
|
|
1503
1503
|
const uint8 = new Uint8Array(buffer);
|
|
1504
1504
|
const doc = await pdfjsLib.getDocument({
|
|
1505
1505
|
data: uint8,
|
|
1506
|
-
useWorkerFetch: false
|
|
1507
|
-
isEvalSupported: false
|
|
1506
|
+
useWorkerFetch: false
|
|
1508
1507
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1509
1508
|
}).promise;
|
|
1510
1509
|
const textParts = [];
|
|
@@ -1514,7 +1513,6 @@ var init_pdf_reader = __esm({
|
|
|
1514
1513
|
const pageText = textContent.items.map((item) => item.str).join("");
|
|
1515
1514
|
if (pageText) textParts.push(pageText);
|
|
1516
1515
|
}
|
|
1517
|
-
doc.destroy();
|
|
1518
1516
|
const text = textParts.join("\n");
|
|
1519
1517
|
return [{
|
|
1520
1518
|
id: source.replace(/\\/g, "/").replace(/\.pdf$/i, ""),
|
|
@@ -2871,8 +2869,7 @@ async function extractPdfText(dataBuffer) {
|
|
|
2871
2869
|
const uint8 = new Uint8Array(dataBuffer);
|
|
2872
2870
|
const doc = await pdfjsLib.getDocument({
|
|
2873
2871
|
data: uint8,
|
|
2874
|
-
useWorkerFetch: false
|
|
2875
|
-
isEvalSupported: false
|
|
2872
|
+
useWorkerFetch: false
|
|
2876
2873
|
}).promise;
|
|
2877
2874
|
const textParts = [];
|
|
2878
2875
|
for (let i = 1; i <= doc.numPages; i++) {
|
|
@@ -2881,7 +2878,6 @@ async function extractPdfText(dataBuffer) {
|
|
|
2881
2878
|
const pageText = textContent.items.map((item) => item.str).join("");
|
|
2882
2879
|
if (pageText) textParts.push(pageText);
|
|
2883
2880
|
}
|
|
2884
|
-
doc.destroy();
|
|
2885
2881
|
return textParts.join("\n");
|
|
2886
2882
|
}
|
|
2887
2883
|
async function parsePdfBuffer(dataBuffer, idHint = "document") {
|