@wooksjs/http-static 0.7.9 → 0.7.10

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/index.cjs CHANGED
@@ -1261,7 +1261,10 @@ async function serveFile(filePath, options = {}) {
1261
1261
  } catch {
1262
1262
  if (options.defaultExt) {
1263
1263
  const ext = path.default.extname(filePath);
1264
- if (!ext) return serveFile(`${filePath}.${options.defaultExt}`);
1264
+ if (!ext) return serveFile(`${filePath}.${options.defaultExt}`, {
1265
+ ...options,
1266
+ defaultExt: void 0
1267
+ });
1265
1268
  }
1266
1269
  throw new __wooksjs_event_http.HttpError(404);
1267
1270
  }
package/dist/index.mjs CHANGED
@@ -1238,7 +1238,10 @@ async function serveFile(filePath, options = {}) {
1238
1238
  } catch {
1239
1239
  if (options.defaultExt) {
1240
1240
  const ext = path.extname(filePath);
1241
- if (!ext) return serveFile(`${filePath}.${options.defaultExt}`);
1241
+ if (!ext) return serveFile(`${filePath}.${options.defaultExt}`, {
1242
+ ...options,
1243
+ defaultExt: void 0
1244
+ });
1242
1245
  }
1243
1246
  throw new HttpError(404);
1244
1247
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wooksjs/http-static",
3
- "version": "0.7.9",
3
+ "version": "0.7.10",
4
4
  "description": "@wooksjs/http-static",
5
5
  "keywords": [
6
6
  "api",
@@ -42,10 +42,10 @@
42
42
  "devDependencies": {
43
43
  "typescript": "^5.9.3",
44
44
  "vitest": "^3.2.4",
45
- "@wooksjs/event-http": "^0.7.9"
45
+ "@wooksjs/event-http": "^0.7.10"
46
46
  },
47
47
  "peerDependencies": {
48
- "@wooksjs/event-http": "^0.7.9"
48
+ "@wooksjs/event-http": "^0.7.10"
49
49
  },
50
50
  "scripts": {
51
51
  "build": "rolldown -c ../../rolldown.config.mjs"