@monkeyplus/flow 6.0.91 → 6.0.93
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/package.json +1 -1
- package/server/plugins/00.lifecycle.d.ts +1 -0
- package/server/plugins/00.lifecycle.mjs +1 -0
- package/src/public/nitro.mjs +16 -0
- package/src/runtime/config.d.ts +2 -0
- package/src/runtime/config.mjs +2 -1
- package/monkeyplus-flow-6.0.83.tgz +0 -0
- package/monkeyplus-flow-6.0.84.tgz +0 -0
- package/monkeyplus-flow-6.0.85.tgz +0 -0
- package/monkeyplus-flow-6.0.91.tgz +0 -0
package/package.json
CHANGED
package/src/public/nitro.mjs
CHANGED
|
@@ -48,6 +48,22 @@ export function createFlowNitroConfig(options = {}) {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
+
const serverDir = nitro2.options.output.serverDir;
|
|
52
|
+
if (serverDir && existsSync(serverDir)) {
|
|
53
|
+
const sourceNitro = resolve(projectRoot, "node_modules/.nitro");
|
|
54
|
+
const destNitro = resolve(serverDir, ".nitro");
|
|
55
|
+
if (existsSync(sourceNitro) && !destNitro.startsWith(sourceNitro)) {
|
|
56
|
+
await fsp.cp(sourceNitro, destNitro, { recursive: true });
|
|
57
|
+
}
|
|
58
|
+
const dirsToCopy = ["content", ...flowConfig.serverCopy || []];
|
|
59
|
+
for (const dirName of dirsToCopy) {
|
|
60
|
+
const sourceDir = resolve(projectRoot, dirName);
|
|
61
|
+
const destDir = resolve(serverDir, dirName);
|
|
62
|
+
if (existsSync(sourceDir)) {
|
|
63
|
+
await fsp.cp(sourceDir, destDir, { recursive: true });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
51
67
|
});
|
|
52
68
|
}
|
|
53
69
|
],
|
package/src/runtime/config.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export interface FlowConfig {
|
|
|
51
51
|
locale: FlowLocaleConfig;
|
|
52
52
|
images?: Partial<FlowImagesModuleOptions>;
|
|
53
53
|
server?: FlowServerConfig;
|
|
54
|
+
serverCopy?: string[];
|
|
54
55
|
siteUrl?: string;
|
|
55
56
|
nitro?: Record<string, unknown>;
|
|
56
57
|
netlify?: {
|
|
@@ -67,6 +68,7 @@ export type UserFlowConfig = Partial<FlowConfig> & Record<string, unknown> & {
|
|
|
67
68
|
images?: Partial<FlowImagesModuleOptions>;
|
|
68
69
|
cms?: Partial<NetlifyCmsModuleOptions>;
|
|
69
70
|
server?: FlowServerConfig;
|
|
71
|
+
serverCopy?: string[];
|
|
70
72
|
siteUrl?: string;
|
|
71
73
|
components?: Partial<ComponentOptions>;
|
|
72
74
|
autoImport?: Partial<AutoimportOptions>;
|
package/src/runtime/config.mjs
CHANGED
|
@@ -25,6 +25,7 @@ export function resolveFlowConfig(userFlowConfig = {}) {
|
|
|
25
25
|
prefixStrategy: userFlowConfig.locale?.prefixStrategy || "auto",
|
|
26
26
|
prefixFormat: userFlowConfig.locale?.prefixFormat || "compact"
|
|
27
27
|
},
|
|
28
|
-
server: userFlowConfig.server
|
|
28
|
+
server: userFlowConfig.server,
|
|
29
|
+
serverCopy: userFlowConfig.serverCopy || []
|
|
29
30
|
};
|
|
30
31
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|