@tramvai/module-router 2.24.1 → 2.25.1
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/index.browser.js +1 -1
- package/lib/index.es.js +2 -2
- package/lib/index.js +2 -2
- package/lib/modules/hooks/server/httpStatus.d.ts +1 -1
- package/package.json +20 -20
package/lib/index.browser.js
CHANGED
|
@@ -191,7 +191,7 @@ const provideRouter = ({ router }) => {
|
|
|
191
191
|
currentUrl: router.getCurrentUrl(),
|
|
192
192
|
};
|
|
193
193
|
return (render) => {
|
|
194
|
-
return (jsx(Provider,
|
|
194
|
+
return (jsx(Provider, { router: router, serverState: serverState, children: render }));
|
|
195
195
|
};
|
|
196
196
|
};
|
|
197
197
|
|
package/lib/index.es.js
CHANGED
|
@@ -193,7 +193,7 @@ const provideRouter = ({ router }) => {
|
|
|
193
193
|
currentUrl: router.getCurrentUrl(),
|
|
194
194
|
};
|
|
195
195
|
return (render) => {
|
|
196
|
-
return (jsx(Provider,
|
|
196
|
+
return (jsx(Provider, { router: router, serverState: serverState, children: render }));
|
|
197
197
|
};
|
|
198
198
|
};
|
|
199
199
|
|
|
@@ -494,7 +494,7 @@ const runActionsFactory = ({ store, router, actionRegistry, actionPageRunner, })
|
|
|
494
494
|
};
|
|
495
495
|
};
|
|
496
496
|
|
|
497
|
-
const httpStatus = ({ responseManager
|
|
497
|
+
const httpStatus = ({ responseManager }) => async ({ to }) => {
|
|
498
498
|
if (to === null || to === void 0 ? void 0 : to.config.httpStatus) {
|
|
499
499
|
responseManager.setStatus(to.config.httpStatus);
|
|
500
500
|
}
|
package/lib/index.js
CHANGED
|
@@ -204,7 +204,7 @@ const provideRouter = ({ router: router$1 }) => {
|
|
|
204
204
|
currentUrl: router$1.getCurrentUrl(),
|
|
205
205
|
};
|
|
206
206
|
return (render) => {
|
|
207
|
-
return (jsxRuntime.jsx(router.Provider,
|
|
207
|
+
return (jsxRuntime.jsx(router.Provider, { router: router$1, serverState: serverState, children: render }));
|
|
208
208
|
};
|
|
209
209
|
};
|
|
210
210
|
|
|
@@ -505,7 +505,7 @@ const runActionsFactory = ({ store, router, actionRegistry, actionPageRunner, })
|
|
|
505
505
|
};
|
|
506
506
|
};
|
|
507
507
|
|
|
508
|
-
const httpStatus = ({ responseManager
|
|
508
|
+
const httpStatus = ({ responseManager }) => async ({ to }) => {
|
|
509
509
|
if (to === null || to === void 0 ? void 0 : to.config.httpStatus) {
|
|
510
510
|
responseManager.setStatus(to.config.httpStatus);
|
|
511
511
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NavigationHook } from '@tinkoff/router';
|
|
2
2
|
import type { RESPONSE_MANAGER_TOKEN } from '@tramvai/tokens-common';
|
|
3
|
-
export declare const httpStatus: ({ responseManager
|
|
3
|
+
export declare const httpStatus: ({ responseManager }: {
|
|
4
4
|
responseManager: typeof RESPONSE_MANAGER_TOKEN;
|
|
5
5
|
}) => NavigationHook;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-router",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.25.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"browser": {
|
|
@@ -24,29 +24,29 @@
|
|
|
24
24
|
"build-for-publish": "true"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@tinkoff/errors": "0.3.
|
|
28
|
-
"@tinkoff/router": "0.2.
|
|
29
|
-
"@tinkoff/url": "0.8.
|
|
30
|
-
"@tramvai/tokens-child-app": "2.
|
|
31
|
-
"@tramvai/tokens-render": "2.
|
|
32
|
-
"@tramvai/tokens-router": "2.
|
|
33
|
-
"@tramvai/tokens-server": "2.
|
|
34
|
-
"@tramvai/experiments": "2.
|
|
27
|
+
"@tinkoff/errors": "0.3.4",
|
|
28
|
+
"@tinkoff/router": "0.2.3",
|
|
29
|
+
"@tinkoff/url": "0.8.3",
|
|
30
|
+
"@tramvai/tokens-child-app": "2.25.1",
|
|
31
|
+
"@tramvai/tokens-render": "2.25.1",
|
|
32
|
+
"@tramvai/tokens-router": "2.25.1",
|
|
33
|
+
"@tramvai/tokens-server": "2.25.1",
|
|
34
|
+
"@tramvai/experiments": "2.25.1"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@tinkoff/utils": "^2.1.2",
|
|
38
|
-
"@tramvai/cli": "2.
|
|
39
|
-
"@tramvai/core": "2.
|
|
40
|
-
"@tramvai/module-log": "2.
|
|
41
|
-
"@tramvai/module-server": "2.
|
|
42
|
-
"@tramvai/papi": "2.
|
|
43
|
-
"@tramvai/state": "2.
|
|
44
|
-
"@tramvai/test-helpers": "2.
|
|
45
|
-
"@tramvai/test-mocks": "2.
|
|
46
|
-
"@tramvai/tokens-common": "2.
|
|
47
|
-
"@tinkoff/dippy": "0.8.
|
|
38
|
+
"@tramvai/cli": "2.25.1",
|
|
39
|
+
"@tramvai/core": "2.25.1",
|
|
40
|
+
"@tramvai/module-log": "2.25.1",
|
|
41
|
+
"@tramvai/module-server": "2.25.1",
|
|
42
|
+
"@tramvai/papi": "2.25.1",
|
|
43
|
+
"@tramvai/state": "2.25.1",
|
|
44
|
+
"@tramvai/test-helpers": "2.25.1",
|
|
45
|
+
"@tramvai/test-mocks": "2.25.1",
|
|
46
|
+
"@tramvai/tokens-common": "2.25.1",
|
|
47
|
+
"@tinkoff/dippy": "0.8.5",
|
|
48
48
|
"react": "*",
|
|
49
|
-
"tslib": "^2.0
|
|
49
|
+
"tslib": "^2.4.0"
|
|
50
50
|
},
|
|
51
51
|
"license": "Apache-2.0",
|
|
52
52
|
"module": "lib/index.es.js"
|