@monkeyplus/flow 5.0.0-rc.109 → 5.0.0-rc.110

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.
@@ -22,7 +22,7 @@ export default eventHandler(async (event) => {
22
22
  const url = event.req.url?.split("?")[0];
23
23
  const flow = await getFlowRenderer();
24
24
  if (url.includes("_urls")) {
25
- const urls = await flow.app.utils.getUrls();
25
+ const urls = await flow.app.utils.getUrls(false, true);
26
26
  return urls;
27
27
  }
28
28
  const scripts = { head: [], bodyStart: [], bodyEnd: [] };
package/dist/index.mjs CHANGED
@@ -24,7 +24,7 @@ import replace from '@rollup/plugin-replace';
24
24
  import { resolveTSConfig } from 'pkg-types';
25
25
  import fse from 'fs-extra';
26
26
 
27
- const version = "5.0.0-rc.109";
27
+ const version = "5.0.0-rc.110";
28
28
 
29
29
  let _distDir = dirname(fileURLToPath(import.meta.url));
30
30
  if (_distDir.match(/(chunks|shared)$/))
@@ -19,7 +19,14 @@ const buildPages = (page) => (location, language, _locales) => {
19
19
  return {
20
20
  name,
21
21
  url: path,
22
- context: { page: localePage, locale: _locale, path, view: page.view, name: page.name }
22
+ context: {
23
+ page: localePage,
24
+ locale: _locale,
25
+ path,
26
+ view: page.view,
27
+ name: page.name,
28
+ noPublish: page.noPublish
29
+ }
23
30
  };
24
31
  });
25
32
  };
@@ -59,9 +59,10 @@ export default defineFlowPlugin(async (flow) => {
59
59
  }
60
60
  return path || "/404";
61
61
  }
62
- async function getUrls(withLocale = false) {
62
+ async function getUrls(withLocale = false, omitNoPublish = false) {
63
63
  const urls = [];
64
- for (const page of allPages) {
64
+ const _allPages = allPages.filter((p) => omitNoPublish ? !p.noPublish : true);
65
+ for (const page of _allPages) {
65
66
  if ((page.path.includes("/:") || page.path.includes("/**")) && page.page.dynamic) {
66
67
  const dPages = await page.page.dynamic.method({
67
68
  locale: page.locale,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monkeyplus/flow",
3
- "version": "5.0.0-rc.109",
3
+ "version": "5.0.0-rc.110",
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.109",
29
- "@monkeyplus/flow-kit": "5.0.0-rc.109",
30
- "@monkeyplus/flow-schema": "5.0.0-rc.109",
28
+ "@monkeyplus/flow-cli": "5.0.0-rc.110",
29
+ "@monkeyplus/flow-kit": "5.0.0-rc.110",
30
+ "@monkeyplus/flow-schema": "5.0.0-rc.110",
31
31
  "@rollup/plugin-replace": "^4.0.0",
32
32
  "@vueuse/head": "^1.0.16",
33
33
  "c12": "^1.0.1",