@tramvai/module-render 2.79.5 → 2.79.7

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.
@@ -24,9 +24,7 @@ const getResourceUrl = (resource) => {
24
24
  if (isEmpty(resource.payload) || !isAbsoluteUrl(resource.payload)) {
25
25
  return undefined;
26
26
  }
27
- return resource.payload.startsWith('//')
28
- ? `https://${resource.payload.substr(2)}`
29
- : resource.payload;
27
+ return resource.payload.startsWith('//') ? `https:${resource.payload}` : resource.payload;
30
28
  };
31
29
  class ResourcesInliner {
32
30
  constructor({ resourcesRegistryCache, resourceInlineThreshold, logger }) {
@@ -86,7 +84,10 @@ class ResourcesInliner {
86
84
  }
87
85
  }
88
86
  catch (error) {
89
- this.log.warn({
87
+ // If the ASSETS_PREFIX variable does not exist,
88
+ // or static files weren't deployed yet, we can't get
89
+ // information about files.
90
+ this.log.debug({
90
91
  event: 'file-content-length-load-failed',
91
92
  url,
92
93
  error,
@@ -33,9 +33,7 @@ const getResourceUrl = (resource) => {
33
33
  if (isEmpty__default["default"](resource.payload) || !url.isAbsoluteUrl(resource.payload)) {
34
34
  return undefined;
35
35
  }
36
- return resource.payload.startsWith('//')
37
- ? `https://${resource.payload.substr(2)}`
38
- : resource.payload;
36
+ return resource.payload.startsWith('//') ? `https:${resource.payload}` : resource.payload;
39
37
  };
40
38
  class ResourcesInliner {
41
39
  constructor({ resourcesRegistryCache, resourceInlineThreshold, logger }) {
@@ -95,7 +93,10 @@ class ResourcesInliner {
95
93
  }
96
94
  }
97
95
  catch (error) {
98
- this.log.warn({
96
+ // If the ASSETS_PREFIX variable does not exist,
97
+ // or static files weren't deployed yet, we can't get
98
+ // information about files.
99
+ this.log.debug({
99
100
  event: 'file-content-length-load-failed',
100
101
  url,
101
102
  error,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-render",
3
- "version": "2.79.5",
3
+ "version": "2.79.7",
4
4
  "description": "",
5
5
  "browser": "lib/browser.js",
6
6
  "main": "lib/server.js",
@@ -25,13 +25,13 @@
25
25
  "@tinkoff/htmlpagebuilder": "0.5.7",
26
26
  "@tinkoff/layout-factory": "0.3.8",
27
27
  "@tinkoff/url": "0.8.6",
28
- "@tinkoff/user-agent": "0.4.200",
29
- "@tramvai/module-client-hints": "2.79.5",
30
- "@tramvai/module-router": "2.79.5",
31
- "@tramvai/react": "2.79.5",
28
+ "@tinkoff/user-agent": "0.4.202",
29
+ "@tramvai/module-client-hints": "2.79.7",
30
+ "@tramvai/module-router": "2.79.7",
31
+ "@tramvai/react": "2.79.7",
32
32
  "@tramvai/safe-strings": "0.5.8",
33
- "@tramvai/tokens-render": "2.79.5",
34
- "@tramvai/experiments": "2.79.5",
33
+ "@tramvai/tokens-render": "2.79.7",
34
+ "@tramvai/experiments": "2.79.7",
35
35
  "@types/loadable__server": "^5.12.6",
36
36
  "node-fetch": "^2.6.1"
37
37
  },
@@ -39,14 +39,14 @@
39
39
  "@tinkoff/dippy": "0.8.14",
40
40
  "@tinkoff/utils": "^2.1.2",
41
41
  "@tinkoff/react-hooks": "0.1.6",
42
- "@tramvai/cli": "2.79.5",
43
- "@tramvai/core": "2.79.5",
44
- "@tramvai/module-common": "2.79.5",
45
- "@tramvai/state": "2.79.5",
46
- "@tramvai/test-helpers": "2.79.5",
47
- "@tramvai/tokens-common": "2.79.5",
48
- "@tramvai/tokens-router": "2.79.5",
49
- "@tramvai/tokens-server-private": "2.79.5",
42
+ "@tramvai/cli": "2.79.7",
43
+ "@tramvai/core": "2.79.7",
44
+ "@tramvai/module-common": "2.79.7",
45
+ "@tramvai/state": "2.79.7",
46
+ "@tramvai/test-helpers": "2.79.7",
47
+ "@tramvai/tokens-common": "2.79.7",
48
+ "@tramvai/tokens-router": "2.79.7",
49
+ "@tramvai/tokens-server-private": "2.79.7",
50
50
  "express": "^4.17.1",
51
51
  "prop-types": "^15.6.2",
52
52
  "react": ">=16.14.0",