@tramvai/module-router 2.93.0 → 2.94.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.
|
@@ -27,7 +27,11 @@ const providers = [
|
|
|
27
27
|
});
|
|
28
28
|
if (routeResolve) {
|
|
29
29
|
router.registerHook('beforeResolve', async (navigation) => {
|
|
30
|
-
|
|
30
|
+
var _a;
|
|
31
|
+
const existingRoute = router.resolve(navigation.url.href);
|
|
32
|
+
// forceRouteResolve exists as a fallback property in case we have any conflicts
|
|
33
|
+
// in external routes definition and we need to force route resolving is some cases
|
|
34
|
+
if (!existingRoute || ((_a = existingRoute.config) === null || _a === void 0 ? void 0 : _a.forceRouteResolve)) {
|
|
31
35
|
const route = await routeResolve(navigation);
|
|
32
36
|
if (route) {
|
|
33
37
|
router.addRoute(routeTransform(route));
|
package/lib/modules/common.d.ts
CHANGED
package/lib/modules/common.es.js
CHANGED
|
@@ -27,7 +27,11 @@ const providers = [
|
|
|
27
27
|
});
|
|
28
28
|
if (routeResolve) {
|
|
29
29
|
router.registerHook('beforeResolve', async (navigation) => {
|
|
30
|
-
|
|
30
|
+
var _a;
|
|
31
|
+
const existingRoute = router.resolve(navigation.url.href);
|
|
32
|
+
// forceRouteResolve exists as a fallback property in case we have any conflicts
|
|
33
|
+
// in external routes definition and we need to force route resolving is some cases
|
|
34
|
+
if (!existingRoute || ((_a = existingRoute.config) === null || _a === void 0 ? void 0 : _a.forceRouteResolve)) {
|
|
31
35
|
const route = await routeResolve(navigation);
|
|
32
36
|
if (route) {
|
|
33
37
|
router.addRoute(routeTransform(route));
|
package/lib/modules/common.js
CHANGED
|
@@ -35,7 +35,11 @@ const providers = [
|
|
|
35
35
|
});
|
|
36
36
|
if (routeResolve) {
|
|
37
37
|
router.registerHook('beforeResolve', async (navigation) => {
|
|
38
|
-
|
|
38
|
+
var _a;
|
|
39
|
+
const existingRoute = router.resolve(navigation.url.href);
|
|
40
|
+
// forceRouteResolve exists as a fallback property in case we have any conflicts
|
|
41
|
+
// in external routes definition and we need to force route resolving is some cases
|
|
42
|
+
if (!existingRoute || ((_a = existingRoute.config) === null || _a === void 0 ? void 0 : _a.forceRouteResolve)) {
|
|
39
43
|
const route = await routeResolve(navigation);
|
|
40
44
|
if (route) {
|
|
41
45
|
router.addRoute(routeTransform(route));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-router",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.94.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"browser": {
|
|
@@ -26,26 +26,26 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@tinkoff/errors": "0.3.8",
|
|
29
|
-
"@tinkoff/router": "0.2.
|
|
29
|
+
"@tinkoff/router": "0.2.13",
|
|
30
30
|
"@tinkoff/url": "0.8.6",
|
|
31
|
-
"@tramvai/react": "2.
|
|
32
|
-
"@tramvai/tokens-child-app": "2.
|
|
33
|
-
"@tramvai/tokens-render": "2.
|
|
34
|
-
"@tramvai/tokens-router": "2.
|
|
35
|
-
"@tramvai/tokens-server": "2.
|
|
36
|
-
"@tramvai/experiments": "2.
|
|
31
|
+
"@tramvai/react": "2.94.0",
|
|
32
|
+
"@tramvai/tokens-child-app": "2.94.0",
|
|
33
|
+
"@tramvai/tokens-render": "2.94.0",
|
|
34
|
+
"@tramvai/tokens-router": "2.94.0",
|
|
35
|
+
"@tramvai/tokens-server": "2.94.0",
|
|
36
|
+
"@tramvai/experiments": "2.94.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@tinkoff/utils": "^2.1.2",
|
|
40
|
-
"@tramvai/cli": "2.
|
|
41
|
-
"@tramvai/core": "2.
|
|
42
|
-
"@tramvai/module-log": "2.
|
|
43
|
-
"@tramvai/module-server": "2.
|
|
44
|
-
"@tramvai/papi": "2.
|
|
45
|
-
"@tramvai/state": "2.
|
|
46
|
-
"@tramvai/test-helpers": "2.
|
|
47
|
-
"@tramvai/test-mocks": "2.
|
|
48
|
-
"@tramvai/tokens-common": "2.
|
|
40
|
+
"@tramvai/cli": "2.94.0",
|
|
41
|
+
"@tramvai/core": "2.94.0",
|
|
42
|
+
"@tramvai/module-log": "2.94.0",
|
|
43
|
+
"@tramvai/module-server": "2.94.0",
|
|
44
|
+
"@tramvai/papi": "2.94.0",
|
|
45
|
+
"@tramvai/state": "2.94.0",
|
|
46
|
+
"@tramvai/test-helpers": "2.94.0",
|
|
47
|
+
"@tramvai/test-mocks": "2.94.0",
|
|
48
|
+
"@tramvai/tokens-common": "2.94.0",
|
|
49
49
|
"@tinkoff/dippy": "0.8.15",
|
|
50
50
|
"react": "*",
|
|
51
51
|
"tslib": "^2.4.0"
|