@monkeyplus/flow 5.0.0-rc.80 → 5.0.0-rc.82

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.
@@ -18,7 +18,6 @@ export default eventHandler(async (event) => {
18
18
  const { page, locale, params, view, name: pageName } = flow.router.byUrl.lookup(url) || {};
19
19
  if (!page)
20
20
  return;
21
- await flow.callHook("page:scripts", scripts);
22
21
  if (view.bundle)
23
22
  await flow.callHook("page:chunks", view.bundle, chunks);
24
23
  const templateContext = {};
@@ -67,9 +66,13 @@ export default eventHandler(async (event) => {
67
66
  ...contextHooks,
68
67
  ...contexData
69
68
  };
69
+ await flow.callHook("page:scripts", scripts, templateContext);
70
70
  templateContext.getHeadScripts = () => {
71
71
  return scripts.head.join("\n");
72
72
  };
73
+ templateContext.getBodyEndScripts = () => {
74
+ return scripts.bodyEnd.join("\n");
75
+ };
73
76
  templateContext.getHeadChunks = () => {
74
77
  return chunks.head.join("\n");
75
78
  };
package/dist/index.mjs CHANGED
@@ -29,7 +29,7 @@ import { isExternal as isExternal$1, ExternalsDefaults } from 'externality';
29
29
  import { createHash } from 'node:crypto';
30
30
  import MagicString from 'magic-string';
31
31
 
32
- const version = "5.0.0-rc.80";
32
+ const version = "5.0.0-rc.82";
33
33
 
34
34
  let _distDir = dirname(fileURLToPath(import.meta.url));
35
35
  if (_distDir.endsWith("chunks"))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monkeyplus/flow",
3
- "version": "5.0.0-rc.80",
3
+ "version": "5.0.0-rc.82",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -25,9 +25,9 @@
25
25
  "dist"
26
26
  ],
27
27
  "dependencies": {
28
- "@monkeyplus/flow-cli": "5.0.0-rc.80",
29
- "@monkeyplus/flow-kit": "5.0.0-rc.80",
30
- "@monkeyplus/flow-schema": "5.0.0-rc.80",
28
+ "@monkeyplus/flow-cli": "5.0.0-rc.82",
29
+ "@monkeyplus/flow-kit": "5.0.0-rc.82",
30
+ "@monkeyplus/flow-schema": "5.0.0-rc.82",
31
31
  "@rollup/plugin-replace": "^4.0.0",
32
32
  "@vueuse/head": "^0.7.6",
33
33
  "c12": "^0.2.8",