@monkeyplus/flow 5.0.0-rc.117 → 5.0.0-rc.119

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.
@@ -1,4 +1,4 @@
1
- import { eventHandler, getQuery } from "h3";
1
+ import { eventHandler, getQuery, readBody } from "h3";
2
2
  import { joinURL } from "ufo";
3
3
  import { getFlowRenderer } from "./flow.mjs";
4
4
  const normalizeCall = async (seo, ctx) => {
@@ -41,7 +41,13 @@ export default eventHandler(async (event) => {
41
41
  };
42
42
  const contextInject = {};
43
43
  const utils = Object.assign({ getLocale: () => locale, injectContext: (key, value) => contextInject[key] = value, defineCachedFunction: event.context.defineCachedFunction }, flow.app.utils);
44
- const contextHooks = {};
44
+ const contextHooks = {
45
+ _post: {}
46
+ };
47
+ if (event.node.req.method.toLowerCase() === "post") {
48
+ const body = await readBody(event);
49
+ contextHooks._post = body;
50
+ }
45
51
  await flow.callHook("page:context", { localeCode: locale.code, page: pageName }, utils, contextHooks);
46
52
  templateContext.url = url;
47
53
  templateContext.baseURL = flow.$config.app.baseURL;
package/dist/index.mjs CHANGED
@@ -24,7 +24,7 @@ import replace from '@rollup/plugin-replace';
24
24
  import { resolveTSConfig } from 'pkg-types';
25
25
  import fse from 'fs-extra';
26
26
 
27
- const version = "5.0.0-rc.117";
27
+ const version = "5.0.0-rc.119";
28
28
 
29
29
  let _distDir = dirname(fileURLToPath(import.meta.url));
30
30
  if (_distDir.match(/(chunks|shared)$/))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monkeyplus/flow",
3
- "version": "5.0.0-rc.117",
3
+ "version": "5.0.0-rc.119",
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.117",
29
- "@monkeyplus/flow-kit": "5.0.0-rc.117",
30
- "@monkeyplus/flow-schema": "5.0.0-rc.117",
28
+ "@monkeyplus/flow-cli": "5.0.0-rc.119",
29
+ "@monkeyplus/flow-kit": "5.0.0-rc.119",
30
+ "@monkeyplus/flow-schema": "5.0.0-rc.119",
31
31
  "@rollup/plugin-replace": "^4.0.0",
32
32
  "@vueuse/head": "^1.0.16",
33
33
  "c12": "^1.0.1",