@tramvai/module-common 1.57.1 → 1.60.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.
Files changed (2) hide show
  1. package/lib/index.browser.js +14 -3
  2. package/package.json +15 -14
@@ -6,7 +6,7 @@ import { CookieModule } from '@tramvai/module-cookie';
6
6
  export { COOKIE_MANAGER_TOKEN } from '@tramvai/module-cookie';
7
7
  import { LogModule } from '@tramvai/module-log';
8
8
  import { Hooks } from '@tinkoff/hook-runner';
9
- import { REQUEST_MANAGER_TOKEN, REQUEST, COMBINE_REDUCERS, STORE_TOKEN, RESPONSE_MANAGER_TOKEN, RESPONSE, ACTION_EXECUTION_TOKEN, LOGGER_TOKEN, PUBSUB_FACTORY_TOKEN, PUBSUB_TOKEN, ROOT_PUBSUB_TOKEN, ACTION_REGISTRY_TOKEN, ACTION_CONDITIONALS, CONTEXT_TOKEN, ACTION_PAGE_RUNNER_TOKEN, DISPATCHER_TOKEN, DISPATCHER_CONTEXT_TOKEN, STORE_MIDDLEWARE, CREATE_CACHE_TOKEN, CLEAR_CACHE_TOKEN, REGISTER_CLEAR_CACHE_TOKEN, HOOK_TOKEN, COMPONENT_REGISTRY_TOKEN, BUNDLE_MANAGER_TOKEN, ADDITIONAL_BUNDLE_TOKEN } from '@tramvai/tokens-common';
9
+ import { REQUEST_MANAGER_TOKEN, REQUEST, COMBINE_REDUCERS, STORE_TOKEN, RESPONSE_MANAGER_TOKEN, RESPONSE, ACTION_EXECUTION_TOKEN, LOGGER_TOKEN, PUBSUB_FACTORY_TOKEN, PUBSUB_TOKEN, ROOT_PUBSUB_TOKEN, ACTION_REGISTRY_TOKEN, ACTION_CONDITIONALS, CONTEXT_TOKEN, ACTION_PAGE_RUNNER_TOKEN, DISPATCHER_TOKEN, DISPATCHER_CONTEXT_TOKEN, STORE_MIDDLEWARE, CREATE_CACHE_TOKEN, CLEAR_CACHE_TOKEN, REGISTER_CLEAR_CACHE_TOKEN, HOOK_TOKEN, COMPONENT_REGISTRY_TOKEN, BUNDLE_MANAGER_TOKEN, ADDITIONAL_BUNDLE_TOKEN, INITIAL_APP_STATE_TOKEN as INITIAL_APP_STATE_TOKEN$1 } from '@tramvai/tokens-common';
10
10
  export * from '@tramvai/tokens-common';
11
11
  import { fileSystemPagesEnabled, getAllFileSystemPages, isFileSystemPageComponent } from '@tramvai/experiments';
12
12
  import pathOr from '@tinkoff/utils/object/pathOr';
@@ -28,7 +28,7 @@ import toArray from '@tinkoff/utils/array/toArray';
28
28
  import LRU from 'lru-cache';
29
29
  import React from 'react';
30
30
  import { EXTEND_RENDER } from '@tramvai/tokens-render';
31
- import { CHILD_APP_INTERNAL_ROOT_DI_BORROW_TOKEN, commandLineListTokens as commandLineListTokens$1 } from '@tramvai/tokens-child-app';
31
+ import { CHILD_APP_COMMON_INITIAL_STATE_TOKEN, CHILD_APP_INTERNAL_CONFIG_TOKEN, CHILD_APP_INTERNAL_ROOT_DI_BORROW_TOKEN, commandLineListTokens as commandLineListTokens$1 } from '@tramvai/tokens-child-app';
32
32
 
33
33
  const FS_PAGES_DEFAULT_BUNDLE = '__default';
34
34
  class BundleManager {
@@ -1036,7 +1036,18 @@ CommonModule = __decorate([
1036
1036
  })
1037
1037
  ], CommonModule);
1038
1038
 
1039
- const providers = [];
1039
+ const providers = [
1040
+ provide({
1041
+ provide: INITIAL_APP_STATE_TOKEN$1,
1042
+ useFactory: ({ commonState, config }) => {
1043
+ return commonState[`${config.key}`];
1044
+ },
1045
+ deps: {
1046
+ commonState: CHILD_APP_COMMON_INITIAL_STATE_TOKEN,
1047
+ config: CHILD_APP_INTERNAL_CONFIG_TOKEN,
1048
+ },
1049
+ }),
1050
+ ];
1040
1051
 
1041
1052
  const stateProviders = [
1042
1053
  provide({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-common",
3
- "version": "1.57.1",
3
+ "version": "1.60.1",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -13,6 +13,7 @@
13
13
  "./lib/cache/serverProviders.js": "./lib/cache/clientProviders.js",
14
14
  "./lib/index.es.js": "./lib/index.browser.js",
15
15
  "./lib/providers/serverProviders.js": "./lib/providers/clientProviders.js",
16
+ "./lib/child-app/serverProviders.js": "./lib/child-app/clientProviders.js",
16
17
  "./lib/requestManager/RequestManagerModule.js": "./lib/requestManager/RequestManagerModule.browser.js",
17
18
  "./lib/responseManager/ResponseManagerModule.js": "./lib/responseManager/ResponseManagerModule.browser.js"
18
19
  },
@@ -30,24 +31,24 @@
30
31
  "@tinkoff/errors": "0.2.18",
31
32
  "@tinkoff/pubsub": "0.4.23",
32
33
  "@tinkoff/url": "0.7.37",
33
- "@tramvai/module-cookie": "1.57.1",
34
- "@tramvai/module-environment": "1.57.1",
35
- "@tramvai/module-log": "1.57.1",
36
- "@tramvai/tokens-child-app": "1.57.1",
37
- "@tramvai/tokens-common": "1.57.1",
38
- "@tramvai/tokens-render": "1.57.1",
39
- "@tramvai/experiments": "1.57.1",
34
+ "@tramvai/module-cookie": "1.60.1",
35
+ "@tramvai/module-environment": "1.60.1",
36
+ "@tramvai/module-log": "1.60.1",
37
+ "@tramvai/tokens-child-app": "1.60.1",
38
+ "@tramvai/tokens-common": "1.60.1",
39
+ "@tramvai/tokens-render": "1.60.1",
40
+ "@tramvai/experiments": "1.60.1",
40
41
  "@tinkoff/hook-runner": "0.3.21",
41
42
  "lru-cache": "^6.0.0"
42
43
  },
43
44
  "peerDependencies": {
44
45
  "@tinkoff/utils": "^2.1.2",
45
- "@tramvai/cli": "1.57.1",
46
- "@tramvai/core": "1.57.1",
47
- "@tramvai/papi": "1.57.1",
48
- "@tramvai/state": "1.57.1",
49
- "@tramvai/tokens-metrics": "1.57.1",
50
- "@tramvai/tokens-server": "1.57.1",
46
+ "@tramvai/cli": "1.60.1",
47
+ "@tramvai/core": "1.60.1",
48
+ "@tramvai/papi": "1.60.1",
49
+ "@tramvai/state": "1.60.1",
50
+ "@tramvai/tokens-metrics": "1.60.1",
51
+ "@tramvai/tokens-server": "1.60.1",
51
52
  "@tinkoff/dippy": "0.7.38",
52
53
  "react": ">=16.8.0",
53
54
  "tslib": "^2.0.3"