@groupdocs/groupdocs.viewer
Advanced tools
+2
-2
@@ -14,4 +14,4 @@ const fs = require('fs'); | ||
| if (!checkFileExists(path.join(__dirname, 'lib/groupdocs-viewer-nodejs-23.4.jar'))) { | ||
| console.warn('\x1b[33m%s\x1b[0m', `File groupdocs-viewer-nodejs-23.4.jar not found in the lib directory.\nPlease navigate to the package directory:`); | ||
| if (!checkFileExists(path.join(__dirname, 'lib/groupdocs-viewer-nodejs-23.10.1.jar'))) { | ||
| console.warn('\x1b[33m%s\x1b[0m', `File groupdocs-viewer-nodejs-23.10.1.jar not found in the lib directory.\nPlease navigate to the package directory:`); | ||
| console.log('\n cd node_modules/@groupdocs/groupdocs.viewer\n') | ||
@@ -18,0 +18,0 @@ console.warn('\x1b[33m%s\x1b[0m', `Then download the JAR file using the command:`); |
+18
-30
@@ -14,3 +14,3 @@ const path = require('path') | ||
| java.classpath.push(path.join(__dirname, '/groupdocs-viewer-nodejs-23.4.jar')) | ||
| java.classpath.push(path.join(__dirname, '/groupdocs-viewer-nodejs-23.10.1.jar')) | ||
@@ -30,10 +30,17 @@ exports = module.exports | ||
| /** STREAM HELPERS * */ | ||
| exports.readDataFromStream = function (readStream, callback) { | ||
| const inputStreamBuffer = new exports.StreamBuffer() | ||
| readStream.on('data', chunk => { | ||
| inputStreamBuffer.write(chunk) | ||
| }) | ||
| readStream.on('end', () => { | ||
| callback(inputStreamBuffer.toInputStream()) | ||
| }) | ||
| exports.readDataFromStream = function (readStream) { | ||
| return new Promise((resolve, reject) => { | ||
| const inputStreamBuffer = new exports.StreamBuffer() | ||
| readStream.on('data', chunk => { | ||
| inputStreamBuffer.write(chunk) | ||
| }) | ||
| readStream.on('end', () => { | ||
| try { | ||
| resolve(inputStreamBuffer.toInputStream()) | ||
| } catch (err) { | ||
| reject(err); | ||
| } | ||
| }); | ||
| }); | ||
| } | ||
@@ -53,3 +60,2 @@ | ||
| exports.License = java.import("com.groupdocs.viewer.License"); | ||
@@ -95,2 +101,3 @@ exports.Metered = java.import("com.groupdocs.viewer.Metered"); | ||
| exports.Watermark = java.import("com.groupdocs.viewer.options.Watermark"); | ||
| exports.WebDocumentOptions = java.import("com.groupdocs.viewer.options.WebDocumentOptions"); | ||
| exports.WordProcessingOptions = java.import("com.groupdocs.viewer.options.WordProcessingOptions"); | ||
@@ -135,3 +142,2 @@ exports.ArchiveViewInfoImpl = java.import("com.groupdocs.viewer.results.ArchiveViewInfoImpl"); | ||
| exports.StreamBuffer = class StreamBuffer { | ||
@@ -148,20 +154,2 @@ constructor() { | ||
| } | ||
| } | ||
| /** STREAM METHODS * */ | ||
| exports.License.setLicenseFromStream = function (license, licenseStream, callback) { | ||
| const inputStreamBuffer = new exports.StreamBuffer() | ||
| licenseStream.on('data', chunk => { | ||
| inputStreamBuffer.write(chunk) | ||
| }) | ||
| licenseStream.on('end', () => { | ||
| let error | ||
| try { | ||
| license.setLicense(inputStreamBuffer.toInputStream()) | ||
| } catch (err) { | ||
| error = err | ||
| } | ||
| callback(error) | ||
| }) | ||
| } | ||
| } |
+2
-2
| { | ||
| "name": "@groupdocs/groupdocs.viewer", | ||
| "version": "23.8.0", | ||
| "version": "23.10.0", | ||
| "description": "Powerful, high-performance and cross-platform library that allows you to build desktop and web file viewer applications.", | ||
| "main": "index.js", | ||
| "scripts": { | ||
| "postinstall": "curl -H 'Cache-Control:no-cache' https://releases.groupdocs.com/java/repo/com/groupdocs/groupdocs-viewer-nodejs/23.4/groupdocs-viewer-nodejs-23.4.jar > lib/groupdocs-viewer-nodejs-23.4.jar" | ||
| "postinstall": "curl -H 'Cache-Control:no-cache' https://releases.groupdocs.com/java/repo/com/groupdocs/groupdocs-viewer-nodejs/23.10.1/groupdocs-viewer-nodejs-23.10.1.jar > lib/groupdocs-viewer-nodejs-23.10.1.jar" | ||
| }, | ||
@@ -9,0 +9,0 @@ "keywords": [ |
Install scripts
Supply chain riskInstall scripts are run when the package is installed or built. Malicious packages often use scripts that run automatically to execute payloads or fetch additional code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed or built. Malicious packages often use scripts that run automatically to execute payloads or fetch additional code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
4
-20%68521
-0.31%158
-5.95%