@maiyunnet/kebab 9.26.0 → 9.26.1

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/README.md CHANGED
@@ -40,13 +40,6 @@ Ai, Buffer, Captcha, Consistent, Cookie, Core, Cron, Crypto, Db (MySQL, PostgreS
40
40
 
41
41
  Use Undici for new HTTP requests; Net remains available for compatibility with existing code.
42
42
 
43
- ## Documentation
44
-
45
- - [Quick start](doc/sc/quick-start.md)
46
- - [Cursor pagination and approximate totals in PostgreSQL](doc/sc/query-pagination.md)
47
- - [Performance monitoring and incident review](doc/sc/monitor.md)
48
- - [API reference](doc/sc/api/index.md)
49
-
50
43
  ## Selected features
51
44
 
52
45
  ### Ready to use
package/doc/kebab-rag.md CHANGED
@@ -1759,7 +1759,7 @@ index/variables/VER.md
1759
1759
 
1760
1760
  # Variable: VER
1761
1761
 
1762
- > `const` **VER**: `"9.26.0"` = `'9.26.0'`
1762
+ > `const` **VER**: `"9.26.1"` = `'9.26.1'`
1763
1763
 
1764
1764
  Defined in: [index.ts:9](https://github.com/maiyunnet/kebab/blob/master/index.ts#L9)
1765
1765
 
@@ -138278,7 +138278,7 @@ sys/route/functions/getFormData.md
138278
138278
 
138279
138279
  > **getFormData**(`req`, `events?`, `limits?`): `Promise`\<`false` \| \{ `files`: `Record`\<`string`, [`IPostFile`](../../../index/interfaces/IPostFile.md) \| [`IPostFile`](../../../index/interfaces/IPostFile.md)[]\>; `post`: `Record`\<`string`, [`Json`](../../../index/type-aliases/Json.md)\>; \}\>
138280
138280
 
138281
- Defined in: [sys/route.ts:1105](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1105)
138281
+ Defined in: [sys/route.ts:1104](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1104)
138282
138282
 
138283
138283
  获取 formdata 的 post
138284
138284
 
@@ -138321,7 +138321,7 @@ sys/route/functions/getPost.md
138321
138321
 
138322
138322
  > **getPost**(`req`): `Promise`\<`false` \| \{ `input`: `string`; `post`: `Record`\<`string`, `any`\>; `raw`: `Record`\<`string`, `any`\>; \}\>
138323
138323
 
138324
- Defined in: [sys/route.ts:940](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L940)
138324
+ Defined in: [sys/route.ts:939](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L939)
138325
138325
 
138326
138326
  获取 post 对象(通常已自动获取),如果是文件上传(formdata)的情况则不获取
138327
138327
 
@@ -138439,7 +138439,7 @@ sys/route/functions/unlinkUploadFiles.md
138439
138439
 
138440
138440
  > **unlinkUploadFiles**(`cctr`): `Promise`\<`void`\>
138441
138441
 
138442
- Defined in: [sys/route.ts:898](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L898)
138442
+ Defined in: [sys/route.ts:897](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L897)
138443
138443
 
138444
138444
  删除本次请求所有已上传的临时文件
138445
138445
 
@@ -138468,7 +138468,7 @@ sys/route/functions/waitCtr.md
138468
138468
 
138469
138469
  > **waitCtr**(`cctr`): `Promise`\<`void`\>
138470
138470
 
138471
- Defined in: [sys/route.ts:918](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L918)
138471
+ Defined in: [sys/route.ts:917](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L917)
138472
138472
 
138473
138473
  等待异步任务结束,并删除临时文件,如果结束后还有事务没关闭,则会在本函数中打印控制台并且写入 log 文件
138474
138474
  此时其实已经给客户端返回了,此处等待不消耗客户端的等待时间
@@ -138522,7 +138522,7 @@ sys/route/interfaces/IFormDataError.md
138522
138522
 
138523
138523
  # Interface: IFormDataError
138524
138524
 
138525
- Defined in: [sys/route.ts:1060](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1060)
138525
+ Defined in: [sys/route.ts:1059](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1059)
138526
138526
 
138527
138527
  解析上传数据时的失败原因,只提供错误码和限制值,不带临时路径或异常对象
138528
138528
 
@@ -138532,7 +138532,7 @@ Defined in: [sys/route.ts:1060](https://github.com/maiyunnet/kebab/blob/master/s
138532
138532
 
138533
138533
  > **code**: `"INVALID_BOUNDARY"` \| `"FILE_TOO_LARGE"` \| `"TOTAL_TOO_LARGE"` \| `"FIELD_TOO_LARGE"` \| `"HEADER_TOO_LARGE"` \| `"TOO_MANY_PARTS"` \| `"FILE_TYPE"` \| `"TIMEOUT"` \| `"TEMP_FILE_ERROR"` \| `"REQUEST_ERROR"` \| `"REQUEST_ABORTED"`
138534
138534
 
138535
- Defined in: [sys/route.ts:1061](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1061)
138535
+ Defined in: [sys/route.ts:1060](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1060)
138536
138536
 
138537
138537
  ***
138538
138538
 
@@ -138540,7 +138540,7 @@ Defined in: [sys/route.ts:1061](https://github.com/maiyunnet/kebab/blob/master/s
138540
138540
 
138541
138541
  > `optional` **limit?**: `number`
138542
138542
 
138543
- Defined in: [sys/route.ts:1065](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1065)
138543
+ Defined in: [sys/route.ts:1064](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1064)
138544
138544
 
138545
138545
  超出的限制值:大小用字节,超时用毫秒,字段和文件数量用个
138546
138546
 
@@ -138555,7 +138555,7 @@ sys/route/interfaces/IFormDataEvents.md
138555
138555
 
138556
138556
  # Interface: IFormDataEvents
138557
138557
 
138558
- Defined in: [sys/route.ts:1069](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1069)
138558
+ Defined in: [sys/route.ts:1068](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1068)
138559
138559
 
138560
138560
  multipart 文件处理及失败通知
138561
138561
 
@@ -138565,7 +138565,7 @@ multipart 文件处理及失败通知
138565
138565
 
138566
138566
  > `optional` **onerror?**: (`error`) => `void`
138567
138567
 
138568
- Defined in: [sys/route.ts:1077](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1077)
138568
+ Defined in: [sys/route.ts:1076](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1076)
138569
138569
 
138570
138570
  首次失败时调用一次,getFormData 返回 false;若连接已断开,可能无法回复客户端
138571
138571
 
@@ -138585,7 +138585,7 @@ Defined in: [sys/route.ts:1077](https://github.com/maiyunnet/kebab/blob/master/s
138585
138585
 
138586
138586
  > `optional` **onfiledata?**: (`chunk`) => `void`
138587
138587
 
138588
- Defined in: [sys/route.ts:1073](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1073)
138588
+ Defined in: [sys/route.ts:1072](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1072)
138589
138589
 
138590
138590
  文件上传时触发,仅 start 返回 true 时触发
138591
138591
 
@@ -138605,7 +138605,7 @@ Defined in: [sys/route.ts:1073](https://github.com/maiyunnet/kebab/blob/master/s
138605
138605
 
138606
138606
  > `optional` **onfileend?**: () => `void`
138607
138607
 
138608
- Defined in: [sys/route.ts:1075](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1075)
138608
+ Defined in: [sys/route.ts:1074](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1074)
138609
138609
 
138610
138610
  文件上传结束时触发,仅 start 返回 true 时触发
138611
138611
 
@@ -138619,7 +138619,7 @@ Defined in: [sys/route.ts:1075](https://github.com/maiyunnet/kebab/blob/master/s
138619
138619
 
138620
138620
  > `optional` **onfilestart?**: (`name`) => `boolean` \| `undefined`
138621
138621
 
138622
- Defined in: [sys/route.ts:1071](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1071)
138622
+ Defined in: [sys/route.ts:1070](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1070)
138623
138623
 
138624
138624
  文件开始上传时触发,返回 true 则跳过该文件的保存
138625
138625
 
@@ -138644,7 +138644,7 @@ sys/route/interfaces/IFormDataLimits.md
138644
138644
 
138645
138645
  # Interface: IFormDataLimits
138646
138646
 
138647
- Defined in: [sys/route.ts:1081](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1081)
138647
+ Defined in: [sys/route.ts:1080](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1080)
138648
138648
 
138649
138649
  multipart 上传限制
138650
138650
 
@@ -138654,7 +138654,7 @@ multipart 上传限制
138654
138654
 
138655
138655
  > `optional` **allowedExts?**: `string`[]
138656
138656
 
138657
- Defined in: [sys/route.ts:1085](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1085)
138657
+ Defined in: [sys/route.ts:1084](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1084)
138658
138658
 
138659
138659
  允许的文件扩展名(含点号),如 ['.jpg', '.png', '.pdf']
138660
138660
 
@@ -138664,7 +138664,7 @@ Defined in: [sys/route.ts:1085](https://github.com/maiyunnet/kebab/blob/master/s
138664
138664
 
138665
138665
  > `optional` **maxFieldSize?**: `number`
138666
138666
 
138667
- Defined in: [sys/route.ts:1087](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1087)
138667
+ Defined in: [sys/route.ts:1086](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1086)
138668
138668
 
138669
138669
  单个字段(非文件)最大字节数,默认 1 MB
138670
138670
 
@@ -138674,7 +138674,7 @@ Defined in: [sys/route.ts:1087](https://github.com/maiyunnet/kebab/blob/master/s
138674
138674
 
138675
138675
  > `optional` **maxFileSize?**: `number`
138676
138676
 
138677
- Defined in: [sys/route.ts:1083](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1083)
138677
+ Defined in: [sys/route.ts:1082](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1082)
138678
138678
 
138679
138679
  单个文件最大字节数
138680
138680
 
@@ -138684,7 +138684,7 @@ Defined in: [sys/route.ts:1083](https://github.com/maiyunnet/kebab/blob/master/s
138684
138684
 
138685
138685
  > `optional` **maxHeaderSize?**: `number`
138686
138686
 
138687
- Defined in: [sys/route.ts:1091](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1091)
138687
+ Defined in: [sys/route.ts:1090](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1090)
138688
138688
 
138689
138689
  每个字段或文件的 multipart 头部最多多少字节,默认 16 KB
138690
138690
 
@@ -138694,7 +138694,7 @@ Defined in: [sys/route.ts:1091](https://github.com/maiyunnet/kebab/blob/master/s
138694
138694
 
138695
138695
  > `optional` **maxParts?**: `number`
138696
138696
 
138697
- Defined in: [sys/route.ts:1093](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1093)
138697
+ Defined in: [sys/route.ts:1092](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1092)
138698
138698
 
138699
138699
  multipart 字段与文件总数量,默认 1000
138700
138700
 
@@ -138704,7 +138704,7 @@ multipart 字段与文件总数量,默认 1000
138704
138704
 
138705
138705
  > `optional` **maxTotalSize?**: `number`
138706
138706
 
138707
- Defined in: [sys/route.ts:1089](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1089)
138707
+ Defined in: [sys/route.ts:1088](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1088)
138708
138708
 
138709
138709
  整体请求最大字节数,不设置或设为 0 则不限制
138710
138710
 
@@ -138714,6 +138714,6 @@ Defined in: [sys/route.ts:1089](https://github.com/maiyunnet/kebab/blob/master/s
138714
138714
 
138715
138715
  > `optional` **timeout?**: `number`
138716
138716
 
138717
- Defined in: [sys/route.ts:1095](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1095)
138717
+ Defined in: [sys/route.ts:1094](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1094)
138718
138718
 
138719
138719
  整体请求超时时间(毫秒),默认 5 分钟,设为 0 禁用超时
package/index.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * --- 本文件用来定义每个目录实体地址的常量 ---
5
5
  */
6
6
  /** --- 当前系统版本号 --- */
7
- export declare const VER = "9.26.0";
7
+ export declare const VER = "9.26.1";
8
8
  /** --- 框架根目录,以 / 结尾 --- */
9
9
  export declare const ROOT_PATH: string;
10
10
  /** --- 框架的 LIB,以 / 结尾 --- */
package/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * --- 本文件用来定义每个目录实体地址的常量 ---
6
6
  */
7
7
  /** --- 当前系统版本号 --- */
8
- export const VER = '9.26.0';
8
+ export const VER = '9.26.1';
9
9
  // --- 服务端用的路径 ---
10
10
  const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
11
11
  /** --- /xxx/xxx --- */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maiyunnet/kebab",
3
- "version": "9.26.0",
3
+ "version": "9.26.1",
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": [
package/sys/route.js CHANGED
@@ -293,7 +293,6 @@ export async function run(data) {
293
293
  for (const key in data.req.headers) {
294
294
  setInputValue(headers, key.toLowerCase(), data.req.headers[key]);
295
295
  }
296
- headers['authorization'] ??= '';
297
296
  /** --- 开发者返回值 --- */
298
297
  let rtn;
299
298
  if (data.socket && (data.req instanceof http.IncomingMessage)) {