@cloudflare/util-routes 5.1.188 → 5.2.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/CHANGELOG.md +11 -0
- package/dist/route.d.ts +3 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.2.0](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-routes@5.1.188...@cloudflare/util-routes@5.2.0) (2022-04-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **util-routes:** PAGES-930 Add extract route params as an interface ([667991f](http://stash.cfops.it:7999/fe/stratus/commits/667991f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [5.1.188](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-routes@5.1.187...@cloudflare/util-routes@5.1.188) (2022-04-06)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @cloudflare/util-routes
|
package/dist/route.d.ts
CHANGED
|
@@ -19,4 +19,7 @@ declare type RoutePatternResultFromParams<Params extends Array<string | RoutePat
|
|
|
19
19
|
recurse: RoutePatternResultFromParams<Tail<Params>, Prepend<ExtractParam<Head<Params>>, Result>>;
|
|
20
20
|
}[Head<Params> extends never ? 'returnResult' : 'recurse'];
|
|
21
21
|
export declare type ExtractParam<T extends string | RoutePatternResult<string>> = T extends RoutePatternResult<infer S> ? S : T;
|
|
22
|
+
export declare type ExtractRouteParamsInterface<T extends string | RoutePatternResult<string>> = {
|
|
23
|
+
[K in ExtractParam<T>]: string | undefined;
|
|
24
|
+
};
|
|
22
25
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/util-routes",
|
|
3
3
|
"description": "Wraps path-to-regexp with a convenient, type-safe tagged template function",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.2.0",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@cloudflare/types": "^6.14.10",
|
|
25
25
|
"path-to-regexp": "^3.0.0"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "b1c236997cac26f828d823091fe84aade15cdc0b"
|
|
28
28
|
}
|