@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monkeyplus/flow",
3
- "version": "6.0.91",
3
+ "version": "6.0.93",
4
4
  "description": "@monkeyplus/flow package-first runtime with Vite, Nitro, Vue and a workspace playground.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -1,2 +1,3 @@
1
1
  declare const _default: any;
2
2
  export default _default;
3
+ import 'nitro/storage';
@@ -8,3 +8,4 @@ export default definePlugin((nitroApp) => {
8
8
  }
9
9
  });
10
10
  });
11
+ import "nitro/storage";
@@ -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
  ],
@@ -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>;
@@ -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