🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@groupdocs/groupdocs.viewer

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@groupdocs/groupdocs.viewer - npm Package Compare versions

Comparing version
23.8.0
to
23.10.0
+2
-2
index.js

@@ -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:`);

@@ -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)
})
}
}
{
"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": [