Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jsreport/jsreport-express

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsreport/jsreport-express - npm Package Compare versions

Comparing version 3.0.0-beta.1 to 3.0.0

0

index.js

@@ -0,0 +0,0 @@ const config = require('./jsreport.config.js')

@@ -0,0 +0,0 @@

51

lib/formDataStream/index.js

@@ -27,24 +27,3 @@ const path = require('path')

this._ended = false
this._consumed = false
this._multiStreamFactoryCallback = factoryCallback
this.once('error', () => {
clearImmediate(self._flushTimerRef)
})
this.once('end', () => {
this._consumed = true
})
const self = this
this._flushTimerRef = setImmediate(function checkIfEnded () {
if (self._consumed) {
return
}
self._flushQueue()
self._flushTimerRef = setImmediate(checkIfEnded)
})
}

@@ -95,2 +74,9 @@

if (this._queue.length === 0) {
// if the queue was empty we queue a flush, so we can flush the new items appended here
this._nextFlushTimerRef = setImmediate(() => {
this._flushQueue()
})
}
if (this._fields.length === 0) {

@@ -115,4 +101,4 @@ this._addToReadableQueue(FormData.LINE_BREAK)

// don't continue flushing in timer
clearImmediate(this._flushTimerRef)
// if a flush was queued, cancel it, because we want the bellow flush to be the last
clearImmediate(this._nextFlushTimerRef)

@@ -199,3 +185,3 @@ this._flushQueue(() => {

// then we just skip this flush, the flushing will continue
// and check as normal in the next timer tick
// and check as normal when the current stream finishes
if (!this._ended) {

@@ -210,3 +196,6 @@ return

// processing ends
setImmediate(() => this._flushQueue(endCb))
this._current.once('end', () => {
setImmediate(() => this._flushQueue(endCb))
})
return

@@ -233,5 +222,11 @@ }

if (endCb) {
combined.on('end', () => endCb())
}
combined.once('end', () => {
if (endCb) {
endCb()
} else if (!this._ended) {
// when the current stream ends, and the end signal has not been received
// we queue a flush
setImmediate(() => this._flushQueue())
}
})

@@ -238,0 +233,0 @@ this._multiStreamFactoryCallback(null, combined)

@@ -0,0 +0,0 @@ const { Readable } = require('stream')

@@ -0,0 +0,0 @@

@@ -0,0 +0,0 @@ const yauzl = require('yauzl')

@@ -5,3 +5,2 @@ /*!

const path = require('path')
const Promise = require('bluebird')
const bodyParser = require('body-parser')

@@ -8,0 +7,0 @@ const cookieParser = require('cookie-parser')

const ODataServer = require('simple-odata-server')
const Promise = require('bluebird')
const omit = require('lodash.omit')

@@ -31,9 +30,9 @@

}).update((col, query, update, req, cb) => {
return Promise.resolve(reporter.documentStore.collection(col).update(query, update, req)).asCallback(cb)
return Promise.resolve(reporter.documentStore.collection(col).update(query, update, req)).then((result) => cb(null, result), (err) => cb(err))
})
.insert((col, doc, req, cb) => {
return Promise.resolve(reporter.documentStore.collection(col).insert(doc, req)).asCallback(cb)
return Promise.resolve(reporter.documentStore.collection(col).insert(doc, req)).then((result) => cb(null, result), (err) => cb(err))
})
.remove((col, query, req, cb) => {
return Promise.resolve(reporter.documentStore.collection(col).remove(query, req)).asCallback(cb)
return Promise.resolve(reporter.documentStore.collection(col).remove(query, req)).then((result) => cb(null, result), (err) => cb(err))
})

@@ -59,3 +58,3 @@ .query((col, query, req, cb) => {

if (query.$count) {
return Promise.resolve(cursor.count()).asCallback(cb)
return Promise.resolve(cursor.count()).then((result) => cb(null, result), (err) => cb(err))
}

@@ -66,3 +65,3 @@

.then((items) => items.map((i) => omit(i, hiddenProps[col])))
.asCallback(cb)
.then((result) => cb(null, result), (err) => cb(err))
}

@@ -77,3 +76,3 @@

})
})).asCallback(cb)
})).then((result) => cb(null, result), (err) => cb(err))
}).error((req, res, err, def) => {

@@ -80,0 +79,0 @@ if (err.code === 'UNAUTHORIZED') {

@@ -53,3 +53,3 @@ const { pipeline } = require('stream')

profiler = reporter.attachProfiler(renderRequest)
profiler = reporter.attachProfiler(renderRequest, req.query.profilerMode)

@@ -126,3 +126,3 @@ profiler.on('profile', (m) => {

const executeRender = () => {
if (req.query.profilerDebug === 'true') {
if (req.query.profilerMode === 'standard' || req.query.profilerMode === 'full') {
reporter.express.streamRender(req.body, req, res, next)

@@ -129,0 +129,0 @@ } else {

@@ -0,0 +0,0 @@

{
"name": "@jsreport/jsreport-express",
"version": "3.0.0-beta.1",
"version": "3.0.0",
"description": "jsreport extension adding API",

@@ -29,3 +29,2 @@ "keywords": [

"archiver": "5.3.0",
"bluebird": "3.5.4",
"body-parser": "1.19.0",

@@ -39,3 +38,3 @@ "cookie-parser": "1.4.4",

"serve-static": "1.14.1",
"simple-odata-server": "1.1.1",
"simple-odata-server": "1.1.2",
"stream-to-array": "2.3.0",

@@ -45,8 +44,8 @@ "yauzl": "2.10.0"

"devDependencies": {
"axios": "0.21.1",
"@jsreport/jsreport-core": "3.0.0",
"@jsreport/jsreport-jsrender": "3.0.0",
"@jsreport/jsreport-scripts": "3.0.0-beta.1",
"@jsreport/studio-dev": "3.0.0",
"axios": "0.23.0",
"cross-env": "5.2.0",
"@jsreport/jsreport-core": "3.0.0-beta.1",
"@jsreport/jsreport-jsrender": "3.0.0-beta.1",
"@jsreport/jsreport-scripts": "3.0.0-beta.1",
"@jsreport/studio-dev": "3.0.0-beta.1",
"mocha": "5.2.0",

@@ -58,3 +57,3 @@ "should": "13.2.3",

"engines": {
"node": ">=14.17.4"
"node": ">=16.11"
},

@@ -67,2 +66,2 @@ "standard": {

}
}
}

@@ -0,0 +0,0 @@ # @jsreport/jsreport-express

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc