@tramvai/module-client-hints 1.105.2 → 1.106.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
@@ -1,5 +1,5 @@
1
1
  import { __decorate } from 'tslib';
2
- import { Module, Scope, commandLineListTokens } from '@tramvai/core';
2
+ import { Module, provide, Scope, commandLineListTokens } from '@tramvai/core';
3
3
  import { COMBINE_REDUCERS, CREATE_CACHE_TOKEN, REQUEST_MANAGER_TOKEN, STORE_TOKEN, CONTEXT_TOKEN } from '@tramvai/tokens-common';
4
4
  import { COOKIE_MANAGER_TOKEN } from '@tramvai/tokens-cookie';
5
5
  import { parse } from '@tinkoff/user-agent';
@@ -120,16 +120,16 @@ ClientHintsModule = __decorate([
120
120
  Module({
121
121
  providers: [
122
122
  ...providers,
123
- {
123
+ provide({
124
124
  provide: 'userAgentLruCache',
125
125
  scope: Scope.SINGLETON,
126
126
  useFactory: ({ createCache }) => {
127
- return createCache('userAgent', { max: 50 });
127
+ return createCache('memory', { max: 50 });
128
128
  },
129
129
  deps: {
130
130
  createCache: CREATE_CACHE_TOKEN,
131
131
  },
132
- },
132
+ }),
133
133
  {
134
134
  provide: USER_AGENT_TOKEN,
135
135
  useFactory: ({ requestManager, cache }) => {
package/lib/server.js CHANGED
@@ -128,16 +128,16 @@ exports.ClientHintsModule = tslib.__decorate([
128
128
  core.Module({
129
129
  providers: [
130
130
  ...providers,
131
- {
131
+ core.provide({
132
132
  provide: 'userAgentLruCache',
133
133
  scope: core.Scope.SINGLETON,
134
134
  useFactory: ({ createCache }) => {
135
- return createCache('userAgent', { max: 50 });
135
+ return createCache('memory', { max: 50 });
136
136
  },
137
137
  deps: {
138
138
  createCache: tokensCommon.CREATE_CACHE_TOKEN,
139
139
  },
140
- },
140
+ }),
141
141
  {
142
142
  provide: USER_AGENT_TOKEN,
143
143
  useFactory: ({ requestManager, cache }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-client-hints",
3
- "version": "1.105.2",
3
+ "version": "1.106.0",
4
4
  "description": "",
5
5
  "main": "lib/server.js",
6
6
  "module": "lib/server.es.js",
@@ -20,16 +20,16 @@
20
20
  "build-for-publish": "true"
21
21
  },
22
22
  "dependencies": {
23
- "@tinkoff/user-agent": "0.3.356",
23
+ "@tinkoff/user-agent": "0.3.367",
24
24
  "@tinkoff/utils": "^2.1.2",
25
25
  "@tramvai/safe-strings": "0.4.4",
26
- "@tramvai/tokens-common": "1.105.2",
27
- "@tramvai/tokens-cookie": "1.105.2",
28
- "@tramvai/tokens-child-app": "1.105.2"
26
+ "@tramvai/tokens-common": "1.106.0",
27
+ "@tramvai/tokens-cookie": "1.106.0",
28
+ "@tramvai/tokens-child-app": "1.106.0"
29
29
  },
30
30
  "peerDependencies": {
31
- "@tramvai/core": "1.105.2",
32
- "@tramvai/state": "1.105.2",
31
+ "@tramvai/core": "1.106.0",
32
+ "@tramvai/state": "1.106.0",
33
33
  "@tinkoff/dippy": "0.7.41",
34
34
  "react": ">=16.14.0",
35
35
  "react-dom": ">=16.14.0",