react-router-hono-server 4.1.4 → 4.1.6
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/adapters/aws-lambda.d.ts +1 -3
- package/dist/adapters/aws-lambda.js +3 -4
- package/dist/adapters/bun.d.ts +1 -3
- package/dist/adapters/bun.js +4 -5
- package/dist/adapters/cloudflare.d.ts +1 -3
- package/dist/adapters/cloudflare.js +3 -4
- package/dist/adapters/deno.d.ts +1 -3
- package/dist/adapters/deno.js +4 -5
- package/dist/adapters/node.d.ts +1 -5
- package/dist/adapters/node.js +4 -5
- package/dist/cli.js +1 -2
- package/dist/dev.d.ts +1 -4
- package/dist/dev.js +3 -4
- package/dist/{helpers-BRZLziEZ.d.ts → helpers-CRb6zXJV.d.ts} +0 -4
- package/dist/{helpers-3n8XqkAi.js → helpers-Uej9XI0T.js} +1 -2
- package/dist/http.d.ts +1 -3
- package/dist/http.js +1 -2
- package/dist/middleware.d.ts +1 -3
- package/dist/middleware.js +1 -2
- package/dist/{react-router-build-request-_jlIVza5.js → react-router-build-request-B-_7C0qf.js} +1 -2
- package/dist/{vite-public-path-Aqd7hZ0d.js → vite-public-path-DxSldBPx.js} +1 -2
- package/package.json +15 -15
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { i as WithoutWebsocket, n as HonoServerOptionsBase, t as createGetLoadContext } from "../helpers-
|
|
1
|
+
import { i as WithoutWebsocket, n as HonoServerOptionsBase, t as createGetLoadContext } from "../helpers-CRb6zXJV.js";
|
|
2
2
|
import { Env, Hono } from "hono";
|
|
3
3
|
import { LambdaContext, LambdaEvent } from "hono/aws-lambda";
|
|
4
4
|
import { BlankEnv } from "hono/types";
|
|
5
|
-
//#region src/adapters/aws-lambda.d.ts
|
|
6
5
|
type InvokeMode = "default" | "stream";
|
|
7
6
|
type AWSLambdaHandler = (event: LambdaEvent, lambdaContext: LambdaContext, callback: (error?: Error | string | null, result?: unknown) => void) => unknown;
|
|
8
7
|
interface HonoAWSServerOptions<E extends Env = BlankEnv> extends Omit<HonoServerOptionsBase<E>, "port"> {
|
|
@@ -22,5 +21,4 @@ export type HonoServerOptions<E extends Env = BlankEnv> = HonoAWSServerOptions<E
|
|
|
22
21
|
* @param config {@link HonoServerOptions} - The configuration options for the server
|
|
23
22
|
*/
|
|
24
23
|
export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptions<E>): Promise<Hono<E> | AWSLambdaHandler>;
|
|
25
|
-
//#endregion
|
|
26
24
|
export { createGetLoadContext };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { a as getBuildMode, n as bindIncomingRequestSocketInfo, o as handleChromeDevToolsWorkspaceRequest, r as createGetLoadContext, s as importBuild } from "../helpers-
|
|
1
|
+
import { a as getBuildMode, n as bindIncomingRequestSocketInfo, o as handleChromeDevToolsWorkspaceRequest, r as createGetLoadContext, s as importBuild } from "../helpers-Uej9XI0T.js";
|
|
2
2
|
import { cache } from "../middleware.js";
|
|
3
|
-
import { t as isReactRouterBuildRequest } from "../react-router-build-request-
|
|
3
|
+
import { t as isReactRouterBuildRequest } from "../react-router-build-request-B-_7C0qf.js";
|
|
4
4
|
import { serveStatic } from "@hono/node-server/serve-static";
|
|
5
5
|
import { Hono } from "hono";
|
|
6
6
|
import { createMiddleware } from "hono/factory";
|
|
7
7
|
import { logger } from "hono/logger";
|
|
8
8
|
import { createRequestHandler } from "react-router";
|
|
9
9
|
import { handle, streamHandle } from "hono/aws-lambda";
|
|
10
|
-
|
|
10
|
+
// src/adapters/aws-lambda.ts
|
|
11
11
|
/**
|
|
12
12
|
* Create a Hono server
|
|
13
13
|
*
|
|
@@ -78,5 +78,4 @@ async function createHonoServer(options) {
|
|
|
78
78
|
console.log("🚧 Dev server started");
|
|
79
79
|
return app;
|
|
80
80
|
}
|
|
81
|
-
//#endregion
|
|
82
81
|
export { createGetLoadContext, createHonoServer };
|
package/dist/adapters/bun.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { i as WithoutWebsocket, n as HonoServerOptionsBase, r as WithWebsocket, t as createGetLoadContext } from "../helpers-
|
|
1
|
+
import { i as WithoutWebsocket, n as HonoServerOptionsBase, r as WithWebsocket, t as createGetLoadContext } from "../helpers-CRb6zXJV.js";
|
|
2
2
|
import { Env } from "hono";
|
|
3
3
|
import { BlankEnv } from "hono/types";
|
|
4
4
|
import { ServeStaticOptions } from "hono/serve-static";
|
|
5
|
-
//#region src/adapters/bun.d.ts
|
|
6
5
|
type CustomBunServer = Bun.Serve.Options<unknown, string>;
|
|
7
6
|
interface HonoBunServerOptions<E extends Env = BlankEnv> extends HonoServerOptionsBase<E> {
|
|
8
7
|
/**
|
|
@@ -51,5 +50,4 @@ export type HonoServerOptions<E extends Env = BlankEnv> = HonoServerOptionsWithW
|
|
|
51
50
|
*/
|
|
52
51
|
export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithoutWebSocket<E>): Promise<CustomBunServer>;
|
|
53
52
|
export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithWebSocket<E>): Promise<CustomBunServer>;
|
|
54
|
-
//#endregion
|
|
55
53
|
export { createGetLoadContext };
|
package/dist/adapters/bun.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as getBuildMode, i as createWebSocket, n as bindIncomingRequestSocketInfo, o as handleChromeDevToolsWorkspaceRequest, r as createGetLoadContext, s as importBuild, t as attachWebSocketToVite } from "../helpers-
|
|
1
|
+
import { a as getBuildMode, i as createWebSocket, n as bindIncomingRequestSocketInfo, o as handleChromeDevToolsWorkspaceRequest, r as createGetLoadContext, s as importBuild, t as attachWebSocketToVite } from "../helpers-Uej9XI0T.js";
|
|
2
2
|
import { cache } from "../middleware.js";
|
|
3
|
-
import { t as isReactRouterBuildRequest } from "../react-router-build-request-
|
|
4
|
-
import { i as viteGeneratedAssetsRoute, n as composeViteAssetRewriteRequestPath, t as classifyVitePublicPath } from "../vite-public-path-
|
|
3
|
+
import { t as isReactRouterBuildRequest } from "../react-router-build-request-B-_7C0qf.js";
|
|
4
|
+
import { i as viteGeneratedAssetsRoute, n as composeViteAssetRewriteRequestPath, t as classifyVitePublicPath } from "../vite-public-path-DxSldBPx.js";
|
|
5
5
|
import { Hono } from "hono";
|
|
6
6
|
import { createMiddleware } from "hono/factory";
|
|
7
7
|
import { logger } from "hono/logger";
|
|
8
8
|
import { createRequestHandler } from "react-router";
|
|
9
|
-
|
|
9
|
+
// src/adapters/bun.ts
|
|
10
10
|
let serverInstance;
|
|
11
11
|
let shutdownCallback;
|
|
12
12
|
async function createHonoServer(options) {
|
|
@@ -120,5 +120,4 @@ async function createHonoServer(options) {
|
|
|
120
120
|
}
|
|
121
121
|
return server;
|
|
122
122
|
}
|
|
123
|
-
//#endregion
|
|
124
123
|
export { createGetLoadContext, createHonoServer };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { i as WithoutWebsocket, n as HonoServerOptionsBase, r as WithWebsocket, t as createGetLoadContext } from "../helpers-
|
|
1
|
+
import { i as WithoutWebsocket, n as HonoServerOptionsBase, r as WithWebsocket, t as createGetLoadContext } from "../helpers-CRb6zXJV.js";
|
|
2
2
|
import { Env, Hono } from "hono";
|
|
3
3
|
import { BlankEnv } from "hono/types";
|
|
4
4
|
import { upgradeWebSocket } from "hono/cloudflare-workers";
|
|
5
|
-
//#region src/adapters/cloudflare.d.ts
|
|
6
5
|
interface HonoCloudflareOptions<E extends Env = BlankEnv> extends Omit<HonoServerOptionsBase<E>, "port"> {}
|
|
7
6
|
type CloudflareUpgradeWebSocket = typeof upgradeWebSocket;
|
|
8
7
|
type HonoServerOptionsWithWebSocket<E extends Env = BlankEnv> = HonoCloudflareOptions<E> & WithWebsocket<E, CloudflareUpgradeWebSocket>;
|
|
@@ -15,5 +14,4 @@ export type HonoServerOptions<E extends Env = BlankEnv> = HonoServerOptionsWithW
|
|
|
15
14
|
*/
|
|
16
15
|
export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithoutWebSocket<E>): Promise<Hono<E>>;
|
|
17
16
|
export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithWebSocket<E>): Promise<Hono<E>>;
|
|
18
|
-
//#endregion
|
|
19
17
|
export { createGetLoadContext };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as getBuildMode, i as createWebSocket, n as bindIncomingRequestSocketInfo, o as handleChromeDevToolsWorkspaceRequest, r as createGetLoadContext, s as importBuild } from "../helpers-
|
|
1
|
+
import { a as getBuildMode, i as createWebSocket, n as bindIncomingRequestSocketInfo, o as handleChromeDevToolsWorkspaceRequest, r as createGetLoadContext, s as importBuild } from "../helpers-Uej9XI0T.js";
|
|
2
2
|
import { cache } from "../middleware.js";
|
|
3
|
-
import { i as viteGeneratedAssetsRoute, r as stripVitePathnamePrefix, t as classifyVitePublicPath } from "../vite-public-path-
|
|
3
|
+
import { i as viteGeneratedAssetsRoute, r as stripVitePathnamePrefix, t as classifyVitePublicPath } from "../vite-public-path-DxSldBPx.js";
|
|
4
4
|
import { Hono } from "hono";
|
|
5
5
|
import { createMiddleware } from "hono/factory";
|
|
6
6
|
import { logger } from "hono/logger";
|
|
7
7
|
import { createRequestHandler } from "react-router";
|
|
8
|
-
|
|
8
|
+
// src/adapters/cloudflare.ts
|
|
9
9
|
async function createHonoServer(options) {
|
|
10
10
|
const basename = import.meta.env.REACT_ROUTER_HONO_SERVER_BASENAME;
|
|
11
11
|
const mergedOptions = {
|
|
@@ -94,5 +94,4 @@ function serveCloudflareAssets(vitePublicPath) {
|
|
|
94
94
|
return response;
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
//#endregion
|
|
98
97
|
export { createGetLoadContext, createHonoServer };
|
package/dist/adapters/deno.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { i as WithoutWebsocket, n as HonoServerOptionsBase, r as WithWebsocket, t as createGetLoadContext } from "../helpers-
|
|
1
|
+
import { i as WithoutWebsocket, n as HonoServerOptionsBase, r as WithWebsocket, t as createGetLoadContext } from "../helpers-CRb6zXJV.js";
|
|
2
2
|
import { Env, Hono } from "hono";
|
|
3
3
|
import { BlankEnv } from "hono/types";
|
|
4
4
|
import { ServeStaticOptions } from "hono/serve-static";
|
|
5
|
-
//#region src/adapters/deno.d.ts
|
|
6
5
|
type CustomDenoServer = Deno.ServeTcpOptions;
|
|
7
6
|
interface HonoDenoServerOptions<E extends Env = BlankEnv> extends HonoServerOptionsBase<E> {
|
|
8
7
|
/**
|
|
@@ -48,5 +47,4 @@ export type HonoServerOptions<E extends Env = BlankEnv> = HonoServerOptionsWithW
|
|
|
48
47
|
*/
|
|
49
48
|
export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithoutWebSocket<E>): Promise<Hono<E>>;
|
|
50
49
|
export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithWebSocket<E>): Promise<Hono<E>>;
|
|
51
|
-
//#endregion
|
|
52
50
|
export { createGetLoadContext };
|
package/dist/adapters/deno.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as getBuildMode, i as createWebSocket, n as bindIncomingRequestSocketInfo, o as handleChromeDevToolsWorkspaceRequest, r as createGetLoadContext, s as importBuild, t as attachWebSocketToVite } from "../helpers-
|
|
1
|
+
import { a as getBuildMode, i as createWebSocket, n as bindIncomingRequestSocketInfo, o as handleChromeDevToolsWorkspaceRequest, r as createGetLoadContext, s as importBuild, t as attachWebSocketToVite } from "../helpers-Uej9XI0T.js";
|
|
2
2
|
import { cache } from "../middleware.js";
|
|
3
|
-
import { t as isReactRouterBuildRequest } from "../react-router-build-request-
|
|
4
|
-
import { i as viteGeneratedAssetsRoute, n as composeViteAssetRewriteRequestPath, t as classifyVitePublicPath } from "../vite-public-path-
|
|
3
|
+
import { t as isReactRouterBuildRequest } from "../react-router-build-request-B-_7C0qf.js";
|
|
4
|
+
import { i as viteGeneratedAssetsRoute, n as composeViteAssetRewriteRequestPath, t as classifyVitePublicPath } from "../vite-public-path-DxSldBPx.js";
|
|
5
5
|
import { Hono } from "hono";
|
|
6
6
|
import { createMiddleware } from "hono/factory";
|
|
7
7
|
import { logger } from "hono/logger";
|
|
8
8
|
import { createRequestHandler } from "react-router";
|
|
9
|
-
|
|
9
|
+
// src/adapters/deno.ts
|
|
10
10
|
let serverInstance;
|
|
11
11
|
let shutdownCallback;
|
|
12
12
|
async function createHonoServer(options) {
|
|
@@ -118,5 +118,4 @@ async function createHonoServer(options) {
|
|
|
118
118
|
}
|
|
119
119
|
return app;
|
|
120
120
|
}
|
|
121
|
-
//#endregion
|
|
122
121
|
export { createGetLoadContext, createHonoServer };
|
package/dist/adapters/node.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as WithoutWebsocket, n as HonoServerOptionsBase, r as WithWebsocket, t as createGetLoadContext } from "../helpers-
|
|
1
|
+
import { i as WithoutWebsocket, n as HonoServerOptionsBase, r as WithWebsocket, t as createGetLoadContext } from "../helpers-CRb6zXJV.js";
|
|
2
2
|
import { ServerType } from "@hono/node-server";
|
|
3
3
|
import { ServeStaticOptions } from "@hono/node-server/serve-static";
|
|
4
4
|
import { Env, Hono } from "hono";
|
|
@@ -9,7 +9,6 @@ import { SecureServerOptions, ServerOptions as ServerOptions$1, createSecureServ
|
|
|
9
9
|
import { WebSocketServer } from "ws";
|
|
10
10
|
import { AddressInfo } from "node:net";
|
|
11
11
|
import { ServerOptions as ServerOptions$2, createServer as createServer$2 } from "node:https";
|
|
12
|
-
//#region src/types/node.https.d.ts
|
|
13
12
|
type createHttpOptions = {
|
|
14
13
|
serverOptions?: ServerOptions;
|
|
15
14
|
createServer?: typeof createServer;
|
|
@@ -27,8 +26,6 @@ type createSecureHttp2Options = {
|
|
|
27
26
|
createServer?: typeof createSecureServer;
|
|
28
27
|
};
|
|
29
28
|
type CreateNodeServerOptions = createHttpOptions | createHttpsOptions | createHttp2Options | createSecureHttp2Options;
|
|
30
|
-
//#endregion
|
|
31
|
-
//#region src/adapters/node.d.ts
|
|
32
29
|
interface HonoNodeServerOptions<E extends Env = BlankEnv> extends HonoServerOptionsBase<E> {
|
|
33
30
|
/**
|
|
34
31
|
* Listening listener (production mode only)
|
|
@@ -101,5 +98,4 @@ export type HonoServerOptions<E extends Env = BlankEnv> = HonoServerOptionsWithW
|
|
|
101
98
|
*/
|
|
102
99
|
export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithoutWebSocket<E>): Promise<Hono<E>>;
|
|
103
100
|
export declare function createHonoServer<E extends Env = BlankEnv>(options?: HonoServerOptionsWithWebSocket<E>): Promise<Hono<E>>;
|
|
104
|
-
//#endregion
|
|
105
101
|
export { createGetLoadContext };
|
package/dist/adapters/node.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { a as getBuildMode, i as createWebSocket, n as bindIncomingRequestSocketInfo, o as handleChromeDevToolsWorkspaceRequest, r as createGetLoadContext, s as importBuild, t as attachWebSocketToVite } from "../helpers-
|
|
1
|
+
import { a as getBuildMode, i as createWebSocket, n as bindIncomingRequestSocketInfo, o as handleChromeDevToolsWorkspaceRequest, r as createGetLoadContext, s as importBuild, t as attachWebSocketToVite } from "../helpers-Uej9XI0T.js";
|
|
2
2
|
import { cache } from "../middleware.js";
|
|
3
|
-
import { t as isReactRouterBuildRequest } from "../react-router-build-request-
|
|
4
|
-
import { i as viteGeneratedAssetsRoute, n as composeViteAssetRewriteRequestPath, t as classifyVitePublicPath } from "../vite-public-path-
|
|
3
|
+
import { t as isReactRouterBuildRequest } from "../react-router-build-request-B-_7C0qf.js";
|
|
4
|
+
import { i as viteGeneratedAssetsRoute, n as composeViteAssetRewriteRequestPath, t as classifyVitePublicPath } from "../vite-public-path-DxSldBPx.js";
|
|
5
5
|
import { serve } from "@hono/node-server";
|
|
6
6
|
import { serveStatic } from "@hono/node-server/serve-static";
|
|
7
7
|
import { Hono } from "hono";
|
|
8
8
|
import { createMiddleware } from "hono/factory";
|
|
9
9
|
import { logger } from "hono/logger";
|
|
10
10
|
import { createRequestHandler } from "react-router";
|
|
11
|
-
|
|
11
|
+
// src/adapters/node.ts
|
|
12
12
|
async function createHonoServer(options) {
|
|
13
13
|
const startTime = Date.now();
|
|
14
14
|
const build = await importBuild();
|
|
@@ -102,5 +102,4 @@ async function createHonoServer(options) {
|
|
|
102
102
|
} else if (attachWebSocketToVite(injectWebSocket, mergedOptions.onServe)) console.log("🚧 Dev server started");
|
|
103
103
|
return app;
|
|
104
104
|
}
|
|
105
|
-
//#endregion
|
|
106
105
|
export { createGetLoadContext, createHonoServer };
|
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { command, run } from "@drizzle-team/brocli";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
|
-
|
|
5
|
+
// src/cli.ts
|
|
6
6
|
const runtimeRegex = /runtime:\s*(['"])([^'"]*)\1/;
|
|
7
7
|
function guessRuntime() {
|
|
8
8
|
try {
|
|
@@ -38,5 +38,4 @@ const reveal = command({
|
|
|
38
38
|
subcommands: [file, folder]
|
|
39
39
|
});
|
|
40
40
|
run([reveal], { name: "React Router Hono Server CLI" });
|
|
41
|
-
//#endregion
|
|
42
41
|
export {};
|
package/dist/dev.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { DevServerOptions } from "@hono/vite-dev-server";
|
|
2
2
|
import { Plugin } from "vite";
|
|
3
|
-
//#region src/types/runtime.d.ts
|
|
4
3
|
type Runtime = "node" | "bun" | "cloudflare" | "aws" | "deno";
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/dev.d.ts
|
|
7
4
|
type ReactRouterHonoServerPluginOptionsBase = {
|
|
8
5
|
/**
|
|
9
6
|
* The path to the server file, relative to `vite.config.ts`.
|
|
@@ -45,4 +42,4 @@ type ReactRouterHonoServerPluginOptionsDefault = ReactRouterHonoServerPluginOpti
|
|
|
45
42
|
};
|
|
46
43
|
type ReactRouterHonoServerPluginOptions = ReactRouterHonoServerPluginOptionsDefault;
|
|
47
44
|
export declare function reactRouterHonoServer(options?: ReactRouterHonoServerPluginOptions): Plugin;
|
|
48
|
-
|
|
45
|
+
export {};
|
package/dist/dev.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as isReactRouterBuildRequest } from "./react-router-build-request-
|
|
2
|
-
import { a as vitePathnamePrefix, t as classifyVitePublicPath } from "./vite-public-path-
|
|
1
|
+
import { t as isReactRouterBuildRequest } from "./react-router-build-request-B-_7C0qf.js";
|
|
2
|
+
import { a as vitePathnamePrefix, t as classifyVitePublicPath } from "./vite-public-path-DxSldBPx.js";
|
|
3
3
|
import honoDevServer from "@hono/vite-dev-server";
|
|
4
4
|
import bunAdapter from "@hono/vite-dev-server/bun";
|
|
5
5
|
import nodeAdapter from "@hono/vite-dev-server/node";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { pathToFileURL } from "node:url";
|
|
9
|
-
|
|
9
|
+
// src/dev.ts
|
|
10
10
|
const REACT_ROUTER_SERVER_BUILD_MODULE_ID = "\0virtual:react-router/server-build";
|
|
11
11
|
const VIRTUAL_MODULE_ID = "\0virtual:react-router-hono-server/server";
|
|
12
12
|
function reactRouterHonoServer(options = {}) {
|
|
@@ -210,5 +210,4 @@ function findDefaultServerEntry(appDirectory) {
|
|
|
210
210
|
}
|
|
211
211
|
return VIRTUAL_MODULE_ID;
|
|
212
212
|
}
|
|
213
|
-
//#endregion
|
|
214
213
|
export { reactRouterHonoServer };
|
|
@@ -3,7 +3,6 @@ import { Context, Env, Hono } from "hono";
|
|
|
3
3
|
import { RouterContextProvider, ServerBuild } from "react-router";
|
|
4
4
|
import { UpgradeWebSocket } from "hono/ws";
|
|
5
5
|
import "ws";
|
|
6
|
-
//#region src/types/hono-server-options-base.d.ts
|
|
7
6
|
type ReactRouterHonoServerAppLoadContext = RouterContextProvider;
|
|
8
7
|
interface HonoServerOptionsBase<E extends Env> {
|
|
9
8
|
/**
|
|
@@ -84,8 +83,6 @@ interface WithoutWebsocket<E extends Env> {
|
|
|
84
83
|
*/
|
|
85
84
|
configure?: (app: Hono<E>) => Promise<void> | void;
|
|
86
85
|
}
|
|
87
|
-
//#endregion
|
|
88
|
-
//#region src/helpers.d.ts
|
|
89
86
|
/**
|
|
90
87
|
* Helper to create a getLoadContext function fully typed
|
|
91
88
|
*/
|
|
@@ -93,5 +90,4 @@ declare function createGetLoadContext(getLoadContext: HonoServerOptionsBase<Env>
|
|
|
93
90
|
build: ServerBuild;
|
|
94
91
|
mode: string;
|
|
95
92
|
}) => Promise<ReactRouterHonoServerAppLoadContext> | ReactRouterHonoServerAppLoadContext) | undefined;
|
|
96
|
-
//#endregion
|
|
97
93
|
export { WithoutWebsocket as i, HonoServerOptionsBase as n, WithWebsocket as r, createGetLoadContext as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createMiddleware } from "hono/factory";
|
|
2
|
-
|
|
2
|
+
// src/helpers.ts
|
|
3
3
|
const defaultWebSocket = {
|
|
4
4
|
upgradeWebSocket: (() => {}),
|
|
5
5
|
injectWebSocket: (server) => server
|
|
@@ -158,5 +158,4 @@ function createGetLoadContext(getLoadContext) {
|
|
|
158
158
|
function getBuildMode() {
|
|
159
159
|
return process.env.NODE_ENV === "development" ? "development" : "production";
|
|
160
160
|
}
|
|
161
|
-
//#endregion
|
|
162
161
|
export { getBuildMode as a, createWebSocket as i, bindIncomingRequestSocketInfo as n, handleChromeDevToolsWorkspaceRequest as o, createGetLoadContext as r, importBuild as s, attachWebSocketToVite as t };
|
package/dist/http.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Context } from "hono";
|
|
2
|
-
//#region src/http.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Redirect to a new location in a way that React Router can handle.
|
|
5
4
|
*
|
|
@@ -19,5 +18,4 @@ export declare function redirect(c: Context, location: string): Response;
|
|
|
19
18
|
*
|
|
20
19
|
* If the path ends with `.data` (React Router Single Fetch query), it will be removed.
|
|
21
20
|
*/
|
|
22
|
-
export declare function getPath(c: Context): string;
|
|
23
|
-
//#endregion
|
|
21
|
+
export declare function getPath(c: Context): string;
|
package/dist/http.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/http.ts
|
|
2
2
|
/**
|
|
3
3
|
* Redirect to a new location in a way that React Router can handle.
|
|
4
4
|
*
|
|
@@ -55,5 +55,4 @@ function redirect(c, location) {
|
|
|
55
55
|
function getPath(c) {
|
|
56
56
|
return c.req.path.replace(".data", "");
|
|
57
57
|
}
|
|
58
|
-
//#endregion
|
|
59
58
|
export { getPath, reactRouterRedirect, redirect };
|
package/dist/middleware.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
//#region src/middleware.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Cache middleware
|
|
4
3
|
*
|
|
5
4
|
* @param seconds - The number of seconds to cache
|
|
6
5
|
*/
|
|
7
|
-
export declare function cache(seconds: number): import("hono").MiddlewareHandler<any, string, {}, Response>;
|
|
8
|
-
//#endregion
|
|
6
|
+
export declare function cache(seconds: number): import("hono").MiddlewareHandler<any, string, {}, Response>;
|
package/dist/middleware.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createMiddleware } from "hono/factory";
|
|
2
|
-
|
|
2
|
+
// src/middleware.ts
|
|
3
3
|
/**
|
|
4
4
|
* Cache middleware
|
|
5
5
|
*
|
|
@@ -13,5 +13,4 @@ function cache(seconds) {
|
|
|
13
13
|
c.res.headers.set("cache-control", `public, max-age=${seconds}`);
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
//#endregion
|
|
17
16
|
export { cache };
|
package/dist/{react-router-build-request-_jlIVza5.js → react-router-build-request-B-_7C0qf.js}
RENAMED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// src/react-router-build-request.ts
|
|
2
2
|
/** Whether React Router is rendering a request as part of its build. */
|
|
3
3
|
function isReactRouterBuildRequest() {
|
|
4
4
|
return process.env.IS_RR_BUILD_REQUEST === "yes";
|
|
5
5
|
}
|
|
6
|
-
//#endregion
|
|
7
6
|
export { isReactRouterBuildRequest as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/vite-public-path.ts
|
|
2
2
|
function classifyVitePublicPath(raw) {
|
|
3
3
|
if (raw === "" || raw === "./") return {
|
|
4
4
|
kind: "relative",
|
|
@@ -55,5 +55,4 @@ function normalizeAbsolutePathname(pathname) {
|
|
|
55
55
|
const withLeadingSlash = pathname.startsWith("/") ? pathname : `/${pathname}`;
|
|
56
56
|
return withLeadingSlash === "/" ? "/" : `${withLeadingSlash.replace(/\/+$/, "")}/`;
|
|
57
57
|
}
|
|
58
|
-
//#endregion
|
|
59
58
|
export { vitePathnamePrefix as a, viteGeneratedAssetsRoute as i, composeViteAssetRewriteRequestPath as n, stripVitePathnamePrefix as r, classifyVitePublicPath as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-router-hono-server",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.6",
|
|
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": {
|
|
@@ -83,29 +83,29 @@
|
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@drizzle-team/brocli": "0.12.1",
|
|
86
|
-
"@hono/node-server": "2.1.
|
|
86
|
+
"@hono/node-server": "2.1.5",
|
|
87
87
|
"@hono/vite-dev-server": "0.26.1"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@arethetypeswrong/cli": "0.18.5",
|
|
91
91
|
"@changesets/changelog-github": "1.0.1",
|
|
92
92
|
"@changesets/cli": "3.0.3",
|
|
93
|
-
"@cloudflare/workers-types": "5.
|
|
94
|
-
"@playwright/test": "1.
|
|
95
|
-
"@types/bun": "1.4.
|
|
93
|
+
"@cloudflare/workers-types": "5.20261024.1",
|
|
94
|
+
"@playwright/test": "1.64.1",
|
|
95
|
+
"@types/bun": "1.4.4",
|
|
96
96
|
"@types/deno": "2.7.0",
|
|
97
|
-
"@types/node": "24.
|
|
97
|
+
"@types/node": "24.19.2",
|
|
98
98
|
"@types/react-dom": "19.3.0",
|
|
99
|
-
"@types/ws": "8.18.
|
|
100
|
-
"@vitest/coverage-v8": "
|
|
101
|
-
"hono": "4.13.
|
|
99
|
+
"@types/ws": "8.18.2",
|
|
100
|
+
"@vitest/coverage-v8": "5.0.5",
|
|
101
|
+
"hono": "4.13.13",
|
|
102
102
|
"npm-run-all": "4.1.5",
|
|
103
|
-
"publint": "0.3.
|
|
104
|
-
"react": "19.3.
|
|
105
|
-
"react-dom": "19.3.
|
|
106
|
-
"typescript": "
|
|
107
|
-
"vite-plus": "
|
|
108
|
-
"vitest": "
|
|
103
|
+
"publint": "0.3.25",
|
|
104
|
+
"react": "19.3.1",
|
|
105
|
+
"react-dom": "19.3.1",
|
|
106
|
+
"typescript": "7.0.2",
|
|
107
|
+
"vite-plus": "1.4.0",
|
|
108
|
+
"vitest": "5.0.5",
|
|
109
109
|
"ws": "8.22.0"
|
|
110
110
|
},
|
|
111
111
|
"peerDependencies": {
|