officeparser 7.5.0 → 7.5.1
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 +37 -0
- package/dist/OfficeParser.js +54 -6
- package/dist/index.d.ts +2 -2
- package/dist/officeparser.browser.d.ts +34 -1
- package/dist/officeparser.browser.iife.js +153 -153
- package/dist/officeparser.browser.mjs +147 -147
- package/dist/officeparser.browser.slim.d.ts +34 -1
- package/dist/officeparser.browser.slim.iife.js +176 -176
- package/dist/officeparser.browser.slim.mjs +176 -176
- package/dist/parsers/EpubParser.js +2 -2
- package/dist/parsers/ExcelParser.js +11 -7
- package/dist/parsers/OpenOfficeParser.js +17 -3
- package/dist/parsers/PowerPointParser.js +21 -5
- package/dist/parsers/WordParser.js +12 -7
- package/dist/sbom.cdx.json +92 -92
- package/dist/types.d.ts +34 -1
- package/dist/types.js +10 -0
- package/dist/utils/configUtils.d.ts +15 -2
- package/dist/utils/configUtils.js +58 -13
- package/dist/utils/errorUtils.d.ts +8 -2
- package/dist/utils/errorUtils.js +23 -1
- package/dist/utils/zipUtils.d.ts +64 -4
- package/dist/utils/zipUtils.js +188 -4
- package/package.json +1 -1
package/dist/sbom.cdx.json
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"bomFormat": "CycloneDX",
|
|
4
4
|
"specVersion": "1.6",
|
|
5
5
|
"version": 1,
|
|
6
|
-
"serialNumber": "urn:uuid:
|
|
6
|
+
"serialNumber": "urn:uuid:30a1956c-acfa-497a-bf1c-b6d265b11bc0",
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-07-
|
|
8
|
+
"timestamp": "2026-07-30T21:00:33.153Z",
|
|
9
9
|
"tools": {
|
|
10
10
|
"components": [
|
|
11
11
|
{
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"component": {
|
|
83
83
|
"type": "application",
|
|
84
84
|
"name": "officeparser",
|
|
85
|
-
"version": "7.5.
|
|
86
|
-
"bom-ref": "officeparser@7.5.
|
|
85
|
+
"version": "7.5.1",
|
|
86
|
+
"bom-ref": "officeparser@7.5.1",
|
|
87
87
|
"author": "Harsh Ankur",
|
|
88
88
|
"description": "A robust, strictly-typed Node.js and Browser library for parsing office files (.docx, .pptx, .xlsx, .odt, .odp, .ods, .pdf, .rtf, .csv, .md, .html, .epub) and generating high-fidelity outputs in Markdown, HTML, CSV, RTF, PDF, EPUB, and RAG-focused chunks.",
|
|
89
89
|
"licenses": [
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
],
|
|
97
|
-
"purl": "pkg:npm/officeparser@7.5.
|
|
97
|
+
"purl": "pkg:npm/officeparser@7.5.1?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2Fharshankur%2FofficeParser.git",
|
|
98
98
|
"externalReferences": [
|
|
99
99
|
{
|
|
100
100
|
"url": "git+https://github.com/harshankur/officeParser.git",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"name": "xmldom",
|
|
127
127
|
"group": "@xmldom",
|
|
128
128
|
"version": "0.9.10",
|
|
129
|
-
"bom-ref": "officeparser@7.5.
|
|
129
|
+
"bom-ref": "officeparser@7.5.1|@xmldom/xmldom@0.9.10",
|
|
130
130
|
"description": "A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.",
|
|
131
131
|
"licenses": [
|
|
132
132
|
{
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
"type": "library",
|
|
177
177
|
"name": "fflate",
|
|
178
178
|
"version": "0.8.3",
|
|
179
|
-
"bom-ref": "officeparser@7.5.
|
|
179
|
+
"bom-ref": "officeparser@7.5.1|fflate@0.8.3",
|
|
180
180
|
"author": "Arjun Barrett",
|
|
181
181
|
"description": "High performance (de)compression in an 8kB package",
|
|
182
182
|
"licenses": [
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
"type": "library",
|
|
228
228
|
"name": "file-type",
|
|
229
229
|
"version": "22.0.1",
|
|
230
|
-
"bom-ref": "officeparser@7.5.
|
|
230
|
+
"bom-ref": "officeparser@7.5.1|file-type@22.0.1",
|
|
231
231
|
"author": "Sindre Sorhus",
|
|
232
232
|
"description": "Detect the file type of a file, stream, or data",
|
|
233
233
|
"licenses": [
|
|
@@ -278,7 +278,7 @@
|
|
|
278
278
|
"type": "library",
|
|
279
279
|
"name": "pdfjs-dist",
|
|
280
280
|
"version": "6.1.200",
|
|
281
|
-
"bom-ref": "officeparser@7.5.
|
|
281
|
+
"bom-ref": "officeparser@7.5.1|pdfjs-dist@6.1.200",
|
|
282
282
|
"description": "Generic build of Mozilla's PDF.js library.",
|
|
283
283
|
"licenses": [
|
|
284
284
|
{
|
|
@@ -328,7 +328,7 @@
|
|
|
328
328
|
"type": "library",
|
|
329
329
|
"name": "tesseract.js",
|
|
330
330
|
"version": "7.0.0",
|
|
331
|
-
"bom-ref": "officeparser@7.5.
|
|
331
|
+
"bom-ref": "officeparser@7.5.1|tesseract.js@7.0.0",
|
|
332
332
|
"description": "Pure Javascript Multilingual OCR",
|
|
333
333
|
"licenses": [
|
|
334
334
|
{
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
"name": "inflate",
|
|
380
380
|
"group": "@tokenizer",
|
|
381
381
|
"version": "0.4.1",
|
|
382
|
-
"bom-ref": "officeparser@7.5.
|
|
382
|
+
"bom-ref": "officeparser@7.5.1|@tokenizer/inflate@0.4.1",
|
|
383
383
|
"author": "Borewit",
|
|
384
384
|
"description": "Tokenized zip support",
|
|
385
385
|
"licenses": [
|
|
@@ -430,7 +430,7 @@
|
|
|
430
430
|
"type": "library",
|
|
431
431
|
"name": "strtok3",
|
|
432
432
|
"version": "10.3.5",
|
|
433
|
-
"bom-ref": "officeparser@7.5.
|
|
433
|
+
"bom-ref": "officeparser@7.5.1|strtok3@10.3.5",
|
|
434
434
|
"author": "Borewit",
|
|
435
435
|
"description": "A promise based streaming tokenizer",
|
|
436
436
|
"licenses": [
|
|
@@ -481,7 +481,7 @@
|
|
|
481
481
|
"type": "library",
|
|
482
482
|
"name": "token-types",
|
|
483
483
|
"version": "6.1.2",
|
|
484
|
-
"bom-ref": "officeparser@7.5.
|
|
484
|
+
"bom-ref": "officeparser@7.5.1|token-types@6.1.2",
|
|
485
485
|
"author": "Borewit",
|
|
486
486
|
"description": "Common token types for decoding and encoding numeric and string values",
|
|
487
487
|
"licenses": [
|
|
@@ -532,7 +532,7 @@
|
|
|
532
532
|
"type": "library",
|
|
533
533
|
"name": "uint8array-extras",
|
|
534
534
|
"version": "1.5.0",
|
|
535
|
-
"bom-ref": "officeparser@7.5.
|
|
535
|
+
"bom-ref": "officeparser@7.5.1|uint8array-extras@1.5.0",
|
|
536
536
|
"author": "Sindre Sorhus",
|
|
537
537
|
"description": "Useful utilities for working with Uint8Array (and Buffer)",
|
|
538
538
|
"licenses": [
|
|
@@ -584,7 +584,7 @@
|
|
|
584
584
|
"name": "canvas",
|
|
585
585
|
"group": "@napi-rs",
|
|
586
586
|
"version": "1.0.1",
|
|
587
|
-
"bom-ref": "officeparser@7.5.
|
|
587
|
+
"bom-ref": "officeparser@7.5.1|@napi-rs/canvas@1.0.1",
|
|
588
588
|
"description": "Canvas for Node.js with skia backend",
|
|
589
589
|
"scope": "optional",
|
|
590
590
|
"licenses": [
|
|
@@ -635,7 +635,7 @@
|
|
|
635
635
|
"type": "library",
|
|
636
636
|
"name": "bmp-js",
|
|
637
637
|
"version": "0.1.0",
|
|
638
|
-
"bom-ref": "officeparser@7.5.
|
|
638
|
+
"bom-ref": "officeparser@7.5.1|bmp-js@0.1.0",
|
|
639
639
|
"author": "shaozilee",
|
|
640
640
|
"description": "A pure javascript BMP encoder and decoder",
|
|
641
641
|
"licenses": [
|
|
@@ -686,7 +686,7 @@
|
|
|
686
686
|
"type": "library",
|
|
687
687
|
"name": "idb-keyval",
|
|
688
688
|
"version": "6.2.2",
|
|
689
|
-
"bom-ref": "officeparser@7.5.
|
|
689
|
+
"bom-ref": "officeparser@7.5.1|idb-keyval@6.2.2",
|
|
690
690
|
"author": "Jake Archibald",
|
|
691
691
|
"description": "A super-simple-small keyval store built on top of IndexedDB",
|
|
692
692
|
"licenses": [
|
|
@@ -737,7 +737,7 @@
|
|
|
737
737
|
"type": "library",
|
|
738
738
|
"name": "is-url",
|
|
739
739
|
"version": "1.2.4",
|
|
740
|
-
"bom-ref": "officeparser@7.5.
|
|
740
|
+
"bom-ref": "officeparser@7.5.1|is-url@1.2.4",
|
|
741
741
|
"description": "Check whether a string is a URL.",
|
|
742
742
|
"licenses": [
|
|
743
743
|
{
|
|
@@ -787,7 +787,7 @@
|
|
|
787
787
|
"type": "library",
|
|
788
788
|
"name": "node-fetch",
|
|
789
789
|
"version": "2.7.0",
|
|
790
|
-
"bom-ref": "officeparser@7.5.
|
|
790
|
+
"bom-ref": "officeparser@7.5.1|node-fetch@2.7.0",
|
|
791
791
|
"author": "David Frank",
|
|
792
792
|
"description": "A light-weight module that brings window.fetch to node.js",
|
|
793
793
|
"licenses": [
|
|
@@ -838,7 +838,7 @@
|
|
|
838
838
|
"type": "library",
|
|
839
839
|
"name": "opencollective-postinstall",
|
|
840
840
|
"version": "2.0.3",
|
|
841
|
-
"bom-ref": "officeparser@7.5.
|
|
841
|
+
"bom-ref": "officeparser@7.5.1|opencollective-postinstall@2.0.3",
|
|
842
842
|
"author": "Xavier Damman",
|
|
843
843
|
"description": "Lightweight npm postinstall message to invite people to donate to your collective",
|
|
844
844
|
"licenses": [
|
|
@@ -889,7 +889,7 @@
|
|
|
889
889
|
"type": "library",
|
|
890
890
|
"name": "regenerator-runtime",
|
|
891
891
|
"version": "0.13.11",
|
|
892
|
-
"bom-ref": "officeparser@7.5.
|
|
892
|
+
"bom-ref": "officeparser@7.5.1|regenerator-runtime@0.13.11",
|
|
893
893
|
"author": "Ben Newman",
|
|
894
894
|
"description": "Runtime for Regenerator-compiled generator and async functions.",
|
|
895
895
|
"licenses": [
|
|
@@ -940,7 +940,7 @@
|
|
|
940
940
|
"type": "library",
|
|
941
941
|
"name": "tesseract.js-core",
|
|
942
942
|
"version": "7.0.0",
|
|
943
|
-
"bom-ref": "officeparser@7.5.
|
|
943
|
+
"bom-ref": "officeparser@7.5.1|tesseract.js-core@7.0.0",
|
|
944
944
|
"author": "antimatter15",
|
|
945
945
|
"description": "Tesseract C++ API in Pure Javascript",
|
|
946
946
|
"licenses": [
|
|
@@ -991,7 +991,7 @@
|
|
|
991
991
|
"type": "library",
|
|
992
992
|
"name": "wasm-feature-detect",
|
|
993
993
|
"version": "1.8.0",
|
|
994
|
-
"bom-ref": "officeparser@7.5.
|
|
994
|
+
"bom-ref": "officeparser@7.5.1|wasm-feature-detect@1.8.0",
|
|
995
995
|
"author": "Surma",
|
|
996
996
|
"description": "A small library to detect which features of WebAssembly are supported in your current browser.",
|
|
997
997
|
"licenses": [
|
|
@@ -1042,7 +1042,7 @@
|
|
|
1042
1042
|
"type": "library",
|
|
1043
1043
|
"name": "zlibjs",
|
|
1044
1044
|
"version": "0.3.1",
|
|
1045
|
-
"bom-ref": "officeparser@7.5.
|
|
1045
|
+
"bom-ref": "officeparser@7.5.1|zlibjs@0.3.1",
|
|
1046
1046
|
"author": "Yuta Imaya",
|
|
1047
1047
|
"description": "zlib, gzip and zip implementation in JavaScript",
|
|
1048
1048
|
"licenses": [
|
|
@@ -1093,7 +1093,7 @@
|
|
|
1093
1093
|
"type": "library",
|
|
1094
1094
|
"name": "debug",
|
|
1095
1095
|
"version": "4.4.3",
|
|
1096
|
-
"bom-ref": "officeparser@7.5.
|
|
1096
|
+
"bom-ref": "officeparser@7.5.1|debug@4.4.3",
|
|
1097
1097
|
"author": "Josh Junon",
|
|
1098
1098
|
"description": "Lightweight debugging utility for Node.js and the browser",
|
|
1099
1099
|
"licenses": [
|
|
@@ -1145,7 +1145,7 @@
|
|
|
1145
1145
|
"name": "token",
|
|
1146
1146
|
"group": "@tokenizer",
|
|
1147
1147
|
"version": "0.3.0",
|
|
1148
|
-
"bom-ref": "officeparser@7.5.
|
|
1148
|
+
"bom-ref": "officeparser@7.5.1|@tokenizer/token@0.3.0",
|
|
1149
1149
|
"author": "Borewit",
|
|
1150
1150
|
"description": "TypeScript definition for strtok3 token",
|
|
1151
1151
|
"licenses": [
|
|
@@ -1197,7 +1197,7 @@
|
|
|
1197
1197
|
"name": "text-codec",
|
|
1198
1198
|
"group": "@borewit",
|
|
1199
1199
|
"version": "0.2.2",
|
|
1200
|
-
"bom-ref": "officeparser@7.5.
|
|
1200
|
+
"bom-ref": "officeparser@7.5.1|@borewit/text-codec@0.2.2",
|
|
1201
1201
|
"author": "Borewit",
|
|
1202
1202
|
"description": "Text Decoder",
|
|
1203
1203
|
"licenses": [
|
|
@@ -1248,7 +1248,7 @@
|
|
|
1248
1248
|
"type": "library",
|
|
1249
1249
|
"name": "ieee754",
|
|
1250
1250
|
"version": "1.2.1",
|
|
1251
|
-
"bom-ref": "officeparser@7.5.
|
|
1251
|
+
"bom-ref": "officeparser@7.5.1|ieee754@1.2.1",
|
|
1252
1252
|
"author": "Feross Aboukhadijeh",
|
|
1253
1253
|
"description": "Read/write IEEE754 floating point numbers from/to a Buffer or array-like object",
|
|
1254
1254
|
"licenses": [
|
|
@@ -1300,7 +1300,7 @@
|
|
|
1300
1300
|
"name": "canvas-linux-x64-gnu",
|
|
1301
1301
|
"group": "@napi-rs",
|
|
1302
1302
|
"version": "1.0.1",
|
|
1303
|
-
"bom-ref": "officeparser@7.5.
|
|
1303
|
+
"bom-ref": "officeparser@7.5.1|@napi-rs/canvas-linux-x64-gnu@1.0.1",
|
|
1304
1304
|
"description": "Canvas for Node.js with skia backend",
|
|
1305
1305
|
"scope": "optional",
|
|
1306
1306
|
"licenses": [
|
|
@@ -1351,7 +1351,7 @@
|
|
|
1351
1351
|
"type": "library",
|
|
1352
1352
|
"name": "whatwg-url",
|
|
1353
1353
|
"version": "5.0.0",
|
|
1354
|
-
"bom-ref": "officeparser@7.5.
|
|
1354
|
+
"bom-ref": "officeparser@7.5.1|whatwg-url@5.0.0",
|
|
1355
1355
|
"author": "Sebastian Mayr",
|
|
1356
1356
|
"description": "An implementation of the WHATWG URL Standard's URL API and parsing machinery",
|
|
1357
1357
|
"licenses": [
|
|
@@ -1402,7 +1402,7 @@
|
|
|
1402
1402
|
"type": "library",
|
|
1403
1403
|
"name": "ms",
|
|
1404
1404
|
"version": "2.1.3",
|
|
1405
|
-
"bom-ref": "officeparser@7.5.
|
|
1405
|
+
"bom-ref": "officeparser@7.5.1|ms@2.1.3",
|
|
1406
1406
|
"description": "Tiny millisecond conversion utility",
|
|
1407
1407
|
"licenses": [
|
|
1408
1408
|
{
|
|
@@ -1452,7 +1452,7 @@
|
|
|
1452
1452
|
"type": "library",
|
|
1453
1453
|
"name": "tr46",
|
|
1454
1454
|
"version": "0.0.3",
|
|
1455
|
-
"bom-ref": "officeparser@7.5.
|
|
1455
|
+
"bom-ref": "officeparser@7.5.1|tr46@0.0.3",
|
|
1456
1456
|
"author": "Sebastian Mayr",
|
|
1457
1457
|
"description": "An implementation of the Unicode TR46 spec",
|
|
1458
1458
|
"licenses": [
|
|
@@ -1503,7 +1503,7 @@
|
|
|
1503
1503
|
"type": "library",
|
|
1504
1504
|
"name": "webidl-conversions",
|
|
1505
1505
|
"version": "3.0.1",
|
|
1506
|
-
"bom-ref": "officeparser@7.5.
|
|
1506
|
+
"bom-ref": "officeparser@7.5.1|webidl-conversions@3.0.1",
|
|
1507
1507
|
"author": "Domenic Denicola",
|
|
1508
1508
|
"description": "Implements the WebIDL algorithms for converting to and from JavaScript values",
|
|
1509
1509
|
"licenses": [
|
|
@@ -1553,143 +1553,143 @@
|
|
|
1553
1553
|
],
|
|
1554
1554
|
"dependencies": [
|
|
1555
1555
|
{
|
|
1556
|
-
"ref": "officeparser@7.5.
|
|
1556
|
+
"ref": "officeparser@7.5.1",
|
|
1557
1557
|
"dependsOn": [
|
|
1558
|
-
"officeparser@7.5.
|
|
1559
|
-
"officeparser@7.5.
|
|
1560
|
-
"officeparser@7.5.
|
|
1561
|
-
"officeparser@7.5.
|
|
1562
|
-
"officeparser@7.5.
|
|
1558
|
+
"officeparser@7.5.1|@xmldom/xmldom@0.9.10",
|
|
1559
|
+
"officeparser@7.5.1|fflate@0.8.3",
|
|
1560
|
+
"officeparser@7.5.1|file-type@22.0.1",
|
|
1561
|
+
"officeparser@7.5.1|pdfjs-dist@6.1.200",
|
|
1562
|
+
"officeparser@7.5.1|tesseract.js@7.0.0"
|
|
1563
1563
|
]
|
|
1564
1564
|
},
|
|
1565
1565
|
{
|
|
1566
|
-
"ref": "officeparser@7.5.
|
|
1566
|
+
"ref": "officeparser@7.5.1|@xmldom/xmldom@0.9.10"
|
|
1567
1567
|
},
|
|
1568
1568
|
{
|
|
1569
|
-
"ref": "officeparser@7.5.
|
|
1569
|
+
"ref": "officeparser@7.5.1|fflate@0.8.3"
|
|
1570
1570
|
},
|
|
1571
1571
|
{
|
|
1572
|
-
"ref": "officeparser@7.5.
|
|
1572
|
+
"ref": "officeparser@7.5.1|file-type@22.0.1",
|
|
1573
1573
|
"dependsOn": [
|
|
1574
|
-
"officeparser@7.5.
|
|
1575
|
-
"officeparser@7.5.
|
|
1576
|
-
"officeparser@7.5.
|
|
1577
|
-
"officeparser@7.5.
|
|
1574
|
+
"officeparser@7.5.1|@tokenizer/inflate@0.4.1",
|
|
1575
|
+
"officeparser@7.5.1|strtok3@10.3.5",
|
|
1576
|
+
"officeparser@7.5.1|token-types@6.1.2",
|
|
1577
|
+
"officeparser@7.5.1|uint8array-extras@1.5.0"
|
|
1578
1578
|
]
|
|
1579
1579
|
},
|
|
1580
1580
|
{
|
|
1581
|
-
"ref": "officeparser@7.5.
|
|
1581
|
+
"ref": "officeparser@7.5.1|pdfjs-dist@6.1.200",
|
|
1582
1582
|
"dependsOn": [
|
|
1583
|
-
"officeparser@7.5.
|
|
1583
|
+
"officeparser@7.5.1|@napi-rs/canvas@1.0.1"
|
|
1584
1584
|
]
|
|
1585
1585
|
},
|
|
1586
1586
|
{
|
|
1587
|
-
"ref": "officeparser@7.5.
|
|
1587
|
+
"ref": "officeparser@7.5.1|tesseract.js@7.0.0",
|
|
1588
1588
|
"dependsOn": [
|
|
1589
|
-
"officeparser@7.5.
|
|
1590
|
-
"officeparser@7.5.
|
|
1591
|
-
"officeparser@7.5.
|
|
1592
|
-
"officeparser@7.5.
|
|
1593
|
-
"officeparser@7.5.
|
|
1594
|
-
"officeparser@7.5.
|
|
1595
|
-
"officeparser@7.5.
|
|
1596
|
-
"officeparser@7.5.
|
|
1597
|
-
"officeparser@7.5.
|
|
1589
|
+
"officeparser@7.5.1|bmp-js@0.1.0",
|
|
1590
|
+
"officeparser@7.5.1|idb-keyval@6.2.2",
|
|
1591
|
+
"officeparser@7.5.1|is-url@1.2.4",
|
|
1592
|
+
"officeparser@7.5.1|node-fetch@2.7.0",
|
|
1593
|
+
"officeparser@7.5.1|opencollective-postinstall@2.0.3",
|
|
1594
|
+
"officeparser@7.5.1|regenerator-runtime@0.13.11",
|
|
1595
|
+
"officeparser@7.5.1|tesseract.js-core@7.0.0",
|
|
1596
|
+
"officeparser@7.5.1|wasm-feature-detect@1.8.0",
|
|
1597
|
+
"officeparser@7.5.1|zlibjs@0.3.1"
|
|
1598
1598
|
]
|
|
1599
1599
|
},
|
|
1600
1600
|
{
|
|
1601
|
-
"ref": "officeparser@7.5.
|
|
1601
|
+
"ref": "officeparser@7.5.1|@tokenizer/inflate@0.4.1",
|
|
1602
1602
|
"dependsOn": [
|
|
1603
|
-
"officeparser@7.5.
|
|
1604
|
-
"officeparser@7.5.
|
|
1603
|
+
"officeparser@7.5.1|debug@4.4.3",
|
|
1604
|
+
"officeparser@7.5.1|token-types@6.1.2"
|
|
1605
1605
|
]
|
|
1606
1606
|
},
|
|
1607
1607
|
{
|
|
1608
|
-
"ref": "officeparser@7.5.
|
|
1608
|
+
"ref": "officeparser@7.5.1|strtok3@10.3.5",
|
|
1609
1609
|
"dependsOn": [
|
|
1610
|
-
"officeparser@7.5.
|
|
1610
|
+
"officeparser@7.5.1|@tokenizer/token@0.3.0"
|
|
1611
1611
|
]
|
|
1612
1612
|
},
|
|
1613
1613
|
{
|
|
1614
|
-
"ref": "officeparser@7.5.
|
|
1614
|
+
"ref": "officeparser@7.5.1|token-types@6.1.2",
|
|
1615
1615
|
"dependsOn": [
|
|
1616
|
-
"officeparser@7.5.
|
|
1617
|
-
"officeparser@7.5.
|
|
1618
|
-
"officeparser@7.5.
|
|
1616
|
+
"officeparser@7.5.1|@borewit/text-codec@0.2.2",
|
|
1617
|
+
"officeparser@7.5.1|@tokenizer/token@0.3.0",
|
|
1618
|
+
"officeparser@7.5.1|ieee754@1.2.1"
|
|
1619
1619
|
]
|
|
1620
1620
|
},
|
|
1621
1621
|
{
|
|
1622
|
-
"ref": "officeparser@7.5.
|
|
1622
|
+
"ref": "officeparser@7.5.1|uint8array-extras@1.5.0"
|
|
1623
1623
|
},
|
|
1624
1624
|
{
|
|
1625
|
-
"ref": "officeparser@7.5.
|
|
1625
|
+
"ref": "officeparser@7.5.1|@napi-rs/canvas@1.0.1",
|
|
1626
1626
|
"dependsOn": [
|
|
1627
|
-
"officeparser@7.5.
|
|
1627
|
+
"officeparser@7.5.1|@napi-rs/canvas-linux-x64-gnu@1.0.1"
|
|
1628
1628
|
]
|
|
1629
1629
|
},
|
|
1630
1630
|
{
|
|
1631
|
-
"ref": "officeparser@7.5.
|
|
1631
|
+
"ref": "officeparser@7.5.1|bmp-js@0.1.0"
|
|
1632
1632
|
},
|
|
1633
1633
|
{
|
|
1634
|
-
"ref": "officeparser@7.5.
|
|
1634
|
+
"ref": "officeparser@7.5.1|idb-keyval@6.2.2"
|
|
1635
1635
|
},
|
|
1636
1636
|
{
|
|
1637
|
-
"ref": "officeparser@7.5.
|
|
1637
|
+
"ref": "officeparser@7.5.1|is-url@1.2.4"
|
|
1638
1638
|
},
|
|
1639
1639
|
{
|
|
1640
|
-
"ref": "officeparser@7.5.
|
|
1640
|
+
"ref": "officeparser@7.5.1|node-fetch@2.7.0",
|
|
1641
1641
|
"dependsOn": [
|
|
1642
|
-
"officeparser@7.5.
|
|
1642
|
+
"officeparser@7.5.1|whatwg-url@5.0.0"
|
|
1643
1643
|
]
|
|
1644
1644
|
},
|
|
1645
1645
|
{
|
|
1646
|
-
"ref": "officeparser@7.5.
|
|
1646
|
+
"ref": "officeparser@7.5.1|opencollective-postinstall@2.0.3"
|
|
1647
1647
|
},
|
|
1648
1648
|
{
|
|
1649
|
-
"ref": "officeparser@7.5.
|
|
1649
|
+
"ref": "officeparser@7.5.1|regenerator-runtime@0.13.11"
|
|
1650
1650
|
},
|
|
1651
1651
|
{
|
|
1652
|
-
"ref": "officeparser@7.5.
|
|
1652
|
+
"ref": "officeparser@7.5.1|tesseract.js-core@7.0.0"
|
|
1653
1653
|
},
|
|
1654
1654
|
{
|
|
1655
|
-
"ref": "officeparser@7.5.
|
|
1655
|
+
"ref": "officeparser@7.5.1|wasm-feature-detect@1.8.0"
|
|
1656
1656
|
},
|
|
1657
1657
|
{
|
|
1658
|
-
"ref": "officeparser@7.5.
|
|
1658
|
+
"ref": "officeparser@7.5.1|zlibjs@0.3.1"
|
|
1659
1659
|
},
|
|
1660
1660
|
{
|
|
1661
|
-
"ref": "officeparser@7.5.
|
|
1661
|
+
"ref": "officeparser@7.5.1|debug@4.4.3",
|
|
1662
1662
|
"dependsOn": [
|
|
1663
|
-
"officeparser@7.5.
|
|
1663
|
+
"officeparser@7.5.1|ms@2.1.3"
|
|
1664
1664
|
]
|
|
1665
1665
|
},
|
|
1666
1666
|
{
|
|
1667
|
-
"ref": "officeparser@7.5.
|
|
1667
|
+
"ref": "officeparser@7.5.1|@tokenizer/token@0.3.0"
|
|
1668
1668
|
},
|
|
1669
1669
|
{
|
|
1670
|
-
"ref": "officeparser@7.5.
|
|
1670
|
+
"ref": "officeparser@7.5.1|@borewit/text-codec@0.2.2"
|
|
1671
1671
|
},
|
|
1672
1672
|
{
|
|
1673
|
-
"ref": "officeparser@7.5.
|
|
1673
|
+
"ref": "officeparser@7.5.1|ieee754@1.2.1"
|
|
1674
1674
|
},
|
|
1675
1675
|
{
|
|
1676
|
-
"ref": "officeparser@7.5.
|
|
1676
|
+
"ref": "officeparser@7.5.1|@napi-rs/canvas-linux-x64-gnu@1.0.1"
|
|
1677
1677
|
},
|
|
1678
1678
|
{
|
|
1679
|
-
"ref": "officeparser@7.5.
|
|
1679
|
+
"ref": "officeparser@7.5.1|whatwg-url@5.0.0",
|
|
1680
1680
|
"dependsOn": [
|
|
1681
|
-
"officeparser@7.5.
|
|
1682
|
-
"officeparser@7.5.
|
|
1681
|
+
"officeparser@7.5.1|tr46@0.0.3",
|
|
1682
|
+
"officeparser@7.5.1|webidl-conversions@3.0.1"
|
|
1683
1683
|
]
|
|
1684
1684
|
},
|
|
1685
1685
|
{
|
|
1686
|
-
"ref": "officeparser@7.5.
|
|
1686
|
+
"ref": "officeparser@7.5.1|ms@2.1.3"
|
|
1687
1687
|
},
|
|
1688
1688
|
{
|
|
1689
|
-
"ref": "officeparser@7.5.
|
|
1689
|
+
"ref": "officeparser@7.5.1|tr46@0.0.3"
|
|
1690
1690
|
},
|
|
1691
1691
|
{
|
|
1692
|
-
"ref": "officeparser@7.5.
|
|
1692
|
+
"ref": "officeparser@7.5.1|webidl-conversions@3.0.1"
|
|
1693
1693
|
}
|
|
1694
1694
|
]
|
|
1695
1695
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -39,6 +39,12 @@ export declare enum OfficeErrorType {
|
|
|
39
39
|
ZIP_ENTRY_INVALID_SIZE = "ZIP_ENTRY_INVALID_SIZE",
|
|
40
40
|
/** ZIP uncompressed size limit exceeded */
|
|
41
41
|
ZIP_SIZE_LIMIT_EXCEEDED = "ZIP_SIZE_LIMIT_EXCEEDED",
|
|
42
|
+
/** ZIP data yielded no readable entries (corrupt, truncated, or not a ZIP archive) */
|
|
43
|
+
ZIP_NO_ENTRIES_FOUND = "ZIP_NO_ENTRIES_FOUND",
|
|
44
|
+
/** ZIP data is truncated: the End of Central Directory record is absent */
|
|
45
|
+
ZIP_TRUNCATED = "ZIP_TRUNCATED",
|
|
46
|
+
/** A readable ZIP archive is missing the part its document format requires */
|
|
47
|
+
REQUIRED_PART_MISSING = "REQUIRED_PART_MISSING",
|
|
42
48
|
/** Document element/structure nesting exceeded the safe recursion depth */
|
|
43
49
|
MAX_NESTING_DEPTH_EXCEEDED = "MAX_NESTING_DEPTH_EXCEEDED",
|
|
44
50
|
/** Embedding call timed out */
|
|
@@ -88,7 +94,11 @@ export declare enum OfficeWarningType {
|
|
|
88
94
|
/** A metadata override could not be represented in the destination format's vocabulary */
|
|
89
95
|
METADATA_NOT_REPRESENTABLE = "METADATA_NOT_REPRESENTABLE",
|
|
90
96
|
/** A styleMap output.tag was not an allowed element name and was ignored */
|
|
91
|
-
INVALID_STYLE_MAP_TAG = "INVALID_STYLE_MAP_TAG"
|
|
97
|
+
INVALID_STYLE_MAP_TAG = "INVALID_STYLE_MAP_TAG",
|
|
98
|
+
/** A workbook archive contains no worksheet parts (chartsheet-only workbooks are legitimate) */
|
|
99
|
+
NO_WORKSHEETS_FOUND = "NO_WORKSHEETS_FOUND",
|
|
100
|
+
/** A presentation archive contains no slides (a zero-slide presentation is legitimate) */
|
|
101
|
+
NO_SLIDES_FOUND = "NO_SLIDES_FOUND"
|
|
92
102
|
}
|
|
93
103
|
/**
|
|
94
104
|
* Consolidated timeout settings for OCR operations.
|
|
@@ -466,6 +476,29 @@ export interface OfficeIssue {
|
|
|
466
476
|
/** Optional additional context or original error object. */
|
|
467
477
|
details?: any;
|
|
468
478
|
}
|
|
479
|
+
/**
|
|
480
|
+
* An Error thrown by OfficeParser, carrying the structured issue that produced it.
|
|
481
|
+
*
|
|
482
|
+
* Catching code can branch on `error.officeIssue.code`, the same stable enum used for warnings,
|
|
483
|
+
* instead of matching against message text. Errors that originate outside the library (and
|
|
484
|
+
* `AbortError`, which is deliberately re-thrown untouched so cancellation stays detectable via
|
|
485
|
+
* `error.name`) do not carry this property, hence the optional marker.
|
|
486
|
+
*
|
|
487
|
+
* @example
|
|
488
|
+
* ```typescript
|
|
489
|
+
* try {
|
|
490
|
+
* await parseOffice(buffer, { fileType: 'docx' });
|
|
491
|
+
* } catch (err) {
|
|
492
|
+
* if ((err as OfficeError).officeIssue?.code === OfficeErrorType.REQUIRED_PART_MISSING) {
|
|
493
|
+
* // the archive is readable, but it is not a docx
|
|
494
|
+
* }
|
|
495
|
+
* }
|
|
496
|
+
* ```
|
|
497
|
+
*/
|
|
498
|
+
export interface OfficeError extends Error {
|
|
499
|
+
/** The structured issue this error was created from. */
|
|
500
|
+
officeIssue?: OfficeIssue;
|
|
501
|
+
}
|
|
469
502
|
/**
|
|
470
503
|
* The result of a document conversion operation.
|
|
471
504
|
*/
|
package/dist/types.js
CHANGED
|
@@ -43,6 +43,12 @@ var OfficeErrorType;
|
|
|
43
43
|
OfficeErrorType["ZIP_ENTRY_INVALID_SIZE"] = "ZIP_ENTRY_INVALID_SIZE";
|
|
44
44
|
/** ZIP uncompressed size limit exceeded */
|
|
45
45
|
OfficeErrorType["ZIP_SIZE_LIMIT_EXCEEDED"] = "ZIP_SIZE_LIMIT_EXCEEDED";
|
|
46
|
+
/** ZIP data yielded no readable entries (corrupt, truncated, or not a ZIP archive) */
|
|
47
|
+
OfficeErrorType["ZIP_NO_ENTRIES_FOUND"] = "ZIP_NO_ENTRIES_FOUND";
|
|
48
|
+
/** ZIP data is truncated: the End of Central Directory record is absent */
|
|
49
|
+
OfficeErrorType["ZIP_TRUNCATED"] = "ZIP_TRUNCATED";
|
|
50
|
+
/** A readable ZIP archive is missing the part its document format requires */
|
|
51
|
+
OfficeErrorType["REQUIRED_PART_MISSING"] = "REQUIRED_PART_MISSING";
|
|
46
52
|
/** Document element/structure nesting exceeded the safe recursion depth */
|
|
47
53
|
OfficeErrorType["MAX_NESTING_DEPTH_EXCEEDED"] = "MAX_NESTING_DEPTH_EXCEEDED";
|
|
48
54
|
/** Embedding call timed out */
|
|
@@ -94,4 +100,8 @@ var OfficeWarningType;
|
|
|
94
100
|
OfficeWarningType["METADATA_NOT_REPRESENTABLE"] = "METADATA_NOT_REPRESENTABLE";
|
|
95
101
|
/** A styleMap output.tag was not an allowed element name and was ignored */
|
|
96
102
|
OfficeWarningType["INVALID_STYLE_MAP_TAG"] = "INVALID_STYLE_MAP_TAG";
|
|
103
|
+
/** A workbook archive contains no worksheet parts (chartsheet-only workbooks are legitimate) */
|
|
104
|
+
OfficeWarningType["NO_WORKSHEETS_FOUND"] = "NO_WORKSHEETS_FOUND";
|
|
105
|
+
/** A presentation archive contains no slides (a zero-slide presentation is legitimate) */
|
|
106
|
+
OfficeWarningType["NO_SLIDES_FOUND"] = "NO_SLIDES_FOUND";
|
|
97
107
|
})(OfficeWarningType || (exports.OfficeWarningType = OfficeWarningType = {}));
|
|
@@ -10,18 +10,31 @@ export declare function isFullParserConfig(config: any): config is FullOfficePar
|
|
|
10
10
|
/**
|
|
11
11
|
* Resolves a full parser configuration by merging defaults and user-provided overrides.
|
|
12
12
|
*
|
|
13
|
+
* The returned object always belongs solely to the caller of this function. That matters
|
|
14
|
+
* because a parse installs per-call state on the config it is handed, such as the collector
|
|
15
|
+
* that gathers warnings for one document's `ast.warnings`. Returning the caller's own object
|
|
16
|
+
* would attach that state to an object they may reuse, so a second parse would append its
|
|
17
|
+
* warnings to the first document's already-returned AST, and each parse would retain the
|
|
18
|
+
* previous one's state for as long as the config lived.
|
|
19
|
+
*
|
|
20
|
+
* Only the configuration containers are copied. Callbacks and `abortSignal` keep their
|
|
21
|
+
* identity, since a copy of an `AbortSignal` would no longer be tied to its controller.
|
|
22
|
+
*
|
|
13
23
|
* @param userConfig - Optional configuration provided by the user
|
|
14
|
-
* @returns A fully populated configuration object
|
|
24
|
+
* @returns A fully populated configuration object, owned by the caller
|
|
15
25
|
*/
|
|
16
26
|
export declare function resolveParserConfig(userConfig?: OfficeParserConfig | FullOfficeParserConfig): FullOfficeParserConfig;
|
|
17
27
|
/**
|
|
18
28
|
* Resolves a full, destination-specific configuration by merging defaults,
|
|
19
29
|
* AST-level settings, and user-provided overrides.
|
|
20
30
|
*
|
|
31
|
+
* As with {@link resolveParserConfig}, the returned object belongs solely to the caller of this
|
|
32
|
+
* function, so that per-run normalization cannot edit a config the caller still holds.
|
|
33
|
+
*
|
|
21
34
|
* @param destination - The target format
|
|
22
35
|
* @param userConfig - Optional configuration provided by the user
|
|
23
36
|
* @param astConfig - Optional configuration from the source AST (for inheritance)
|
|
24
|
-
* @returns A fully populated configuration object
|
|
37
|
+
* @returns A fully populated configuration object, owned by the caller
|
|
25
38
|
*/
|
|
26
39
|
export declare function resolveGeneratorConfig<D extends string>(destination: D, astConfig?: OfficeParserConfig, userConfig?: GeneratorConfig<D> | FullGeneratorConfig): FullGeneratorConfig;
|
|
27
40
|
/**
|