@tramvai/module-render 1.103.0 → 1.105.3
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/lib/browser.js +1 -1
- package/lib/server.es.js +2 -2
- package/lib/server.js +2 -2
- package/package.json +19 -19
package/lib/browser.js
CHANGED
|
@@ -65,7 +65,7 @@ const Root = ({ pageService }) => {
|
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
function renderReact({ pageService, di, initialState }, context) {
|
|
68
|
-
return (jsx(Provider, Object.assign({ context: context, serverState: initialState
|
|
68
|
+
return (jsx(Provider, Object.assign({ context: context, serverState: initialState && context.getState() }, { children: jsx(DIContext.Provider, Object.assign({ value: di }, { children: jsx(Root, { pageService: pageService }, void 0) }), void 0) }), void 0));
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
let hydrateRoot;
|
package/lib/server.es.js
CHANGED
|
@@ -403,7 +403,7 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
403
403
|
return Promise.resolve(stats);
|
|
404
404
|
};
|
|
405
405
|
}
|
|
406
|
-
const fetchWebpackStats = async ({ modern, }) => {
|
|
406
|
+
const fetchWebpackStats = async ({ modern, } = {}) => {
|
|
407
407
|
return fetchStats(modern);
|
|
408
408
|
};
|
|
409
409
|
|
|
@@ -667,7 +667,7 @@ const Root = ({ pageService }) => {
|
|
|
667
667
|
};
|
|
668
668
|
|
|
669
669
|
function renderReact({ pageService, di, initialState }, context) {
|
|
670
|
-
return (jsx(Provider, Object.assign({ context: context, serverState: initialState
|
|
670
|
+
return (jsx(Provider, Object.assign({ context: context, serverState: initialState && context.getState() }, { children: jsx(DIContext.Provider, Object.assign({ value: di }, { children: jsx(Root, { pageService: pageService }, void 0) }), void 0) }), void 0));
|
|
671
671
|
}
|
|
672
672
|
|
|
673
673
|
class ReactRenderServer {
|
package/lib/server.js
CHANGED
|
@@ -439,7 +439,7 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
439
439
|
return Promise.resolve(stats);
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
|
-
const fetchWebpackStats = async ({ modern, }) => {
|
|
442
|
+
const fetchWebpackStats = async ({ modern, } = {}) => {
|
|
443
443
|
return fetchStats(modern);
|
|
444
444
|
};
|
|
445
445
|
|
|
@@ -703,7 +703,7 @@ const Root = ({ pageService }) => {
|
|
|
703
703
|
};
|
|
704
704
|
|
|
705
705
|
function renderReact({ pageService, di, initialState }, context) {
|
|
706
|
-
return (jsxRuntime.jsx(state.Provider, Object.assign({ context: context, serverState: initialState
|
|
706
|
+
return (jsxRuntime.jsx(state.Provider, Object.assign({ context: context, serverState: initialState && context.getState() }, { children: jsxRuntime.jsx(react$1.DIContext.Provider, Object.assign({ value: di }, { children: jsxRuntime.jsx(Root, { pageService: pageService }, void 0) }), void 0) }), void 0));
|
|
707
707
|
}
|
|
708
708
|
|
|
709
709
|
class ReactRenderServer {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-render",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.105.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"browser": "lib/browser.js",
|
|
6
6
|
"main": "lib/server.js",
|
|
@@ -22,34 +22,34 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@loadable/server": "^5.15.0",
|
|
24
24
|
"@tinkoff/htmlpagebuilder": "0.4.23",
|
|
25
|
-
"@tinkoff/layout-factory": "0.2.
|
|
25
|
+
"@tinkoff/layout-factory": "0.2.30",
|
|
26
26
|
"@tinkoff/url": "0.7.38",
|
|
27
|
-
"@tinkoff/user-agent": "0.3.
|
|
28
|
-
"@tramvai/module-client-hints": "1.
|
|
29
|
-
"@tramvai/module-router": "1.
|
|
30
|
-
"@tramvai/react": "1.
|
|
27
|
+
"@tinkoff/user-agent": "0.3.357",
|
|
28
|
+
"@tramvai/module-client-hints": "1.105.3",
|
|
29
|
+
"@tramvai/module-router": "1.105.3",
|
|
30
|
+
"@tramvai/react": "1.105.3",
|
|
31
31
|
"@tramvai/safe-strings": "0.4.4",
|
|
32
|
-
"@tramvai/tokens-render": "1.
|
|
33
|
-
"@tramvai/experiments": "1.
|
|
32
|
+
"@tramvai/tokens-render": "1.105.3",
|
|
33
|
+
"@tramvai/experiments": "1.105.3",
|
|
34
34
|
"@types/loadable__server": "^5.12.6",
|
|
35
35
|
"node-fetch": "^2.6.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@tinkoff/dippy": "0.7.41",
|
|
39
39
|
"@tinkoff/utils": "^2.1.2",
|
|
40
|
-
"@tinkoff/react-hooks": "0.0.
|
|
41
|
-
"@tramvai/cli": "1.
|
|
42
|
-
"@tramvai/core": "1.
|
|
43
|
-
"@tramvai/module-common": "1.
|
|
44
|
-
"@tramvai/state": "1.
|
|
45
|
-
"@tramvai/test-helpers": "1.
|
|
46
|
-
"@tramvai/tokens-common": "1.
|
|
47
|
-
"@tramvai/tokens-router": "1.
|
|
48
|
-
"@tramvai/tokens-server-private": "1.
|
|
40
|
+
"@tinkoff/react-hooks": "0.0.26",
|
|
41
|
+
"@tramvai/cli": "1.105.3",
|
|
42
|
+
"@tramvai/core": "1.105.3",
|
|
43
|
+
"@tramvai/module-common": "1.105.3",
|
|
44
|
+
"@tramvai/state": "1.105.3",
|
|
45
|
+
"@tramvai/test-helpers": "1.105.3",
|
|
46
|
+
"@tramvai/tokens-common": "1.105.3",
|
|
47
|
+
"@tramvai/tokens-router": "1.105.3",
|
|
48
|
+
"@tramvai/tokens-server-private": "1.105.3",
|
|
49
49
|
"express": "^4.17.1",
|
|
50
50
|
"prop-types": "^15.6.2",
|
|
51
|
-
"react": ">=16.
|
|
52
|
-
"react-dom": ">=16.
|
|
51
|
+
"react": ">=16.14.0",
|
|
52
|
+
"react-dom": ">=16.14.0",
|
|
53
53
|
"tslib": "^2.0.3"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {},
|