@typed/router 0.16.9 → 0.16.11
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/dist/cjs/matchRoutes.d.ts.map +1 -1
- package/dist/cjs/matchRoutes.js +2 -0
- package/dist/cjs/matchRoutes.js.map +1 -1
- package/dist/matchRoutes.d.ts.map +1 -1
- package/dist/matchRoutes.js +2 -0
- package/dist/matchRoutes.js.map +1 -1
- package/dist/tsconfig.cjs.build.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/matchRoutes.ts +3 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typed/router",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"@typed/dom": "8.16.6",
|
|
26
26
|
"@typed/error": "0.15.4",
|
|
27
27
|
"@typed/fx": "1.15.4",
|
|
28
|
-
"@typed/html": "3.16.
|
|
28
|
+
"@typed/html": "3.16.10",
|
|
29
29
|
"@typed/navigation": "0.3.6",
|
|
30
30
|
"@typed/path": "0.5.2",
|
|
31
31
|
"@typed/route": "0.12.3"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "5f252fe58dd64da9ec7bee019e0b90e6404ffd52",
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
package/src/matchRoutes.ts
CHANGED
|
@@ -67,6 +67,7 @@ export function matchRoutes<
|
|
|
67
67
|
Effect.gen(function* ($) {
|
|
68
68
|
for (let i = 0; i < length; ++i) {
|
|
69
69
|
const [route, render, guard, onMatch] = matchers[i]
|
|
70
|
+
yield* $(Effect.logDebug(`Matching ${path} with ${route.path}`))
|
|
70
71
|
const params = route.match(path)
|
|
71
72
|
|
|
72
73
|
if (Option.isSome(params)) {
|
|
@@ -75,6 +76,8 @@ export function matchRoutes<
|
|
|
75
76
|
continue
|
|
76
77
|
}
|
|
77
78
|
|
|
79
|
+
yield* $(Effect.logDebug(`Matched ${path} with ${route.path}`))
|
|
80
|
+
|
|
78
81
|
// If there is an onMatch handler, run it and catch any errors
|
|
79
82
|
// This is useful when you want to add tracking when a route is matched
|
|
80
83
|
if (onMatch) {
|