@jsreport/jsreport-pdf-utils
Advanced tools
Comparing version 4.2.0 to 4.2.1
@@ -1,2 +0,1 @@ | ||
const path = require('path') | ||
@@ -52,7 +51,2 @@ const missingSecretMessage = 'pdf-sign extension uses encryption to store sensitive data and needs secret key to be defined. Please fill "encryption.secretKey" at the root of the config or disable encryption using "encryption.enabled=false".' | ||
if (reporter.compilation) { | ||
reporter.compilation.resource('pdfjs-dist-lib-files', path.join(path.dirname(require.resolve('pdfjs-dist/package.json')), 'lib')) | ||
reporter.compilation.resource('pdfjs-dist-legacy-build-files', path.join(path.dirname(require.resolve('pdfjs-dist/package.json')), 'legacy/build')) | ||
} | ||
if (reporter.documentStore.model.entityTypes.TemplateType) { | ||
@@ -59,0 +53,0 @@ reporter.documentStore.model.entityTypes.TemplateType.pdfOperations = { type: 'Collection(jsreport.PdfOperationType)' } |
@@ -10,12 +10,2 @@ const path = require('path') | ||
module.exports = (reporter, definition) => { | ||
// warm up of deps to make it work in trustUserCode: false (SES), | ||
// this also allows to not require early when it is not needed. (trustUserCode: true) | ||
// usage of try catch was done to prevent the app to fail here, instead it will fail | ||
// at the same later time in which the dep is used | ||
if (reporter.options.trustUserCode === false) { | ||
try { | ||
require('pdfjs-dist/legacy/build/pdf.js').getDocument(Buffer.from([])).promise.catch(() => {}) | ||
} catch {} | ||
} | ||
let helpersScript | ||
@@ -22,0 +12,0 @@ |
{ | ||
"name": "@jsreport/jsreport-pdf-utils", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"description": "jsreport extension providing pdf operations like merge or concatenation", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -10,2 +10,6 @@ # @jsreport/jsreport-pdf-utils | ||
### 4.2.1 | ||
- remove references to pdfjs-dist | ||
### 4.2.0 | ||
@@ -12,0 +16,0 @@ |
90
1699965
8076