@tramvai/module-common 2.97.2 → 2.98.2

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.
@@ -1,9 +1,10 @@
1
1
  import eachObj from '@tinkoff/utils/object/each';
2
2
  import isObject from '@tinkoff/utils/is/object';
3
3
  import isArray from '@tinkoff/utils/is/array';
4
+ import identity from '@tinkoff/utils/function/identity';
4
5
  import { createBundle } from '@tramvai/core';
5
6
  import { resolveLazyComponent, __lazyErrorHandler } from '@tramvai/react';
6
- import { fileSystemPagesEnabled, getAllFileSystemPages, getAllFileSystemLayouts, getAllFileSystemErrorBoundaries, isFileSystemPageComponent, fileSystemPageToLayoutKey, fileSystemPageToErrorBoundaryKey } from '@tramvai/experiments';
7
+ import { fileSystemPagesEnabled, getAllFileSystemPages, getAllFileSystemLayouts, getAllFileSystemErrorBoundaries, getAllFileSystemWildcards, isFileSystemPageComponent, fileSystemPageToLayoutKey, fileSystemPageToErrorBoundaryKey } from '@tramvai/experiments';
7
8
 
8
9
  const FS_PAGES_DEFAULT_BUNDLE = '__default';
9
10
  class BundleManager {
@@ -17,6 +18,7 @@ class BundleManager {
17
18
  const components = getAllFileSystemPages();
18
19
  const layouts = getAllFileSystemLayouts();
19
20
  const errorBoundaries = getAllFileSystemErrorBoundaries();
21
+ const wildcards = getAllFileSystemWildcards();
20
22
  const getComponentsFor = (mapping, getKey) => Object.keys(mapping).reduce((result, key) => {
21
23
  // eslint-disable-next-line no-param-reassign
22
24
  result[getKey(key)] = mapping[key];
@@ -27,6 +29,7 @@ class BundleManager {
27
29
  components: {
28
30
  ...getComponentsFor(layouts, fileSystemPageToLayoutKey),
29
31
  ...getComponentsFor(errorBoundaries, fileSystemPageToErrorBoundaryKey),
32
+ ...getComponentsFor(wildcards, identity),
30
33
  ...components,
31
34
  },
32
35
  });
@@ -1,9 +1,10 @@
1
1
  import eachObj from '@tinkoff/utils/object/each';
2
2
  import isObject from '@tinkoff/utils/is/object';
3
3
  import isArray from '@tinkoff/utils/is/array';
4
+ import identity from '@tinkoff/utils/function/identity';
4
5
  import { createBundle } from '@tramvai/core';
5
6
  import { resolveLazyComponent, __lazyErrorHandler } from '@tramvai/react';
6
- import { fileSystemPagesEnabled, getAllFileSystemPages, getAllFileSystemLayouts, getAllFileSystemErrorBoundaries, isFileSystemPageComponent, fileSystemPageToLayoutKey, fileSystemPageToErrorBoundaryKey } from '@tramvai/experiments';
7
+ import { fileSystemPagesEnabled, getAllFileSystemPages, getAllFileSystemLayouts, getAllFileSystemErrorBoundaries, getAllFileSystemWildcards, isFileSystemPageComponent, fileSystemPageToLayoutKey, fileSystemPageToErrorBoundaryKey } from '@tramvai/experiments';
7
8
 
8
9
  const FS_PAGES_DEFAULT_BUNDLE = '__default';
9
10
  class BundleManager {
@@ -17,6 +18,7 @@ class BundleManager {
17
18
  const components = getAllFileSystemPages();
18
19
  const layouts = getAllFileSystemLayouts();
19
20
  const errorBoundaries = getAllFileSystemErrorBoundaries();
21
+ const wildcards = getAllFileSystemWildcards();
20
22
  const getComponentsFor = (mapping, getKey) => Object.keys(mapping).reduce((result, key) => {
21
23
  // eslint-disable-next-line no-param-reassign
22
24
  result[getKey(key)] = mapping[key];
@@ -27,6 +29,7 @@ class BundleManager {
27
29
  components: {
28
30
  ...getComponentsFor(layouts, fileSystemPageToLayoutKey),
29
31
  ...getComponentsFor(errorBoundaries, fileSystemPageToErrorBoundaryKey),
32
+ ...getComponentsFor(wildcards, identity),
30
33
  ...components,
31
34
  },
32
35
  });
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var eachObj = require('@tinkoff/utils/object/each');
6
6
  var isObject = require('@tinkoff/utils/is/object');
7
7
  var isArray = require('@tinkoff/utils/is/array');
8
+ var identity = require('@tinkoff/utils/function/identity');
8
9
  var core = require('@tramvai/core');
9
10
  var react = require('@tramvai/react');
10
11
  var experiments = require('@tramvai/experiments');
@@ -14,6 +15,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
14
15
  var eachObj__default = /*#__PURE__*/_interopDefaultLegacy(eachObj);
15
16
  var isObject__default = /*#__PURE__*/_interopDefaultLegacy(isObject);
16
17
  var isArray__default = /*#__PURE__*/_interopDefaultLegacy(isArray);
18
+ var identity__default = /*#__PURE__*/_interopDefaultLegacy(identity);
17
19
 
18
20
  const FS_PAGES_DEFAULT_BUNDLE = '__default';
19
21
  class BundleManager {
@@ -27,6 +29,7 @@ class BundleManager {
27
29
  const components = experiments.getAllFileSystemPages();
28
30
  const layouts = experiments.getAllFileSystemLayouts();
29
31
  const errorBoundaries = experiments.getAllFileSystemErrorBoundaries();
32
+ const wildcards = experiments.getAllFileSystemWildcards();
30
33
  const getComponentsFor = (mapping, getKey) => Object.keys(mapping).reduce((result, key) => {
31
34
  // eslint-disable-next-line no-param-reassign
32
35
  result[getKey(key)] = mapping[key];
@@ -37,6 +40,7 @@ class BundleManager {
37
40
  components: {
38
41
  ...getComponentsFor(layouts, experiments.fileSystemPageToLayoutKey),
39
42
  ...getComponentsFor(errorBoundaries, experiments.fileSystemPageToErrorBoundaryKey),
43
+ ...getComponentsFor(wildcards, identity__default["default"]),
40
44
  ...components,
41
45
  },
42
46
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-common",
3
- "version": "2.97.2",
3
+ "version": "2.98.2",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -32,28 +32,28 @@
32
32
  "@tinkoff/lru-cache-nano": "^7.8.1",
33
33
  "@tinkoff/pubsub": "0.5.7",
34
34
  "@tinkoff/url": "0.8.6",
35
- "@tramvai/experiments": "2.97.2",
36
- "@tramvai/module-cookie": "2.97.2",
37
- "@tramvai/module-environment": "2.97.2",
38
- "@tramvai/module-log": "2.97.2",
39
- "@tramvai/tokens-child-app": "2.97.2",
40
- "@tramvai/tokens-core-private": "2.97.2",
41
- "@tramvai/tokens-common": "2.97.2",
42
- "@tramvai/tokens-render": "2.97.2",
43
- "@tramvai/tokens-server-private": "2.97.2",
44
- "@tramvai/types-actions-state-context": "2.97.2",
35
+ "@tramvai/experiments": "2.98.2",
36
+ "@tramvai/module-cookie": "2.98.2",
37
+ "@tramvai/module-environment": "2.98.2",
38
+ "@tramvai/module-log": "2.98.2",
39
+ "@tramvai/tokens-child-app": "2.98.2",
40
+ "@tramvai/tokens-core-private": "2.98.2",
41
+ "@tramvai/tokens-common": "2.98.2",
42
+ "@tramvai/tokens-render": "2.98.2",
43
+ "@tramvai/tokens-server-private": "2.98.2",
44
+ "@tramvai/types-actions-state-context": "2.98.2",
45
45
  "hoist-non-react-statics": "^3.3.1",
46
46
  "node-abort-controller": "^3.0.1"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@tinkoff/dippy": "0.8.15",
50
50
  "@tinkoff/utils": "^2.1.2",
51
- "@tramvai/cli": "2.97.2",
52
- "@tramvai/core": "2.97.2",
53
- "@tramvai/papi": "2.97.2",
54
- "@tramvai/react": "2.97.2",
55
- "@tramvai/state": "2.97.2",
56
- "@tramvai/tokens-server": "2.97.2",
51
+ "@tramvai/cli": "2.98.2",
52
+ "@tramvai/core": "2.98.2",
53
+ "@tramvai/papi": "2.98.2",
54
+ "@tramvai/react": "2.98.2",
55
+ "@tramvai/state": "2.98.2",
56
+ "@tramvai/tokens-server": "2.98.2",
57
57
  "react": ">=16.14.0",
58
58
  "tslib": "^2.4.0"
59
59
  },