@monkeyplus/flow 5.0.0-rc.173 → 5.0.0-rc.174

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,18 +1,12 @@
1
1
  import "node-fetch-native/polyfill";
2
2
  import { eventHandler } from "h3";
3
3
  import { defineCachedFunction, useRuntimeConfig } from "#internal/nitro";
4
- const getServerApp = () => import("#server").then((r) => r);
4
+ const getServerApp = () => import("#server").then((r) => r?.default?.default || r?.default || r);
5
5
  export const getFlowRenderer = lazyCachedFunction(async () => {
6
- const r = await getServerApp();
7
- console.log(r);
8
- console.log("entry", typeof r?.entry);
9
- console.log("default", typeof r?.default);
10
- console.log("default.default", typeof r?.default?.default);
11
- const theFlowApp = r?.entry || r?.default?.default || r.default;
12
- console.log(theFlowApp);
13
- if (!theFlowApp)
6
+ const createFlowApp = await getServerApp();
7
+ if (!createFlowApp)
14
8
  throw new Error("Server bundle is not available");
15
- return theFlowApp(useRuntimeConfig());
9
+ return createFlowApp(useRuntimeConfig());
16
10
  });
17
11
  export default eventHandler(async (event) => {
18
12
  const flow = await getFlowRenderer();
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.173";
27
+ const version = "5.0.0-rc.174";
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.173",
3
+ "version": "5.0.0-rc.174",
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.173",
29
- "@monkeyplus/flow-kit": "5.0.0-rc.173",
30
- "@monkeyplus/flow-schema": "5.0.0-rc.173",
28
+ "@monkeyplus/flow-cli": "5.0.0-rc.174",
29
+ "@monkeyplus/flow-kit": "5.0.0-rc.174",
30
+ "@monkeyplus/flow-schema": "5.0.0-rc.174",
31
31
  "@rollup/plugin-replace": "^4.0.0",
32
32
  "@vueuse/head": "^1.0.16",
33
33
  "c12": "^1.0.1",