@jsreport/jsreport-express
Advanced tools
Comparing version 3.2.0 to 3.2.1
@@ -241,3 +241,3 @@ const { pipeline } = require('stream') | ||
try { | ||
const profile = await reporter.documentStore.collection('profiles').findOne({ _id: req.params.id }, req) | ||
let profile = await reporter.documentStore.collection('profiles').findOne({ _id: req.params.id }, req) | ||
@@ -250,2 +250,16 @@ if (!profile) { | ||
if (!profile.blobPersisted) { | ||
for (let i = 0; i < 10; i++) { | ||
await new Promise((resolve) => setTimeout(resolve, 500)) | ||
profile = await reporter.documentStore.collection('profiles').findOne({ _id: req.params.id }, req) | ||
if (profile.blobPersisted) { | ||
break | ||
} | ||
} | ||
if (!profile.blobPersisted) { | ||
throw reporter.createError('Timeout when waiting for profile blob to be fully persisted') | ||
} | ||
} | ||
const blobContentBuf = await reporter.blobStorage.read(profile.blobName) | ||
@@ -252,0 +266,0 @@ res.send(blobContentBuf.toString()) |
{ | ||
"name": "@jsreport/jsreport-express", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "jsreport extension adding API", | ||
@@ -42,5 +42,5 @@ "keywords": [ | ||
"devDependencies": { | ||
"@jsreport/jsreport-core": "3.2.0", | ||
"@jsreport/jsreport-core": "3.3.0", | ||
"@jsreport/jsreport-jsrender": "3.0.0", | ||
"@jsreport/jsreport-scripts": "3.0.1", | ||
"@jsreport/jsreport-scripts": "3.1.0", | ||
"@jsreport/studio-dev": "3.0.1", | ||
@@ -47,0 +47,0 @@ "axios": "0.23.0", |
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
56057
1232