officeparser 4.2.0 → 5.0.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "officeparser",
3
- "version": "4.2.0",
3
+ "version": "5.0.0",
4
4
  "description": "A Node.js library to parse text out of any office file. Currently supports docx, pptx, xlsx, odt, odp, ods, pdf files.",
5
5
  "main": "officeParser.js",
6
6
  "files": [
@@ -44,15 +44,16 @@
44
44
  "homepage": "https://github.com/harshankur/officeParser#readme",
45
45
  "dependencies": {
46
46
  "@xmldom/xmldom": "^0.8.10",
47
- "decompress": "^4.2.1",
47
+ "concat-stream": "^2.0.0",
48
48
  "file-type": "^16.5.4",
49
49
  "node-ensure": "^0.0.0",
50
- "rimraf": "^5.0.10"
50
+ "yauzl": "^3.1.3"
51
51
  },
52
52
  "devDependencies": {
53
- "@types/decompress": "^4.2.6",
53
+ "@types/concat-stream": "^2.0.3",
54
54
  "@types/node": "^18.16.1",
55
55
  "@types/xmldom": "^0.1.33",
56
+ "@types/yauzl": "^2.10.3",
56
57
  "typescript": "^5.0.3"
57
58
  }
58
59
  }
@@ -1,15 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  export type OfficeParserConfig = {
3
3
  /**
4
- * The directory where officeparser stores the temp files . The final decompressed data will be put inside officeParserTemp folder within your directory. Please ensure that this directory actually exists. Default is officeParsertemp.
5
- */
6
- tempFilesLocation?: string;
7
- /**
8
- * Flag to not delete the internal content files and the duplicate temp files that it uses after unzipping office files. Default is false. It deletes all of those files.
9
- */
10
- preserveTempFiles?: boolean;
11
- /**
12
- * Flag to show all the logs to console in case of an error irrespective of your own handling.
4
+ * Flag to show all the logs to console in case of an error irrespective of your own handling. Default is false.
13
5
  */
14
6
  outputErrorToConsole?: boolean;
15
7
  /**
@@ -32,8 +24,7 @@ export type OfficeParserConfig = {
32
24
  * @returns {void}
33
25
  */
34
26
  export function parseOffice(file: string | Buffer, callback: Function, config?: OfficeParserConfig): void;
35
- /**
36
- * Main async function that can be used with await to execute parseOffice. Or it can be used with promises.
27
+ /** Main async function that can be used with await to execute parseOffice. Or it can be used with promises.
37
28
  * @param {string | Buffer} file File path or file buffers
38
29
  * @param {OfficeParserConfig} [config={}] [OPTIONAL]: Config Object for officeParser
39
30
  * @returns {Promise<string>}