honox 0.1.49 → 0.1.50

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.
@@ -2,7 +2,7 @@ import * as hono_types from 'hono/types';
2
2
  import * as hono_factory from 'hono/factory';
3
3
  import { Env, Hono } from 'hono';
4
4
 
5
- declare const createRoute: hono_factory.CreateHandlersInterface<Env, any>;
5
+ declare const createRoute: hono_factory.CreateHandlersInterface<Env, string>;
6
6
  declare const createHono: () => Hono<Env, hono_types.BlankSchema, "/">;
7
7
 
8
8
  export { createHono, createRoute };
@@ -94,7 +94,7 @@ const createApp = (options) => {
94
94
  if (rendererDefault) {
95
95
  subApp.use("*", rendererDefault);
96
96
  const rootPath2 = dir.replace(rootRegExp, "");
97
- const isRootLevel = !rootPath2.includes("/") || rootPath2 === "";
97
+ const isRootLevel = !rootPath2.includes("/");
98
98
  const isSimpleStructure = !Object.keys(content).some((f) => f.includes("/"));
99
99
  if (Object.keys(content).length > 0 && isRootLevel && isSimpleStructure) {
100
100
  subApp.use("/", rendererDefault);
@@ -127,7 +127,7 @@ const createApp = (options) => {
127
127
  const middlewareDir = middlewareFile.replace("/_middleware.tsx", "").replace("/_middleware.ts", "");
128
128
  const shouldApply = middlewareDir === dir || dir.startsWith(middlewareDir + "/");
129
129
  if (middleware.default && shouldApply) {
130
- subApp.use(...middleware.default);
130
+ subApp.use("/:*{.+}?", ...middleware.default);
131
131
  if (!appliedMiddlewaresByDirectory.has(dir)) {
132
132
  appliedMiddlewaresByDirectory.set(dir, /* @__PURE__ */ new Set());
133
133
  }
@@ -16,6 +16,7 @@ declare const defaultOptions: Options;
16
16
  declare const devServerDefaultOptions: {
17
17
  exclude: (string | RegExp)[];
18
18
  handleHotUpdate: () => undefined;
19
+ base: "" | `/${string}`;
19
20
  entry: string;
20
21
  export: string;
21
22
  injectClientScript: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "honox",
3
- "version": "0.1.49",
3
+ "version": "0.1.50",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -101,7 +101,7 @@
101
101
  "license": "MIT",
102
102
  "repository": {
103
103
  "type": "git",
104
- "url": "https://github.com/honojs/honox.git"
104
+ "url": "git+https://github.com/honojs/honox.git"
105
105
  },
106
106
  "publishConfig": {
107
107
  "registry": "https://registry.npmjs.org",
@@ -113,7 +113,7 @@
113
113
  "@babel/parser": "7.25.6",
114
114
  "@babel/traverse": "7.25.6",
115
115
  "@babel/types": "7.25.6",
116
- "@hono/vite-dev-server": "^0.20.1",
116
+ "@hono/vite-dev-server": "^0.23.0",
117
117
  "jsonc-parser": "3.3.1",
118
118
  "precinct": "12.2.0"
119
119
  },
@@ -133,8 +133,8 @@
133
133
  "@types/node": "^20.10.5",
134
134
  "eslint": "^9.23.0",
135
135
  "glob": "^10.3.10",
136
- "happy-dom": "^15.11.6",
137
- "hono": "4.4.13",
136
+ "happy-dom": "^20.0.10",
137
+ "hono": "^4.10.3",
138
138
  "np": "^10.2.0",
139
139
  "prettier": "^3.1.1",
140
140
  "publint": "^0.2.7",