@monkeyplus/flow 5.0.0-rc.72 → 5.0.0-rc.73
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.
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.73";
|
|
33
33
|
|
|
34
34
|
let _distDir = dirname(fileURLToPath(import.meta.url));
|
|
35
35
|
if (_distDir.endsWith("chunks"))
|
|
@@ -1367,7 +1367,7 @@ async function bundleVite(flow) {
|
|
|
1367
1367
|
flow.hook("vite:serverCreated", (server) => {
|
|
1368
1368
|
ctx.nuxt.hook("app:templatesGenerated", () => {
|
|
1369
1369
|
for (const [id, mod] of server.moduleGraph.idToModuleMap) {
|
|
1370
|
-
if (id.includes("pages.
|
|
1370
|
+
if (id.includes("pages."))
|
|
1371
1371
|
server.moduleGraph.invalidateModule(mod);
|
|
1372
1372
|
if (id.startsWith("\0virtual:"))
|
|
1373
1373
|
server.moduleGraph.invalidateModule(mod);
|
|
@@ -3,6 +3,7 @@ export declare function definePage<T>(...pages: SimplePage<T>[]): SimplePage<T>[
|
|
|
3
3
|
export declare function defineDynamicPage<T>(...pages: DynamicPage<T>[]): DynamicPage<T>[];
|
|
4
4
|
interface SharedContext {
|
|
5
5
|
assign?: 'global' | 'local';
|
|
6
|
+
merge?: boolean;
|
|
6
7
|
setup: (cxt: PageCtx) => any;
|
|
7
8
|
}
|
|
8
9
|
export declare function defineSharedContext(shared: SharedContext): SharedContext;
|
|
@@ -50,7 +50,8 @@ export default defineFlowPlugin(async (flow) => {
|
|
|
50
50
|
const dPages = await page.page.dynamic.method({
|
|
51
51
|
locale: page.locale,
|
|
52
52
|
utils: Object.assign({ getLocale: () => page.locale }, flow.app.utils),
|
|
53
|
-
chunks: {}
|
|
53
|
+
chunks: {},
|
|
54
|
+
page: {}
|
|
54
55
|
});
|
|
55
56
|
dPages.forEach((dPage) => {
|
|
56
57
|
const _path = joinURL(page.path.replace("/**", ""), dPage.url);
|
|
@@ -69,7 +70,8 @@ export default defineFlowPlugin(async (flow) => {
|
|
|
69
70
|
return {};
|
|
70
71
|
const _contexts = await Promise.all(entries.map(async ([key, method]) => {
|
|
71
72
|
const data = await method.setup(ctx);
|
|
72
|
-
|
|
73
|
+
const obj = method.merge ? { ...data } : { [key]: data };
|
|
74
|
+
return obj;
|
|
73
75
|
}));
|
|
74
76
|
return _contexts.reduce((acc, curr) => {
|
|
75
77
|
return {
|
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.73",
|
|
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.73",
|
|
29
|
+
"@monkeyplus/flow-kit": "5.0.0-rc.73",
|
|
30
|
+
"@monkeyplus/flow-schema": "5.0.0-rc.73",
|
|
31
31
|
"@rollup/plugin-replace": "^4.0.0",
|
|
32
32
|
"@vueuse/head": "^0.7.6",
|
|
33
33
|
"c12": "^0.2.8",
|