@jsreport/jsreport-express
Advanced tools
Comparing version 3.0.1 to 3.1.0
@@ -0,0 +0,0 @@ const config = require('./jsreport.config.js') |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ const path = require('path') |
@@ -0,0 +0,0 @@ const { Readable } = require('stream') |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ const yauzl = require('yauzl') |
@@ -57,4 +57,5 @@ /*! | ||
reporter.express.redirectServer = http.createServer((req, res) => { | ||
const host = req.headers.host || '' | ||
res.writeHead(302, { | ||
Location: 'https://' + req.headers.host.split(':')[0] + ':' + config.httpsPort + req.url | ||
Location: 'https://' + host.split(':')[0] + ':' + config.httpsPort + req.url | ||
}) | ||
@@ -61,0 +62,0 @@ |
@@ -0,0 +0,0 @@ const ODataServer = require('simple-odata-server') |
@@ -179,2 +179,13 @@ const { pipeline } = require('stream') | ||
app.get('/api/schema/:entitySet', (req, res, next) => { | ||
const normalizedEntityTypeName = reporter.documentStore.model.entitySets[req.params.entitySet]?.normalizedEntityTypeName | ||
const schema = normalizedEntityTypeName != null ? reporter.entityTypeValidator.getSchema(normalizedEntityTypeName) : undefined | ||
if (schema == null) { | ||
return res.status(404).send(`There is no schema for "${req.params.entitySet}"`) | ||
} | ||
res.json(schema) | ||
}) | ||
app.get('/api/profile/:id', async (req, res, next) => { | ||
@@ -181,0 +192,0 @@ try { |
@@ -0,0 +0,0 @@ |
{ | ||
"name": "@jsreport/jsreport-express", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"description": "jsreport extension adding API", | ||
@@ -42,3 +42,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@jsreport/jsreport-core": "3.0.1", | ||
"@jsreport/jsreport-core": "3.1.0", | ||
"@jsreport/jsreport-jsrender": "3.0.0", | ||
@@ -63,2 +63,2 @@ "@jsreport/jsreport-scripts": "3.0.0", | ||
} | ||
} | ||
} |
@@ -10,4 +10,13 @@ # @jsreport/jsreport-express | ||
### 3.0.0-beta.1 | ||
### 3.1.0 | ||
Adaptations for the v3 APIs | ||
- add `/api/schema/:entitySet` route to fetch json schema for entitySet | ||
- don't crash when host header missing | ||
### 3.0.1 | ||
fix for passing express app into options | ||
### 3.0.0 | ||
Adaptations for the v3 APIs |
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
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
1219
22
55414