@maiyunnet/kebab 7.6.2 → 7.6.3

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/doc/kebab-rag.md CHANGED
@@ -1385,7 +1385,7 @@ index/variables/VER.md
1385
1385
 
1386
1386
  # Variable: VER
1387
1387
 
1388
- > `const` **VER**: `"7.6.2"` = `'7.6.2'`
1388
+ > `const` **VER**: `"7.6.3"` = `'7.6.3'`
1389
1389
 
1390
1390
  Defined in: [index.ts:10](https://github.com/maiyunnet/kebab/blob/master/index.ts#L10)
1391
1391
 
package/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * --- 本文件用来定义每个目录实体地址的常量 ---
6
6
  */
7
7
  /** --- 当前系统版本号 --- */
8
- export declare const VER = "7.6.2";
8
+ export declare const VER = "7.6.3";
9
9
  /** --- 框架根目录,以 / 结尾 --- */
10
10
  export declare const ROOT_PATH: string;
11
11
  export declare const LIB_PATH: string;
package/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * --- 本文件用来定义每个目录实体地址的常量 ---
7
7
  */
8
8
  /** --- 当前系统版本号 --- */
9
- export const VER = '7.6.2';
9
+ export const VER = '7.6.3';
10
10
  // --- 服务端用的路径 ---
11
11
  const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
12
12
  /** --- /xxx/xxx --- */
package/lib/fs.js CHANGED
@@ -435,7 +435,12 @@ export async function readToResponse(path, req, res, stat) {
435
435
  // --- 判断缓存以及 MIME 和编码 ---
436
436
  let charset = '';
437
437
  const mimeData = mime.getData(path);
438
- if (['htm', 'html', 'css', 'js', 'xml', 'jpg', 'jpeg', 'svg', 'gif', 'png', 'json'].includes(mimeData.extension)) {
438
+ // --- 特殊路径 ---
439
+ if (path.endsWith('/+esm')) {
440
+ mimeData.mime = 'application/javascript';
441
+ mimeData.extension = 'js';
442
+ }
443
+ if (['htm', 'html', 'css', 'js', 'mjs', 'xml', 'jpg', 'jpeg', 'svg', 'gif', 'png', 'json'].includes(mimeData.extension)) {
439
444
  charset = '; charset=utf-8';
440
445
  // --- 这些文件可能需要缓存 ---
441
446
  const hash = `W/"${stat.size.toString(16)}-${stat.mtime.getTime().toString(16)}"`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maiyunnet/kebab",
3
- "version": "7.6.2",
3
+ "version": "7.6.3",
4
4
  "description": "Simple, easy-to-use, and fully-featured Node.js framework that is ready-to-use out of the box.",
5
5
  "type": "module",
6
6
  "keywords": [