@tramvai/module-server 1.109.0 → 2.0.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
@@ -308,6 +308,7 @@ const staticAppCommand = ({ logger, envManager, appInfo, }) => {
308
308
  appStatic.use((_, res, next) => {
309
309
  res.set({
310
310
  'Access-Control-Allow-Origin': '*',
311
+ 'Timing-Allow-Origin': '*',
311
312
  'X-App-Id': appInfo.appName,
312
313
  'X-App-Version': appVersion,
313
314
  'X-Host': os.hostname(),
@@ -897,6 +898,7 @@ UtilityServerModule = __decorate([
897
898
  }),
898
899
  provide({
899
900
  provide: UTILITY_SERVER_PORT_TOKEN,
901
+ scope: Scope.SINGLETON,
900
902
  useFactory: ({ envManager }) => {
901
903
  return +(envManager.get('UTILITY_SERVER_PORT') || envManager.get('PORT'));
902
904
  },
@@ -906,6 +908,7 @@ UtilityServerModule = __decorate([
906
908
  }),
907
909
  provide({
908
910
  provide: IS_CUSTOM_SERVER_TOKEN,
911
+ scope: Scope.SINGLETON,
909
912
  useFactory: ({ port, envManager }) => {
910
913
  return +envManager.get('PORT') !== port;
911
914
  },
package/lib/server.js CHANGED
@@ -333,6 +333,7 @@ const staticAppCommand = ({ logger, envManager, appInfo, }) => {
333
333
  appStatic.use((_, res, next) => {
334
334
  res.set({
335
335
  'Access-Control-Allow-Origin': '*',
336
+ 'Timing-Allow-Origin': '*',
336
337
  'X-App-Id': appInfo.appName,
337
338
  'X-App-Version': appVersion,
338
339
  'X-Host': os__default["default"].hostname(),
@@ -922,6 +923,7 @@ UtilityServerModule = tslib.__decorate([
922
923
  }),
923
924
  core.provide({
924
925
  provide: tokensServer.UTILITY_SERVER_PORT_TOKEN,
926
+ scope: core.Scope.SINGLETON,
925
927
  useFactory: ({ envManager }) => {
926
928
  return +(envManager.get('UTILITY_SERVER_PORT') || envManager.get('PORT'));
927
929
  },
@@ -931,6 +933,7 @@ UtilityServerModule = tslib.__decorate([
931
933
  }),
932
934
  core.provide({
933
935
  provide: IS_CUSTOM_SERVER_TOKEN,
936
+ scope: core.Scope.SINGLETON,
934
937
  useFactory: ({ port, envManager }) => {
935
938
  return +envManager.get('PORT') !== port;
936
939
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-server",
3
- "version": "1.109.0",
3
+ "version": "2.0.0",
4
4
  "description": "",
5
5
  "browser": "lib/browser.js",
6
6
  "main": "lib/server.js",
@@ -23,11 +23,11 @@
23
23
  "@tinkoff/monkeypatch": "1.3.4",
24
24
  "@tinkoff/terminus": "0.0.4",
25
25
  "@tinkoff/url": "0.7.38",
26
- "@tramvai/module-cache-warmup": "1.109.0",
27
- "@tramvai/module-metrics": "1.109.0",
28
- "@tramvai/papi": "1.109.0",
29
- "@tramvai/tokens-server": "1.109.0",
30
- "@tramvai/tokens-server-private": "1.109.0",
26
+ "@tramvai/module-cache-warmup": "2.0.0",
27
+ "@tramvai/module-metrics": "2.0.0",
28
+ "@tramvai/papi": "2.0.0",
29
+ "@tramvai/tokens-server": "2.0.0",
30
+ "@tramvai/tokens-server-private": "2.0.0",
31
31
  "compression": "^1.7.4",
32
32
  "express": "^4.17.1",
33
33
  "fastify": "^3.29.0",
@@ -40,11 +40,11 @@
40
40
  "peerDependencies": {
41
41
  "@tinkoff/dippy": "0.7.41",
42
42
  "@tinkoff/utils": "^2.1.2",
43
- "@tramvai/cli": "1.109.0",
44
- "@tramvai/core": "1.109.0",
45
- "@tramvai/module-common": "1.109.0",
46
- "@tramvai/module-environment": "1.109.0",
47
- "@tramvai/tokens-common": "1.109.0",
43
+ "@tramvai/cli": "2.0.0",
44
+ "@tramvai/core": "2.0.0",
45
+ "@tramvai/module-common": "2.0.0",
46
+ "@tramvai/module-environment": "2.0.0",
47
+ "@tramvai/tokens-common": "2.0.0",
48
48
  "tslib": "^2.0.3"
49
49
  },
50
50
  "devDependencies": {