@tramvai/module-client-hints 2.56.2 → 2.59.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 +2 -1
- package/lib/server.js +2 -1
- package/lib/tokens.d.ts +8 -2
- package/package.json +8 -8
package/lib/server.es.js
CHANGED
|
@@ -53,7 +53,8 @@ const SUPPOSED_MEDIA = {
|
|
|
53
53
|
};
|
|
54
54
|
const readMediaCommand = ({ context, cookieManager, }) => {
|
|
55
55
|
return function readMedia() {
|
|
56
|
-
|
|
56
|
+
var _a;
|
|
57
|
+
const mediaInfo = safeParseJSON((_a = cookieManager.get(COOKIE_NAME_MEDIA_INFO)) !== null && _a !== void 0 ? _a : '');
|
|
57
58
|
if (mediaInfo) {
|
|
58
59
|
return context.dispatch(setMedia({
|
|
59
60
|
...mediaInfo,
|
package/lib/server.js
CHANGED
|
@@ -61,7 +61,8 @@ const SUPPOSED_MEDIA = {
|
|
|
61
61
|
};
|
|
62
62
|
const readMediaCommand = ({ context, cookieManager, }) => {
|
|
63
63
|
return function readMedia() {
|
|
64
|
-
|
|
64
|
+
var _a;
|
|
65
|
+
const mediaInfo = safeStrings.safeParseJSON((_a = cookieManager.get(COOKIE_NAME_MEDIA_INFO)) !== null && _a !== void 0 ? _a : '');
|
|
65
66
|
if (mediaInfo) {
|
|
66
67
|
return context.dispatch(setMedia({
|
|
67
68
|
...mediaInfo,
|
package/lib/tokens.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import type { UserAgent } from '@tinkoff/user-agent';
|
|
2
|
-
export declare const USER_AGENT_TOKEN:
|
|
3
|
-
|
|
2
|
+
export declare const USER_AGENT_TOKEN: UserAgent & {
|
|
3
|
+
__type?: "base token" | undefined;
|
|
4
|
+
};
|
|
5
|
+
export declare const PARSER_CLIENT_HINTS_ENABLED: (false & {
|
|
6
|
+
__type?: "base token" | undefined;
|
|
7
|
+
}) | (true & {
|
|
8
|
+
__type?: "base token" | undefined;
|
|
9
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-client-hints",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.59.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/server.js",
|
|
6
6
|
"module": "lib/server.es.js",
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"build-for-publish": "true"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@tinkoff/user-agent": "0.4.
|
|
23
|
+
"@tinkoff/user-agent": "0.4.140",
|
|
24
24
|
"@tinkoff/utils": "^2.1.2",
|
|
25
25
|
"@tramvai/safe-strings": "0.5.6",
|
|
26
|
-
"@tramvai/tokens-common": "2.
|
|
27
|
-
"@tramvai/tokens-cookie": "2.
|
|
28
|
-
"@tramvai/tokens-child-app": "2.
|
|
26
|
+
"@tramvai/tokens-common": "2.59.0",
|
|
27
|
+
"@tramvai/tokens-cookie": "2.59.0",
|
|
28
|
+
"@tramvai/tokens-child-app": "2.59.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@tramvai/core": "2.
|
|
32
|
-
"@tramvai/state": "2.
|
|
33
|
-
"@tinkoff/dippy": "0.8.
|
|
31
|
+
"@tramvai/core": "2.59.0",
|
|
32
|
+
"@tramvai/state": "2.59.0",
|
|
33
|
+
"@tinkoff/dippy": "0.8.11",
|
|
34
34
|
"react": ">=16.14.0",
|
|
35
35
|
"react-dom": ">=16.14.0",
|
|
36
36
|
"tslib": "^2.4.0"
|