amphora-html 6.0.0-dev.0 → 6.0.1-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/render.js +3 -3
  2. package/package.json +1 -1
package/lib/render.js CHANGED
@@ -40,7 +40,7 @@ function applyRenderHooks(ref, data, locals) {
40
40
  * @param {Object} locals
41
41
  * @returns {Function}
42
42
  */
43
- function applyPostRenderHooks(ref, locals) {
43
+ function applyPostRenderHooks(ref, locals, res, self) {
44
44
  return (html) => {
45
45
 
46
46
  // skip postRender hooks in edit mode
@@ -50,7 +50,7 @@ function applyPostRenderHooks(ref, locals) {
50
50
 
51
51
  return setup.plugins.filter((plugin) => plugin.postRender)
52
52
  .reduce((val, plugin) => {
53
- return plugin.postRender(ref, html, locals);
53
+ return plugin.postRender(ref, html, locals, res, self);
54
54
  }, html);
55
55
  };
56
56
  }
@@ -148,7 +148,7 @@ function render(data, meta, res) {
148
148
  return applyRenderHooks(state._layoutRef || state.self, data, state.locals)
149
149
  .then(makeHtml(state))
150
150
  .then(mediaService.injectScriptsAndStyles(state))
151
- .then(applyPostRenderHooks(state._layoutRef || state.self, state.locals))
151
+ .then(applyPostRenderHooks(state._layoutRef || state.self, state.locals, res, meta._ref))
152
152
  .then(result => {
153
153
  res.type('text/html');
154
154
  res.send(result);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amphora-html",
3
- "version": "6.0.0-dev.0",
3
+ "version": "6.0.1-dev.0",
4
4
  "description": "An HTML renderer for component data",
5
5
  "main": "index.js",
6
6
  "scripts": {