react-router-hono-server 4.1.2 → 4.1.4

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.
@@ -15,12 +15,12 @@ interface HonoAWSServerOptions<E extends Env = BlankEnv> extends Omit<HonoServer
15
15
  */
16
16
  invokeMode: InvokeMode;
17
17
  }
18
- type HonoServerOptions<E extends Env = BlankEnv> = HonoAWSServerOptions<E> & Omit<WithoutWebsocket<E>, "useWebSocket">;
18
+ export type HonoServerOptions<E extends Env = BlankEnv> = HonoAWSServerOptions<E> & Omit<WithoutWebsocket<E>, "useWebSocket">;
19
19
  /**
20
20
  * Create a Hono server
21
21
  *
22
22
  * @param config {@link HonoServerOptions} - The configuration options for the server
23
23
  */
24
- declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptions<E>): Promise<Hono<E> | AWSLambdaHandler>;
24
+ export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptions<E>): Promise<Hono<E> | AWSLambdaHandler>;
25
25
  //#endregion
26
- export { HonoServerOptions, createGetLoadContext, createHonoServer };
26
+ export { createGetLoadContext };
@@ -43,13 +43,13 @@ interface HonoBunServerOptions<E extends Env = BlankEnv> extends HonoServerOptio
43
43
  }
44
44
  type HonoServerOptionsWithWebSocket<E extends Env = BlankEnv> = HonoBunServerOptions<E> & WithWebsocket<E>;
45
45
  type HonoServerOptionsWithoutWebSocket<E extends Env = BlankEnv> = HonoBunServerOptions<E> & WithoutWebsocket<E>;
46
- type HonoServerOptions<E extends Env = BlankEnv> = HonoServerOptionsWithWebSocket<E> | HonoServerOptionsWithoutWebSocket<E>;
46
+ export type HonoServerOptions<E extends Env = BlankEnv> = HonoServerOptionsWithWebSocket<E> | HonoServerOptionsWithoutWebSocket<E>;
47
47
  /**
48
48
  * Create a Hono server
49
49
  *
50
50
  * @param HonoServerOptions options {@link HonoServerOptions} - The configuration options for the server
51
51
  */
52
- declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithoutWebSocket<E>): Promise<CustomBunServer>;
53
- declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithWebSocket<E>): Promise<CustomBunServer>;
52
+ export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithoutWebSocket<E>): Promise<CustomBunServer>;
53
+ export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithWebSocket<E>): Promise<CustomBunServer>;
54
54
  //#endregion
55
- export { HonoServerOptions, createGetLoadContext, createHonoServer };
55
+ export { createGetLoadContext };
@@ -7,13 +7,13 @@ interface HonoCloudflareOptions<E extends Env = BlankEnv> extends Omit<HonoServe
7
7
  type CloudflareUpgradeWebSocket = typeof upgradeWebSocket;
8
8
  type HonoServerOptionsWithWebSocket<E extends Env = BlankEnv> = HonoCloudflareOptions<E> & WithWebsocket<E, CloudflareUpgradeWebSocket>;
9
9
  type HonoServerOptionsWithoutWebSocket<E extends Env = BlankEnv> = HonoCloudflareOptions<E> & WithoutWebsocket<E>;
10
- type HonoServerOptions<E extends Env = BlankEnv> = HonoServerOptionsWithWebSocket<E> | HonoServerOptionsWithoutWebSocket<E>;
10
+ export type HonoServerOptions<E extends Env = BlankEnv> = HonoServerOptionsWithWebSocket<E> | HonoServerOptionsWithoutWebSocket<E>;
11
11
  /**
12
12
  * Create a Hono server
13
13
  *
14
14
  * @param config {@link HonoServerOptions} - The configuration options for the server
15
15
  */
16
- declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithoutWebSocket<E>): Promise<Hono<E>>;
17
- declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithWebSocket<E>): Promise<Hono<E>>;
16
+ export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithoutWebSocket<E>): Promise<Hono<E>>;
17
+ export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithWebSocket<E>): Promise<Hono<E>>;
18
18
  //#endregion
19
- export { HonoServerOptions, createGetLoadContext, createHonoServer };
19
+ export { createGetLoadContext };
@@ -40,13 +40,13 @@ interface HonoDenoServerOptions<E extends Env = BlankEnv> extends HonoServerOpti
40
40
  }
