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

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,5 +1,6 @@
1
- import { eventHandler, getQuery } from "h3";
1
+ import { eventHandler, getQuery, readBody } from "h3";
2
2
  import { joinURL } from "ufo";
3
+ import { mergeDeep } from "tily/object/mergeDeep";
3
4
  import { getFlowRenderer } from "./flow.mjs";
4
5
  const normalizeCall = async (seo, ctx) => {
5
6
  if (typeof seo === "function")
@@ -83,6 +84,10 @@ export default eventHandler(async (event) => {
83
84
  ...contextHooks,
84
85
  ...contexData
85
86
  };
87
+ if (event.node.req.method.toLowerCase() === "post") {
88
+ const body = await readBody(event);
89
+ templateContext.context = mergeDeep(templateContext.context, { ...body });
90
+ }
86
91
  await flow.callHook("page:scripts", scripts, templateContext);
87
92
  templateContext.getHeadScripts = () => {
88
93
  return scripts.head.join("\n");
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.118";
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.118",
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.118",
29
+ "@monkeyplus/flow-kit": "5.0.0-rc.118",
30
+ "@monkeyplus/flow-schema": "5.0.0-rc.118",
31
31
  "@rollup/plugin-replace": "^4.0.0",
32
32
  "@vueuse/head": "^1.0.16",
33
33
  "c12": "^1.0.1",
@@ -55,6 +55,7 @@
55
55
  "perfect-debounce": "^0.1.3",
56
56
  "radix3": "^1.0.0",
57
57
  "unenv": "^1.0.0",
58
+ "tily": "^2.18.0",
58
59
  "ohmyfetch": "^0.4.21",
59
60
  "node-fetch-native": "^1.0.1",
60
61
  "rollup": "^2.79.1",