primate 0.21.3 → 0.21.4

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/package.json +1 -1
  2. package/src/app.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primate",
3
- "version": "0.21.3",
3
+ "version": "0.21.4",
4
4
  "description": "Expressive, minimal and extensible web framework",
5
5
  "homepage": "https://primatejs.com",
6
6
  "bugs": "https://github.com/primatejs/primate/issues",
package/src/app.js CHANGED
@@ -86,12 +86,12 @@ export default async (config, root, log) => {
86
86
  const csp = Object.keys(http.csp).reduce((policy, key) =>
87
87
  `${policy}${key} ${http.csp[key]};`, "")
88
88
  .replace("script-src 'self'", `script-src 'self' ${
89
- app.assets
89
+ this.assets
90
90
  .filter(({type}) => type !== "style")
91
91
  .map(asset => `'${asset.integrity}'`).join(" ")
92
92
  } `)
93
93
  .replace("style-src 'self'", `style-src 'self' ${
94
- app.assets
94
+ this.assets
95
95
  .filter(({type}) => type === "style")
96
96
  .map(asset => `'${asset.integrity}'`).join(" ")
97
97
  } `);
@@ -103,7 +103,7 @@ export default async (config, root, log) => {
103
103
  },
104
104
  handlers: {...handlers},
105
105
  async render({body = "", page} = {}) {
106
- const html = await index(app, page ?? config.pages.index);
106
+ const html = await index(this, page ?? config.pages.index);
107
107
  // inline: <script type integrity>...</script>
108
108
  // outline: <script type integrity src></script>
109
109
  const script = ({inline, code, type, integrity, src}) => inline