41
41
  type HonoServerOptionsWithoutWebSocket<E extends Env = BlankEnv> = HonoDenoServerOptions<E> & WithoutWebsocket<E>;
42
42
  type HonoServerOptionsWithWebSocket<E extends Env = BlankEnv> = HonoDenoServerOptions<E> & WithWebsocket<E>;
43
- type HonoServerOptions<E extends Env = BlankEnv> = HonoServerOptionsWithWebSocket<E> | HonoServerOptionsWithoutWebSocket<E>;
43
+ export type HonoServerOptions<E extends Env = BlankEnv> = HonoServerOptionsWithWebSocket<E> | HonoServerOptionsWithoutWebSocket<E>;
44
44
  /**
45
45
  * Create a Hono server
46
46
  *
47
47
  * @param config {@link HonoServerOptions} - The configuration options for the server
48
48
  */
49
- declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithoutWebSocket<E>): Promise<Hono<E>>;
50
- declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithWebSocket<E>): Promise<Hono<E>>;
49
+ export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithoutWebSocket<E>): Promise<Hono<E>>;
50
+ export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithWebSocket<E>): Promise<Hono<E>>;
51
51
  //#endregion
52
- export { HonoServerOptions, createGetLoadContext, createHonoServer };
52
+ export { createGetLoadContext };
@@ -93,13 +93,13 @@ type WithNodeWebsocket<E extends Env> = Omit<WithWebsocket<E>, "configure"> & {
93
93
  };
94
94
  type HonoServerOptionsWithWebSocket<E extends Env = BlankEnv> = HonoNodeServerOptions<E> & WithNodeWebsocket<E>;
95
95
  type HonoServerOptionsWithoutWebSocket<E extends Env = BlankEnv> = HonoNodeServerOptions<E> & WithoutWebsocket<E>;
96
- type HonoServerOptions<E extends Env = BlankEnv> = HonoServerOptionsWithWebSocket<E> | HonoServerOptionsWithoutWebSocket<E>;
96
+ export type HonoServerOptions<E extends Env = BlankEnv> = HonoServerOptionsWithWebSocket<E> | HonoServerOptionsWithoutWebSocket<E>;
97
97
  /**
98
98
  * Create a Hono server
99
99
  *
100
100
  * @param config {@link HonoServerOptions} - The configuration options for the server
101
101
  */
102
- declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithoutWebSocket<E>): Promise<Hono<E>>;
103
- declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithWebSocket<E>): Promise<Hono<E>>;
102
+ export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithoutWebSocket<E>): Promise<Hono<E>>;
103
+ export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithWebSocket<E>): Promise<Hono<E>>;
104
104
  //#endregion
105
- export { HonoServerOptions, createGetLoadContext, createHonoServer };
105
+ export { createGetLoadContext };
package/dist/dev.d.ts CHANGED
@@ -44,6 +44,5 @@ type ReactRouterHonoServerPluginOptionsDefault = ReactRouterHonoServerPluginOpti
44
44
  runtime?: Runtime;
45
45
  };
46
46
  type ReactRouterHonoServerPluginOptions = ReactRouterHonoServerPluginOptionsDefault;
47
- declare function reactRouterHonoServer(options?: ReactRouterHonoServerPluginOptions): Plugin;
48
- //#endregion
49
- export { reactRouterHonoServer };
47
+ export declare function reactRouterHonoServer(options?: ReactRouterHonoServerPluginOptions): Plugin;
48
+ //#endregion
package/dist/http.d.ts CHANGED
@@ -7,18 +7,17 @@ import { Context } from "hono";
7
7
  *
8
8
  * @deprecated Use `redirect` instead. `import { reactRouterRedirect } from "react-router-hono-server/http"`
9
9
  */
10
- declare function reactRouterRedirect(location: string): Response;
10
+ export declare function reactRouterRedirect(location: string): Response;
11
11
  /**
12
12
  * Redirect to a new location.
13
13
  *
14
14
  * It follows the Single Fetch Redirect protocol, if the request path ends with `.data`.
15
15
  */
16
- declare function redirect(c: Context, location: string): Response;
16
+ export declare function redirect(c: Context, location: string): Response;
17
17
  /**
18
18
  * Get the current request path
19
19
  *
20
20
  * If the path ends with `.data` (React Router Single Fetch query), it will be removed.
21
21
  */
