@monkeyplus/flow 5.0.0-rc.42 → 5.0.0-rc.43
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.
|
@@ -46,7 +46,11 @@ export default eventHandler(async (event) => {
|
|
|
46
46
|
contextPage.dynamic = dynamicPage;
|
|
47
47
|
}
|
|
48
48
|
templateContext.seo = {};
|
|
49
|
-
const sharedContext = await utils.getSharedContext(
|
|
49
|
+
const sharedContext = await utils.getSharedContext({
|
|
50
|
+
...contextHooks,
|
|
51
|
+
...contextPage,
|
|
52
|
+
utils
|
|
53
|
+
});
|
|
50
54
|
templateContext.sharedContext = sharedContext || {};
|
|
51
55
|
templateContext.utils = utils;
|
|
52
56
|
templateContext.seo = await page.seo?.({ ...contextHooks, ...contextPage, utils, sharedContext }) || {};
|
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.
|
|
32
|
+
const version = "5.0.0-rc.43";
|
|
33
33
|
|
|
34
34
|
let _distDir = dirname(fileURLToPath(import.meta.url));
|
|
35
35
|
if (_distDir.endsWith("chunks"))
|
|
@@ -63,12 +63,12 @@ export default defineFlowPlugin(async (flow) => {
|
|
|
63
63
|
}
|
|
64
64
|
return urls.sort();
|
|
65
65
|
}
|
|
66
|
-
async function getSharedContext(
|
|
66
|
+
async function getSharedContext(ctx) {
|
|
67
67
|
const entries = Object.entries(contexts);
|
|
68
68
|
if (!entries.length)
|
|
69
69
|
return {};
|
|
70
70
|
const _contexts = await Promise.all(entries.map(async ([key, method]) => {
|
|
71
|
-
const data = await method.setup(
|
|
71
|
+
const data = await method.setup(ctx);
|
|
72
72
|
return { [key]: data };
|
|
73
73
|
}));
|
|
74
74
|
return _contexts.reduce((acc, curr) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monkeyplus/flow",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.43",
|
|
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.
|
|
29
|
-
"@monkeyplus/flow-kit": "5.0.0-rc.
|
|
30
|
-
"@monkeyplus/flow-schema": "5.0.0-rc.
|
|
28
|
+
"@monkeyplus/flow-cli": "5.0.0-rc.43",
|
|
29
|
+
"@monkeyplus/flow-kit": "5.0.0-rc.43",
|
|
30
|
+
"@monkeyplus/flow-schema": "5.0.0-rc.43",
|
|
31
31
|
"@rollup/plugin-replace": "^4.0.0",
|
|
32
32
|
"@vueuse/head": "^0.7.6",
|
|
33
33
|
"c12": "^0.2.7",
|