@monkeyplus/flow 5.0.0-rc.25 → 5.0.0-rc.27

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.25";
32
+ const version = "5.0.0-rc.27";
33
33
 
34
34
  let _distDir = dirname(fileURLToPath(import.meta.url));
35
35
  if (_distDir.endsWith("chunks"))
@@ -1326,6 +1326,7 @@ async function bundleVite(flow) {
1326
1326
  include: []
1327
1327
  },
1328
1328
  build: {
1329
+ ssr: true,
1329
1330
  rollupOptions: {
1330
1331
  output: { sanitizeFileName: sanitizeFilePath },
1331
1332
  input: resolve(flow.options.appDir, "entry")
@@ -46,17 +46,19 @@ export default defineFlowPlugin(async (flow) => {
46
46
  async function getUrls(withLocale = false) {
47
47
  const urls = [];
48
48
  for (const page of allPages) {
49
- if (!page.path.includes("/**")) {
50
- urls.push(withLocale ? { url: page.path, locale: page.locale.code, name: page.name } : page.path);
51
- } else {
49
+ if (page.path.includes("/**") && page.page.dynamic) {
52
50
  const dPages = await page.page.dynamic.method({
53
51
  locale: page.locale,
54
- utils: Object.assign({ getLocale: () => page.locale }, flow.app.utils)
52
+ utils: Object.assign({ getLocale: () => page.locale }, flow.app.utils),
53
+ chunks: {}
55
54
  });
56
55
  dPages.forEach((dPage) => {
57
56
  const _path = joinURL(page.path.replace("/**", ""), dPage.url);
58
57
  urls.push(withLocale ? { url: _path, locale: page.locale.code, name: joinURL(page.name, dPage.name) } : _path);
59
58
  });
59
+ } else {
60
+ const url = page.path.replaceAll("*", "");
61
+ urls.push(withLocale ? { url, locale: page.locale.code, name: page.name } : url);
60
62
  }
61
63
  }
62
64
  return urls.sort();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monkeyplus/flow",
3
- "version": "5.0.0-rc.25",
3
+ "version": "5.0.0-rc.27",
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.25",
29
- "@monkeyplus/flow-kit": "5.0.0-rc.25",
30
- "@monkeyplus/flow-schema": "5.0.0-rc.25",
28
+ "@monkeyplus/flow-cli": "5.0.0-rc.27",
29
+ "@monkeyplus/flow-kit": "5.0.0-rc.27",
30
+ "@monkeyplus/flow-schema": "5.0.0-rc.27",
31
31
  "@rollup/plugin-replace": "^4.0.0",
32
32
  "@vueuse/head": "^0.7.6",
33
33
  "c12": "^0.2.7",