@websolutespa/bom-mixer-store 1.4.0 → 1.4.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @websolutespa/bom-mixer-store
2
2
 
3
+ ## 1.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Modified: MockPageService
8
+ - Updated dependencies
9
+ - @websolutespa/bom-core@0.6.3
10
+
3
11
  ## 1.4.0
4
12
 
5
13
  ### Minor Changes
package/dist/index.js CHANGED
@@ -484,9 +484,9 @@ var KNOWN_COLLECTIONS = [
484
484
  "locale",
485
485
  "market",
486
486
  "menu",
487
- "template",
488
487
  "redirect",
489
488
  "route",
489
+ "template",
490
490
  ...STATIC_COLLECTIONS
491
491
  ];
492
492
  var COLLECTIONS = [...ENV_COLLECTIONS, ...KNOWN_COLLECTIONS];
@@ -1100,11 +1100,11 @@ function decorateNav__(item, routes) {
1100
1100
  if (route) {
1101
1101
  decorated.nav = {
1102
1102
  type: "page",
1103
- id: route.id,
1103
+ id: route.page,
1104
1104
  href: route.id,
1105
1105
  title: route.title,
1106
- page: nav.page.value,
1107
- schema: nav.page.relationTo
1106
+ page: route.page,
1107
+ schema: route.schema
1108
1108
  };
1109
1109
  }
1110
1110
  return decorated;
@@ -1165,7 +1165,9 @@ async function getMockStore_() {
1165
1165
  }
1166
1166
  async function getMockStore() {
1167
1167
  return fromCache(async () => {
1168
- console.log("getMockStore");
1168
+ if (!import_bom_core6.isDevelopment) {
1169
+ console.warn("getMockStore");
1170
+ }
1169
1171
  const store = await getMockStore_();
1170
1172
  return store;
1171
1173
  }, import_bom_core6.isDevelopment ? void 0 : "STORE_MOCK_");
package/dist/index.mjs CHANGED
@@ -394,9 +394,9 @@ var KNOWN_COLLECTIONS = [
394
394
  "locale",
395
395
  "market",
396
396
  "menu",
397
- "template",
398
397
  "redirect",
399
398
  "route",
399
+ "template",
400
400
  ...STATIC_COLLECTIONS
401
401
  ];
402
402
  var COLLECTIONS = [...ENV_COLLECTIONS, ...KNOWN_COLLECTIONS];
@@ -1010,11 +1010,11 @@ function decorateNav__(item, routes) {
1010
1010
  if (route) {
1011
1011
  decorated.nav = {
1012
1012
  type: "page",
1013
- id: route.id,
1013
+ id: route.page,
1014
1014
  href: route.id,
1015
1015
  title: route.title,
1016
- page: nav.page.value,
1017
- schema: nav.page.relationTo
1016
+ page: route.page,
1017
+ schema: route.schema
1018
1018
  };
1019
1019
  }
1020
1020
  return decorated;
@@ -1075,7 +1075,9 @@ async function getMockStore_() {
1075
1075
  }
1076
1076
  async function getMockStore() {
1077
1077
  return fromCache(async () => {
1078
- console.log("getMockStore");
1078
+ if (!isDevelopment) {
1079
+ console.warn("getMockStore");
1080
+ }
1079
1081
  const store = await getMockStore_();
1080
1082
  return store;
1081
1083
  }, isDevelopment ? void 0 : "STORE_MOCK_");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@websolutespa/bom-mixer-store",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Mixer Store module of the BOM Repository",
5
5
  "keywords": [
6
6
  "bom",
@@ -141,11 +141,11 @@ function decorateNav__<T>(item: IUndecoratedNav<T>, routes: IRoute[]): IDecorate
141
141
  if (route) {
142
142
  decorated.nav = {
143
143
  type: 'page',
144
- id: route.id,
144
+ id: route.page,
145
145
  href: route.id,
146
146
  title: route.title,
147
- page: (nav.page.value as unknown as IEquatable),
148
- schema: nav.page.relationTo,
147
+ page: route.page,
148
+ schema: route.schema,
149
149
  };
150
150
  }
151
151
  return decorated as IDecoratedNav<T>;
@@ -67,7 +67,9 @@ async function getMockStore_<T extends IStore = IStore>(): Promise<T> {
67
67
 
68
68
  export async function getMockStore<T extends IStore = IStore>(): Promise<T> {
69
69
  return fromCache<T>(async () => {
70
- console.log('getMockStore');
70
+ if (!isDevelopment) {
71
+ console.warn('getMockStore');
72
+ }
71
73
  const store = await getMockStore_<T>();
72
74
  return store;
73
75
  }, isDevelopment ? undefined : 'STORE_MOCK_');
@@ -40,9 +40,9 @@ export const KNOWN_COLLECTIONS: string[] = [
40
40
  'locale',
41
41
  'market',
42
42
  'menu',
43
- 'template',
44
43
  'redirect',
45
44
  'route',
45
+ 'template',
46
46
  ...STATIC_COLLECTIONS,
47
47
  ];
48
48
  export const COLLECTIONS = [...ENV_COLLECTIONS, ...KNOWN_COLLECTIONS];