@tramvai/module-render 2.64.0 → 2.65.9
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/server.es.js +5 -3
- package/lib/server.js +5 -3
- package/package.json +16 -16
package/lib/server.es.js
CHANGED
|
@@ -353,8 +353,8 @@ let fetchStats = async () => {
|
|
|
353
353
|
};
|
|
354
354
|
if (process.env.NODE_ENV === 'development') {
|
|
355
355
|
fetchStats = async () => {
|
|
356
|
-
const { modern: configModern, staticHost, staticPort,
|
|
357
|
-
const getUrl = (filename) => `http://${staticHost}:${staticPort}/${
|
|
356
|
+
const { modern: configModern, staticHost, staticPort, output } = appConfig;
|
|
357
|
+
const getUrl = (filename) => `http://${staticHost}:${staticPort}/${output.client}/${filename}`;
|
|
358
358
|
const request = await fetch(getUrl(configModern ? 'stats.modern.json' : 'stats.json'));
|
|
359
359
|
const stats = await request.json();
|
|
360
360
|
// static - популярная заглушка в env.development.js файлах, надо игнорировать, как было раньше
|
|
@@ -795,7 +795,9 @@ class ReactRenderServer {
|
|
|
795
795
|
pipe(htmlWritable);
|
|
796
796
|
},
|
|
797
797
|
onError(error) {
|
|
798
|
-
// error can be inside Suspense boundaries, this is not critical, continue rendering
|
|
798
|
+
// error can be inside Suspense boundaries, this is not critical, continue rendering.
|
|
799
|
+
// for criticall errors, this callback will be called with `onShellError`,
|
|
800
|
+
// so this is a best place to error logging
|
|
799
801
|
log.error({
|
|
800
802
|
event: 'streaming-render:error',
|
|
801
803
|
error,
|
package/lib/server.js
CHANGED
|
@@ -389,8 +389,8 @@ let fetchStats = async () => {
|
|
|
389
389
|
};
|
|
390
390
|
if (process.env.NODE_ENV === 'development') {
|
|
391
391
|
fetchStats = async () => {
|
|
392
|
-
const { modern: configModern, staticHost, staticPort,
|
|
393
|
-
const getUrl = (filename) => `http://${staticHost}:${staticPort}/${
|
|
392
|
+
const { modern: configModern, staticHost, staticPort, output } = appConfig;
|
|
393
|
+
const getUrl = (filename) => `http://${staticHost}:${staticPort}/${output.client}/${filename}`;
|
|
394
394
|
const request = await fetch__default["default"](getUrl(configModern ? 'stats.modern.json' : 'stats.json'));
|
|
395
395
|
const stats = await request.json();
|
|
396
396
|
// static - популярная заглушка в env.development.js файлах, надо игнорировать, как было раньше
|
|
@@ -831,7 +831,9 @@ class ReactRenderServer {
|
|
|
831
831
|
pipe(htmlWritable);
|
|
832
832
|
},
|
|
833
833
|
onError(error) {
|
|
834
|
-
// error can be inside Suspense boundaries, this is not critical, continue rendering
|
|
834
|
+
// error can be inside Suspense boundaries, this is not critical, continue rendering.
|
|
835
|
+
// for criticall errors, this callback will be called with `onShellError`,
|
|
836
|
+
// so this is a best place to error logging
|
|
835
837
|
log.error({
|
|
836
838
|
event: 'streaming-render:error',
|
|
837
839
|
error,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-render",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.65.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"browser": "lib/browser.js",
|
|
6
6
|
"main": "lib/server.js",
|
|
@@ -26,28 +26,28 @@
|
|
|
26
26
|
"@tinkoff/htmlpagebuilder": "0.5.5",
|
|
27
27
|
"@tinkoff/layout-factory": "0.3.6",
|
|
28
28
|
"@tinkoff/url": "0.8.4",
|
|
29
|
-
"@tinkoff/user-agent": "0.4.
|
|
30
|
-
"@tramvai/module-client-hints": "2.
|
|
31
|
-
"@tramvai/module-router": "2.
|
|
32
|
-
"@tramvai/react": "2.
|
|
29
|
+
"@tinkoff/user-agent": "0.4.166",
|
|
30
|
+
"@tramvai/module-client-hints": "2.65.9",
|
|
31
|
+
"@tramvai/module-router": "2.65.9",
|
|
32
|
+
"@tramvai/react": "2.65.9",
|
|
33
33
|
"@tramvai/safe-strings": "0.5.6",
|
|
34
|
-
"@tramvai/tokens-render": "2.
|
|
35
|
-
"@tramvai/experiments": "2.
|
|
34
|
+
"@tramvai/tokens-render": "2.65.9",
|
|
35
|
+
"@tramvai/experiments": "2.65.9",
|
|
36
36
|
"@types/loadable__server": "^5.12.6",
|
|
37
37
|
"node-fetch": "^2.6.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@tinkoff/dippy": "0.8.
|
|
40
|
+
"@tinkoff/dippy": "0.8.12",
|
|
41
41
|
"@tinkoff/utils": "^2.1.2",
|
|
42
42
|
"@tinkoff/react-hooks": "0.1.4",
|
|
43
|
-
"@tramvai/cli": "2.
|
|
44
|
-
"@tramvai/core": "2.
|
|
45
|
-
"@tramvai/module-common": "2.
|
|
46
|
-
"@tramvai/state": "2.
|
|
47
|
-
"@tramvai/test-helpers": "2.
|
|
48
|
-
"@tramvai/tokens-common": "2.
|
|
49
|
-
"@tramvai/tokens-router": "2.
|
|
50
|
-
"@tramvai/tokens-server-private": "2.
|
|
43
|
+
"@tramvai/cli": "2.65.9",
|
|
44
|
+
"@tramvai/core": "2.65.9",
|
|
45
|
+
"@tramvai/module-common": "2.65.9",
|
|
46
|
+
"@tramvai/state": "2.65.9",
|
|
47
|
+
"@tramvai/test-helpers": "2.65.9",
|
|
48
|
+
"@tramvai/tokens-common": "2.65.9",
|
|
49
|
+
"@tramvai/tokens-router": "2.65.9",
|
|
50
|
+
"@tramvai/tokens-server-private": "2.65.9",
|
|
51
51
|
"express": "^4.17.1",
|
|
52
52
|
"prop-types": "^15.6.2",
|
|
53
53
|
"react": ">=16.14.0",
|