@monkeyplus/flow 4.0.0-beta.12 → 4.0.0-beta.14

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.cjs CHANGED
@@ -38,7 +38,7 @@ const fs__default$1 = /*#__PURE__*/_interopDefaultLegacy(fs$1);
38
38
  const chokidar__default = /*#__PURE__*/_interopDefaultLegacy(chokidar);
39
39
 
40
40
  const name = "@monkeyplus/flow";
41
- const version = "4.0.0-beta.12";
41
+ const version = "4.0.0-beta.14";
42
42
  const description = "Utils hapi";
43
43
  const author = "Andres Navarrete";
44
44
  const license = "MIT";
@@ -582,7 +582,7 @@ const useGenerator = {
582
582
  if (!virtualGenerate)
583
583
  injectAssets(_assets);
584
584
  const dirOutut = helpers.getPath(configs.outputDir ?? "build");
585
- const staticDirs = Object.keys(server.app.flow.generate.staticFolders).map((dir) => helpers.getPath(dir));
585
+ const staticDirs = [configs.staticDir].map((dir) => helpers.getPath(dir));
586
586
  const files = await getFlowPages();
587
587
  const pairFiles = R__namespace.toPairs(files);
588
588
  const ommit = ommitAssets;
@@ -783,7 +783,7 @@ const RunMethods = {
783
783
  }
784
784
  };
785
785
  const init = async () => {
786
- await registerPages(server);
786
+ await registerPages(server, config.pagesDir);
787
787
  const pages = server.app.flow.routes;
788
788
  for (const key in pages) {
789
789
  const page = pages[key];
package/dist/index.mjs CHANGED
@@ -12,7 +12,7 @@ import { createHooks } from 'hookable';
12
12
  import chokidar from 'chokidar';
13
13
 
14
14
  const name = "@monkeyplus/flow";
15
- const version = "4.0.0-beta.12";
15
+ const version = "4.0.0-beta.14";
16
16
  const description = "Utils hapi";
17
17
  const author = "Andres Navarrete";
18
18
  const license = "MIT";
@@ -556,7 +556,7 @@ const useGenerator = {
556
556
  if (!virtualGenerate)
557
557
  injectAssets(_assets);
558
558
  const dirOutut = helpers.getPath(configs.outputDir ?? "build");
559
- const staticDirs = Object.keys(server.app.flow.generate.staticFolders).map((dir) => helpers.getPath(dir));
559
+ const staticDirs = [configs.staticDir].map((dir) => helpers.getPath(dir));
560
560
  const files = await getFlowPages();
561
561
  const pairFiles = R.toPairs(files);
562
562
  const ommit = ommitAssets;
@@ -757,7 +757,7 @@ const RunMethods = {
757
757
  }
758
758
  };
759
759
  const init = async () => {
760
- await registerPages(server);
760
+ await registerPages(server, config.pagesDir);
761
761
  const pages = server.app.flow.routes;
762
762
  for (const key in pages) {
763
763
  const page = pages[key];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monkeyplus/flow",
3
- "version": "4.0.0-beta.12",
3
+ "version": "4.0.0-beta.14",
4
4
  "description": "Utils hapi",
5
5
  "author": "Andres Navarrete",
6
6
  "license": "MIT",
package/types/flow.d.ts CHANGED
@@ -34,6 +34,7 @@ export interface FlowOptions {
34
34
  dirTemplates?: string
35
35
  plugins: FlowOptionPlugins
36
36
  staticDir: string
37
+ pagesDir?: string
37
38
  hmr: {
38
39
  dirs: string[]
39
40
  extensions?: string[]
@@ -123,7 +124,6 @@ export namespace Flow {
123
124
  }
124
125
  export interface Configs extends FlowOptions {
125
126
  relativeTo: string
126
-
127
127
  locales: string[]
128
128
  defaultUbication: string
129
129
  defaultLanguage: string