New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fastboot-express-middleware

Package Overview
Dependencies
Maintainers
6
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastboot-express-middleware - npm Package Compare versions

Comparing version

to
3.1.0

9

CHANGELOG.md

@@ -0,1 +1,10 @@

## v3.1.0 (2020-11-20)
#### :rocket: Enhancement
* [#66](https://github.com/ember-fastboot/fastboot-express-middleware/pull/66) Add support for passing metadata into visitOptions of fastboot visit ([@suchitadoshi1987](https://github.com/suchitadoshi1987))
#### Committers: 1
- Suchita Doshi ([@suchitadoshi1987](https://github.com/suchitadoshi1987))
## v3.0.0 (2020-10-23)

@@ -2,0 +11,0 @@

2

package.json
{
"name": "fastboot-express-middleware",
"version": "3.0.0",
"version": "3.1.0",
"description": "An Express middleware for rendering Ember apps with FastBoot",

@@ -5,0 +5,0 @@ "keywords": [

@@ -110,4 +110,21 @@ # FastBoot Express Middleware

## VisitOptions
For sending over additional metadata so that it could be leveraged by the consuming app/addon, you can pass the `visitOptions` option that contains any extra information that might be necessary.
Example usecase: If an addon relies on some metadata that is set by the consuming app, then in that case the addon will not have the access to the metadata value. In such cases, developing against dummy app becomes difficult. Hence, passing in the `visitOptions` will enable smoother local addon development.
```js
app.get('/*', fastbootMiddleware({
distPath: '/path/to/dist',
visitOptions: {
metadata: {
foo: 'bar'
}
}
}));
```
## Tests
`npm test`

@@ -32,3 +32,4 @@ 'use strict';

try {
let result = await fastboot.visit(path, { request: req, response: res });
let visitOptions = Object.assign({}, opts.visitOptions, { request: req, response: res });
let result = await fastboot.visit(path, visitOptions);
let body = opts.chunkedResponse ? await result.chunks() : await result.html();

@@ -35,0 +36,0 @@