@monkeyplus/flow 5.0.0-rc.73 → 5.0.0-rc.74

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.73";
32
+ const version = "5.0.0-rc.74";
33
33
 
34
34
  let _distDir = dirname(fileURLToPath(import.meta.url));
35
35
  if (_distDir.endsWith("chunks"))
@@ -1,6 +1,9 @@
1
1
  import { joinURL, withTrailingSlash } from "ufo";
2
- const buildPages = (page) => (location, language) => {
3
- const locales = Object.entries(page.locales);
2
+ const buildPages = (page) => (location, language, _locales) => {
3
+ const locales = _locales.map((key) => {
4
+ const _page = page.locales[key];
5
+ return [key, _page];
6
+ }).filter((el) => !!el[1]);
4
7
  return locales.map(([locale, localePage]) => {
5
8
  const [_language, _location] = locale.split("-");
6
9
  const name = joinURL("/", _location, _language, page.name);
@@ -16,7 +16,7 @@ export default defineFlowPlugin(async (flow) => {
16
16
  name,
17
17
  ...page
18
18
  });
19
- const _pages2 = getPages(app.locale.location, app.locale.language);
19
+ const _pages2 = getPages(app.locale.location, app.locale.language, app.locale.locales);
20
20
  _pages2.forEach((page2) => {
21
21
  flow.router.byUrl.insert(page2.url, page2.context);
22
22
  flow.router.byName.insert(page2.name, page2.context);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monkeyplus/flow",
3
- "version": "5.0.0-rc.73",
3
+ "version": "5.0.0-rc.74",
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.73",
29
- "@monkeyplus/flow-kit": "5.0.0-rc.73",
30
- "@monkeyplus/flow-schema": "5.0.0-rc.73",
28
+ "@monkeyplus/flow-cli": "5.0.0-rc.74",
29
+ "@monkeyplus/flow-kit": "5.0.0-rc.74",
30
+ "@monkeyplus/flow-schema": "5.0.0-rc.74",
31
31
  "@rollup/plugin-replace": "^4.0.0",
32
32
  "@vueuse/head": "^0.7.6",
33
33
  "c12": "^0.2.8",