react-router-hono-server 1.0.0 → 1.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/dist/dev.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  // src/dev.ts
2
- import t from "@hono/vite-dev-server";
3
- var o = {
4
- entry: "app/entry.server.tsx",
5
- exportName: "server",
6
- appDirectory: "app",
7
- exclude: []
8
- };
9
- function p(r) {
10
- let e = { ...o, ...r };
11
- return t({
2
+ import o from "@hono/vite-dev-server";
3
+ function n(r) {
4
+ let t = r?.appDirectory || "app", e = {
5
+ entry: `${t}/entry.server.tsx`,
6
+ exportName: "server",
7
+ appDirectory: t,
8
+ exclude: [],
9
+ ...r
10
+ };
11
+ return o({
12
12
  injectClientScript: !1,
13
13
  entry: e.entry,
14
14
  // The file path of your server.
@@ -24,5 +24,5 @@ function p(r) {
24
24
  });
25
25
  }
26
26
  export {
27
- p as devServer
27
+ n as devServer
28
28
  };
package/dist/node.d.mts CHANGED
@@ -54,7 +54,7 @@ type HonoServerOptions<E extends Env = BlankEnv> = {
54
54
  *
55
55
  * See https://remix.run/docs/en/main/file-conventions/vite-config#serverbuildfile
56
56
  */
57
- serverBuildFile?: `${string}.js`;
57
+ serverBuildFile?: `${string}.js` | `${string}.mjs` | `${string}.cjs`;
58
58
  /**
59
59
  * The directory where the assets are located (defined in vite.config, build.assetsDir)
60
60
  *
package/dist/node.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  // src/node.ts
2
2
  import c from "node:path";
3
3
  import O from "node:url";
4
- import { serve as y } from "@hono/node-server";
4
+ import { serve as g } from "@hono/node-server";
5
5
  import { serveStatic as v } from "@hono/node-server/serve-static";
6
- import { Hono as g } from "hono";
6
+ import { Hono as y } from "hono";
7
7
  import { logger as E } from "hono/logger";
8
8
  import { remix as x } from "remix-hono/handler";
9
9
 
@@ -44,7 +44,7 @@ async function M(r = {}) {
44
44
  ...h,
45
45
  ...r,
46
46
  defaultLogger: r.defaultLogger ?? !0
47
- }, o = process.env.NODE_ENV === "test" ? "development" : process.env.NODE_ENV, n = o === "production", t = new g(e.honoOptions), d = `./${e.buildDirectory}/server`, s = `./${e.buildDirectory}/client`;
47
+ }, o = process.env.NODE_ENV === "test" ? "development" : process.env.NODE_ENV, n = o === "production", t = new y(e.honoOptions), d = `./${e.buildDirectory}/server`, s = `./${e.buildDirectory}/client`;
48
48
  return t.use(
49
49
  `/${e.assetsDir}/*`,
50
50
  i(60 * 60 * 24 * 365),
@@ -64,7 +64,7 @@ async function M(r = {}) {
64
64
  return e.getLoadContext ? e.getLoadContext(l, { build: p }) : {};
65
65
  }
66
66
  })(u, m);
67
- }), n && y(
67
+ }), n && g(
68
68
  {
69
69
  ...t,
70
70
  ...e.customNodeServer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-router-hono-server",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "This package includes helper function to create an Hono app in your entry.server.tsx file. It allows you to customize your server.",
5
5
  "exports": {
6
6
  "./node": {