libreoffice-convert
Advanced tools
Comparing version 1.3.8 to 1.4.0
@@ -16,2 +16,3 @@ /// <reference types="node" /> | ||
asyncOptions?: { times?: number; interval?: number }; | ||
sofficeBinaryPaths?: string[]; | ||
}, | ||
@@ -18,0 +19,0 @@ callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void |
@@ -17,9 +17,10 @@ 'use strict'; | ||
soffice: (callback) => { | ||
let paths = []; | ||
let paths = (options || {}).sofficeBinaryPaths ?? []; | ||
switch (process.platform) { | ||
case 'darwin': paths = ['/Applications/LibreOffice.app/Contents/MacOS/soffice']; | ||
case 'darwin': paths = [...paths, '/Applications/LibreOffice.app/Contents/MacOS/soffice']; | ||
break; | ||
case 'linux': paths = ['/usr/bin/libreoffice', '/usr/bin/soffice', '/snap/bin/libreoffice']; | ||
case 'linux': paths = [...paths, '/usr/bin/libreoffice', '/usr/bin/soffice', '/snap/bin/libreoffice']; | ||
break; | ||
case 'win32': paths = [ | ||
...paths, | ||
path.join(process.env['PROGRAMFILES(X86)'], 'LIBREO~1/program/soffice.exe'), | ||
@@ -26,0 +27,0 @@ path.join(process.env['PROGRAMFILES(X86)'], 'LibreOffice/program/soffice.exe'), |
{ | ||
"name": "libreoffice-convert", | ||
"version": "1.3.8", | ||
"version": "1.4.0", | ||
"description": "A simple and fast node.js module for converting office documents to different formats", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19561
123