22
- declare function getPath(c: Context): string;
23
- //#endregion
24
- export { getPath, reactRouterRedirect, redirect };
22
+ export declare function getPath(c: Context): string;
23
+ //#endregion
@@ -4,6 +4,5 @@
4
4
  *
5
5
  * @param seconds - The number of seconds to cache
6
6
  */
7
- declare function cache(seconds: number): import("hono").MiddlewareHandler<any, string, {}, Response>;
8
- //#endregion
9
- export { cache };
7
+ export declare function cache(seconds: number): import("hono").MiddlewareHandler<any, string, {}, Response>;
8
+ //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-router-hono-server",
3
- "version": "4.1.2",
3
+ "version": "4.1.4",
4
4
  "description": "The Vite plugin you need to create a Hono server for your React Router app in less than 10 seconds.",
5
5
  "homepage": "https://github.com/rphlmr/react-router-hono-server#readme",
6
6
  "bugs": {
@@ -82,39 +82,40 @@
82
82
  "provenance": true
83
83
  },
84
84
  "dependencies": {
85
- "@drizzle-team/brocli": "0.12.0",
85
+ "@drizzle-team/brocli": "0.12.1",
86
86
  "@hono/node-server": "2.1.1",
87
87
  "@hono/vite-dev-server": "0.26.1"
88
88
  },
89
89
  "devDependencies": {
90
90
  "@arethetypeswrong/cli": "0.18.5",
91
- "@changesets/changelog-github": "1.0.0",
92
- "@changesets/cli": "3.0.1",
93
- "@cloudflare/workers-types": "5.20260826.1",
94
- "@playwright/test": "1.62.1",
95
- "@types/bun": "1.4.0",
91
+ "@changesets/changelog-github": "1.0.1",
92
+ "@changesets/cli": "3.0.3",
93
+ "@cloudflare/workers-types": "5.20260927.1",
94
+ "@playwright/test": "1.63.0",
95
+ "@types/bun": "1.4.2",
96
96
  "@types/deno": "2.7.0",
97
97
  "@types/node": "24.13.3",
98
- "@types/react-dom": "19.2.5",
98
+ "@types/react-dom": "19.3.0",
99
99
  "@types/ws": "8.18.1",
100
100
  "@vitest/coverage-v8": "4.1.11",
101
- "hono": "4.13.5",
101
+ "hono": "4.13.9",
102
102
  "npm-run-all": "4.1.5",
103
103
  "publint": "0.3.24",
104
- "react": "19.2.8",
105
- "react-dom": "19.2.8",
104
+ "react": "19.3.0",
105
+ "react-dom": "19.3.0",
106
106
  "typescript": "6.0.3",
107
- "vite-plus": "0.3.0",
108
- "ws": "8.21.3"
107
+ "vite-plus": "0.3.1",
108
+ "vitest": "4.1.11",
109
+ "ws": "8.22.0"
109
110
  },
110
111
  "peerDependencies": {
111
112
  "@react-router/dev": "^8.3.0",
112
113
  "@types/ws": "^8.18.1",
113
- "hono": "^4.13.2",
114
- "react": "^19.2.8",
115
- "react-dom": "^19.2.8",
116
- "react-router": "^8.3.0",
117
- "vite": ">=8.2.1",
114
+ "hono": "^4.13.7",
115
+ "react": "^19.3.0",
116
+ "react-dom": "^19.3.0",
117
+ "react-router": "^8.3.1",
118
+ "vite": ">=8.3.0",
118
119
  "ws": "^8.21.3"
119
120
  },
120
121
  "peerDependenciesMeta": {
@@ -141,7 +142,7 @@
141
142
  "check:fix": "vp check --fix",
142
143
  "clear-all": "rm -rf node_modules pnpm-lock.yaml",
143
144
  "release": "changeset publish",
144
- "test": "vp test run",
145
+ "test": "pnpm test:suite",
145
146
  "test:aws": "pnpm test:prepare && vp test run --project runtime tests/integration/aws",
146
147
  "test:aws:nightly": "RRHS_LATEST_COMPATIBLE=1 vp run test:aws",
147
148
  "test:aws:nightly:docker": "docker build --file tests/nightly/aws/Dockerfile --tag react-router-hono-server-nightly-aws tests/nightly && docker run --rm --network=host --mount \"type=bind,source=$PWD,target=/source,readonly\" react-router-hono-server-nightly-aws",