@tramvai/module-render 2.64.0 → 2.66.0

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 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, build: { options: { outputClient }, }, } = appConfig;
357
- const getUrl = (filename) => `http://${staticHost}:${staticPort}/${outputClient}/${filename}`;
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, build: { options: { outputClient }, }, } = appConfig;
393
- const getUrl = (filename) => `http://${staticHost}:${staticPort}/${outputClient}/${filename}`;
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.64.0",
3
+ "version": "2.66.0",
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.152",
30
- "@tramvai/module-client-hints": "2.64.0",
31
- "@tramvai/module-router": "2.64.0",
32
- "@tramvai/react": "2.64.0",
29
+ "@tinkoff/user-agent": "0.4.167",
30
+ "@tramvai/module-client-hints": "2.66.0",
31
+ "@tramvai/module-router": "2.66.0",
32
+ "@tramvai/react": "2.66.0",
33
33
  "@tramvai/safe-strings": "0.5.6",
34
- "@tramvai/tokens-render": "2.64.0",
35
- "@tramvai/experiments": "2.64.0",
34
+ "@tramvai/tokens-render": "2.66.0",
35
+ "@tramvai/experiments": "2.66.0",
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.11",
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.64.0",
44
- "@tramvai/core": "2.64.0",
45
- "@tramvai/module-common": "2.64.0",
46
- "@tramvai/state": "2.64.0",
47
- "@tramvai/test-helpers": "2.64.0",
48
- "@tramvai/tokens-common": "2.64.0",
49
- "@tramvai/tokens-router": "2.64.0",
50
- "@tramvai/tokens-server-private": "2.64.0",
43
+ "@tramvai/cli": "2.66.0",
44
+ "@tramvai/core": "2.66.0",
45
+ "@tramvai/module-common": "2.66.0",
46
+ "@tramvai/state": "2.66.0",
47
+ "@tramvai/test-helpers": "2.66.0",
48
+ "@tramvai/tokens-common": "2.66.0",
49
+ "@tramvai/tokens-router": "2.66.0",
50
+ "@tramvai/tokens-server-private": "2.66.0",
51
51
  "express": "^4.17.1",
52
52
  "prop-types": "^15.6.2",
53
53
  "react": ">=16.14.0",