react-router-hono-server 2.7.0 → 2.7.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/dist/http.d.ts CHANGED
@@ -14,5 +14,11 @@ declare function reactRouterRedirect(location: string): Response;
14
14
  * It follows the Single Fetch Redirect protocol, if the request path ends with `.data`.
15
15
  */
16
16
  declare function redirect(c: Context, location: string): Response;
17
+ /**
18
+ * Get the current request path
19
+ *
20
+ * If the path ends with `.data` (React Router Single Fetch query), it will be removed.
21
+ */
22
+ declare function getPath(c: Context): string;
17
23
 
18
- export { reactRouterRedirect, redirect };
24
+ export { getPath, reactRouterRedirect, redirect };
package/dist/http.js CHANGED
@@ -44,7 +44,11 @@ function redirect(c, location) {
44
44
  }
45
45
  return c.redirect(location);
46
46
  }
47
+ function getPath(c) {
48
+ return c.req.path.replace(".data", "");
49
+ }
47
50
  export {
51
+ getPath,
48
52
  reactRouterRedirect,
49
53
  redirect
50
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-router-hono-server",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "type": "module",
5
5
  "description": "The Vite plugin you need to create a Hono server for your React Router app in less than 10 seconds.",
6
6
  "exports": {