@tramvai/module-server 4.41.111 → 4.41.123

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.
@@ -122,8 +122,9 @@ const webAppInitCommand = ({ app, logger, commandLineRunner, executionContextMan
122
122
  });
123
123
  }
124
124
  catch (err) {
125
- if (err.di) {
126
- const responseManager = err.di.get(RESPONSE_MANAGER_TOKEN);
125
+ const storage = asyncLocalStorage.getStore();
126
+ if (storage && storage.tramvaiRequestDi) {
127
+ const responseManager = storage.tramvaiRequestDi.get(RESPONSE_MANAGER_TOKEN);
127
128
  if (responseManager && !reply.sent) {
128
129
  reply.headers(responseManager.getHeaders());
129
130
  }
@@ -131,8 +131,9 @@ const webAppInitCommand = ({ app, logger, commandLineRunner, executionContextMan
131
131
  });
132
132
  }
133
133
  catch (err) {
134
- if (err.di) {
135
- const responseManager = err.di.get(tokensCommon.RESPONSE_MANAGER_TOKEN);
134
+ const storage = asyncLocalStorage.getStore();
135
+ if (storage && storage.tramvaiRequestDi) {
136
+ const responseManager = storage.tramvaiRequestDi.get(tokensCommon.RESPONSE_MANAGER_TOKEN);
136
137
  if (responseManager && !reply.sent) {
137
138
  reply.headers(responseManager.getHeaders());
138
139
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-server",
3
- "version": "4.41.111",
3
+ "version": "4.41.123",
4
4
  "description": "",
5
5
  "browser": "lib/browser.js",
6
6
  "main": "lib/server.js",
@@ -21,37 +21,37 @@
21
21
  "watch": "tsc -w"
22
22
  },
23
23
  "dependencies": {
24
- "afterframe": "^1.0.2",
24
+ "@fastify/compress": "^6.2.0",
25
+ "@fastify/cookie": "^8.3.0",
26
+ "@fastify/formbody": "^7.4.0",
27
+ "@fastify/static": "^6.9.0",
28
+ "@loadable/server": "^5.15.0",
25
29
  "@tinkoff/errors": "0.5.3",
26
30
  "@tinkoff/monkeypatch": "4.0.3",
27
- "@tinkoff/terminus": "0.3.3",
31
+ "@tinkoff/terminus": "0.3.4",
28
32
  "@tinkoff/url": "0.10.3",
29
- "@tramvai/module-cache-warmup": "4.41.111",
30
- "@tramvai/module-metrics": "4.41.111",
31
- "@tramvai/papi": "4.41.111",
32
- "@tramvai/tokens-server": "4.41.111",
33
- "@tramvai/tokens-router": "4.41.111",
34
- "@tramvai/tokens-server-private": "4.41.111",
33
+ "@tramvai/module-cache-warmup": "4.41.123",
34
+ "@tramvai/module-metrics": "4.41.123",
35
+ "@tramvai/papi": "4.41.123",
35
36
  "@tramvai/safe-strings": "0.7.9",
37
+ "@tramvai/tokens-router": "4.41.123",
38
+ "@tramvai/tokens-server": "4.41.123",
39
+ "@tramvai/tokens-server-private": "4.41.123",
40
+ "afterframe": "^1.0.2",
36
41
  "fastify": "^4.14.1",
37
- "@fastify/cookie": "^8.3.0",
38
- "@fastify/compress": "^6.2.0",
39
- "@fastify/formbody": "^7.4.0",
40
- "@fastify/static": "^6.9.0",
41
- "@loadable/server": "^5.15.0",
42
42
  "http-proxy-middleware": "^2.0.2"
43
43
  },
44
44
  "peerDependencies": {
45
- "@tinkoff/dippy": "0.10.12",
45
+ "@tinkoff/dippy": "0.10.13",
46
46
  "@tinkoff/utils": "^2.1.2",
47
- "@tramvai/cli": "4.41.111",
48
- "@tramvai/core": "4.41.111",
49
- "@tramvai/react": "4.41.111",
50
- "@tramvai/module-common": "4.41.111",
51
- "@tramvai/module-environment": "4.41.111",
52
- "@tramvai/tokens-common": "4.41.111",
53
- "@tramvai/tokens-core-private": "4.41.111",
54
- "@tramvai/tokens-render": "4.41.111",
47
+ "@tramvai/cli": "4.41.123",
48
+ "@tramvai/core": "4.41.123",
49
+ "@tramvai/module-common": "4.41.123",
50
+ "@tramvai/module-environment": "4.41.123",
51
+ "@tramvai/react": "4.41.123",
52
+ "@tramvai/tokens-common": "4.41.123",
53
+ "@tramvai/tokens-core-private": "4.41.123",
54
+ "@tramvai/tokens-render": "4.41.123",
55
55
  "react": ">=16.14.0",
56
56
  "react-dom": ">=16.14.0",
57
57
  "tslib": "^2.4.0"