@maiyunnet/kebab 9.18.2 → 9.19.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/doc/kebab-rag.md CHANGED
@@ -1438,7 +1438,7 @@ index/variables/VER.md
1438
1438
 
1439
1439
  # Variable: VER
1440
1440
 
1441
- > `const` **VER**: `"9.18.2"` = `'9.18.2'`
1441
+ > `const` **VER**: `"9.19.1"` = `'9.19.1'`
1442
1442
 
1443
1443
  Defined in: [index.ts:10](https://github.com/maiyunnet/kebab/blob/master/index.ts#L10)
1444
1444
 
@@ -132498,7 +132498,7 @@ sys/ctr/classes/Ctr.md
132498
132498
 
132499
132499
  # Class: Ctr
132500
132500
 
132501
- Defined in: [sys/ctr.ts:123](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L123)
132501
+ Defined in: [sys/ctr.ts:142](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L142)
132502
132502
 
132503
132503
  ## Constructors
132504
132504
 
@@ -132506,7 +132506,7 @@ Defined in: [sys/ctr.ts:123](https://github.com/maiyunnet/kebab/blob/master/sys/
132506
132506
 
132507
132507
  > **new Ctr**(`config`, `req`, `res?`): `Ctr`
132508
132508
 
132509
- Defined in: [sys/ctr.ts:185](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L185)
132509
+ Defined in: [sys/ctr.ts:204](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L204)
132510
132510
 
132511
132511
  #### Parameters
132512
132512
 
@@ -132532,7 +132532,7 @@ Defined in: [sys/ctr.ts:185](https://github.com/maiyunnet/kebab/blob/master/sys/
132532
132532
 
132533
132533
  > `protected` **\_action**: `string` = `''`
132534
132534
 
132535
- Defined in: [sys/ctr.ts:129](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L129)
132535
+ Defined in: [sys/ctr.ts:148](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L148)
132536
132536
 
132537
132537
  当前的 action 名
132538
132538
 
@@ -132542,7 +132542,7 @@ Defined in: [sys/ctr.ts:129](https://github.com/maiyunnet/kebab/blob/master/sys/
132542
132542
 
132543
132543
  > `protected` **\_cacheTTL**: `number`
132544
132544
 
132545
- Defined in: [sys/ctr.ts:159](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L159)
132545
+ Defined in: [sys/ctr.ts:178](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L178)
132546
132546
 
132547
132547
  页面浏览器客户端缓存(单位:秒)
132548
132548
 
@@ -132552,7 +132552,7 @@ Defined in: [sys/ctr.ts:159](https://github.com/maiyunnet/kebab/blob/master/sys/
132552
132552
 
132553
132553
  > `protected` `readonly` **\_config**: [`IConfig`](../../../index/interfaces/IConfig.md)
132554
132554
 
132555
- Defined in: [sys/ctr.ts:171](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L171)
132555
+ Defined in: [sys/ctr.ts:190](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L190)
132556
132556
 
132557
132557
  vhost 的 kebab.json 以及全局常量
132558
132558
 
@@ -132562,7 +132562,7 @@ vhost 的 kebab.json 以及全局常量
132562
132562
 
132563
132563
  > `protected` **\_cookie**: `Record`\<`string`, `string`\> = `{}`
132564
132564
 
132565
- Defined in: [sys/ctr.ts:150](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L150)
132565
+ Defined in: [sys/ctr.ts:169](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L169)
132566
132566
 
132567
132567
  Cookie 数组
132568
132568
 
@@ -132572,7 +132572,7 @@ Cookie 数组
132572
132572
 
132573
132573
  > `protected` **\_files**: `Record`\<`string`, [`IPostFile`](../../../index/interfaces/IPostFile.md) \| [`IPostFile`](../../../index/interfaces/IPostFile.md)[]\> = `{}`
132574
132574
 
132575
- Defined in: [sys/ctr.ts:147](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L147)
132575
+ Defined in: [sys/ctr.ts:166](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L166)
132576
132576
 
132577
132577
  上传的文件列表
132578
132578
 
@@ -132582,7 +132582,7 @@ Defined in: [sys/ctr.ts:147](https://github.com/maiyunnet/kebab/blob/master/sys/
132582
132582
 
132583
132583
  > `protected` **\_get**: `Record`\<`string`, `string`\>
132584
132584
 
132585
- Defined in: [sys/ctr.ts:135](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L135)
132585
+ Defined in: [sys/ctr.ts:154](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L154)
132586
132586
 
132587
132587
  GET 数据
132588
132588
 
@@ -132592,7 +132592,7 @@ GET 数据
132592
132592
 
132593
132593
  > `protected` **\_headers**: `IncomingHttpHeaders` = `{}`
132594
132594
 
132595
- Defined in: [sys/ctr.ts:132](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L132)
132595
+ Defined in: [sys/ctr.ts:151](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L151)
132596
132596
 
132597
132597
  请求的 header 列表,key 均为小写
132598
132598
 
@@ -132602,7 +132602,7 @@ Defined in: [sys/ctr.ts:132](https://github.com/maiyunnet/kebab/blob/master/sys/
132602
132602
 
132603
132603
  > `protected` **\_httpCode**: `number` = `0`
132604
132604
 
132605
- Defined in: [sys/ctr.ts:165](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L165)
132605
+ Defined in: [sys/ctr.ts:184](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L184)
132606
132606
 
132607
132607
  自定义 http code
132608
132608
 
@@ -132612,7 +132612,7 @@ Defined in: [sys/ctr.ts:165](https://github.com/maiyunnet/kebab/blob/master/sys/
132612
132612
 
132613
132613
  > `protected` **\_input**: `string` = `''`
132614
132614
 
132615
- Defined in: [sys/ctr.ts:144](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L144)
132615
+ Defined in: [sys/ctr.ts:163](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L163)
132616
132616
 
132617
132617
  原始 input 字符串
132618
132618
 
@@ -132622,7 +132622,7 @@ Defined in: [sys/ctr.ts:144](https://github.com/maiyunnet/kebab/blob/master/sys/
132622
132622
 
132623
132623
  > `protected` **\_locale**: `string` = `'en'`
132624
132624
 
132625
- Defined in: [sys/ctr.ts:168](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L168)
132625
+ Defined in: [sys/ctr.ts:187](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L187)
132626
132626
 
132627
132627
  当前语言名
132628
132628
 
@@ -132632,7 +132632,7 @@ Defined in: [sys/ctr.ts:168](https://github.com/maiyunnet/kebab/blob/master/sys/
132632
132632
 
132633
132633
  > `protected` **\_localeData**: `Record`\<`string`, `Record`\<`string`, `string`\>\> = `{}`
132634
132634
 
132635
- Defined in: [sys/ctr.ts:183](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L183)
132635
+ Defined in: [sys/ctr.ts:202](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L202)
132636
132636
 
132637
132637
  本 ctr 的 locale data
132638
132638
 
@@ -132642,7 +132642,7 @@ Defined in: [sys/ctr.ts:183](https://github.com/maiyunnet/kebab/blob/master/sys/
132642
132642
 
132643
132643
  > `protected` **\_localeFiles**: `string`[] = `[]`
132644
132644
 
132645
- Defined in: [sys/ctr.ts:180](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L180)
132645
+ Defined in: [sys/ctr.ts:199](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L199)
132646
132646
 
132647
132647
  本 ctr 已加载的语言文件列表
132648
132648
 
@@ -132652,7 +132652,7 @@ Defined in: [sys/ctr.ts:180](https://github.com/maiyunnet/kebab/blob/master/sys/
132652
132652
 
132653
132653
  > `protected` **\_param**: `string`[] = `[]`
132654
132654
 
132655
- Defined in: [sys/ctr.ts:126](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L126)
132655
+ Defined in: [sys/ctr.ts:145](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L145)
132656
132656
 
132657
132657
  路由参数序列数组
132658
132658
 
@@ -132662,7 +132662,7 @@ Defined in: [sys/ctr.ts:126](https://github.com/maiyunnet/kebab/blob/master/sys/
132662
132662
 
132663
132663
  > `protected` **\_post**: `Record`\<`string`, [`Json`](../../../index/type-aliases/Json.md)\> = `{}`
132664
132664
 
132665
- Defined in: [sys/ctr.ts:141](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L141)
132665
+ Defined in: [sys/ctr.ts:160](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L160)
132666
132666
 
132667
132667
  POST 数据
132668
132668
 
@@ -132672,7 +132672,7 @@ POST 数据
132672
132672
 
132673
132673
  > `protected` **\_rawPost**: `Record`\<`string`, [`Json`](../../../index/type-aliases/Json.md)\> = `{}`
132674
132674
 
132675
- Defined in: [sys/ctr.ts:138](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L138)
132675
+ Defined in: [sys/ctr.ts:157](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L157)
132676
132676
 
132677
132677
  原始 POST 数据
132678
132678
 
@@ -132682,7 +132682,7 @@ Defined in: [sys/ctr.ts:138](https://github.com/maiyunnet/kebab/blob/master/sys/
132682
132682
 
132683
132683
  > `protected` `readonly` **\_req**: `IncomingMessage` \| `Http2ServerRequest`
132684
132684
 
132685
- Defined in: [sys/ctr.ts:173](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L173)
132685
+ Defined in: [sys/ctr.ts:192](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L192)
132686
132686
 
132687
132687
  ***
132688
132688
 
@@ -132690,7 +132690,7 @@ Defined in: [sys/ctr.ts:173](https://github.com/maiyunnet/kebab/blob/master/sys/
132690
132690
 
132691
132691
  > `protected` `readonly` **\_res**: `Http2ServerResponse`\<`Http2ServerRequest`\> \| `ServerResponse`\<`IncomingMessage`\>
132692
132692
 
132693
- Defined in: [sys/ctr.ts:175](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L175)
132693
+ Defined in: [sys/ctr.ts:194](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L194)
132694
132694
 
132695
132695
  ***
132696
132696
 
@@ -132698,7 +132698,7 @@ Defined in: [sys/ctr.ts:175](https://github.com/maiyunnet/kebab/blob/master/sys/
132698
132698
 
132699
132699
  > `protected` **\_sess**: [`Session`](../../../lib/session/classes/Session.md) \| `null` = `null`
132700
132700
 
132701
- Defined in: [sys/ctr.ts:156](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L156)
132701
+ Defined in: [sys/ctr.ts:175](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L175)
132702
132702
 
132703
132703
  Session --- 对象
132704
132704
 
@@ -132708,7 +132708,7 @@ Session --- 对象
132708
132708
 
132709
132709
  > `protected` **\_session**: `Record`\<`string`, `any`\> = `{}`
132710
132710
 
132711
- Defined in: [sys/ctr.ts:153](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L153)
132711
+ Defined in: [sys/ctr.ts:172](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L172)
132712
132712
 
132713
132713
  Session 数组
132714
132714
 
@@ -132718,7 +132718,7 @@ Session 数组
132718
132718
 
132719
132719
  > `protected` `readonly` **\_socket**: [`Socket`](../../../lib/ws/classes/Socket.md)
132720
132720
 
132721
- Defined in: [sys/ctr.ts:177](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L177)
132721
+ Defined in: [sys/ctr.ts:196](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L196)
132722
132722
 
132723
132723
  ***
132724
132724
 
@@ -132726,7 +132726,7 @@ Defined in: [sys/ctr.ts:177](https://github.com/maiyunnet/kebab/blob/master/sys/
132726
132726
 
132727
132727
  > `protected` `optional` **\_timer?**: `object`
132728
132728
 
132729
- Defined in: [sys/ctr.ts:210](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L210)
132729
+ Defined in: [sys/ctr.ts:229](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L229)
132730
132730
 
132731
132731
  timeout 的 timer
132732
132732
 
@@ -132752,7 +132752,7 @@ timeout 的 timer
132752
132752
 
132753
132753
  > `protected` **\_xsrf**: `string` = `''`
132754
132754
 
132755
- Defined in: [sys/ctr.ts:162](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L162)
132755
+ Defined in: [sys/ctr.ts:181](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L181)
132756
132756
 
132757
132757
  XSRF TOKEN 值
132758
132758
 
@@ -132764,7 +132764,7 @@ XSRF TOKEN 值
132764
132764
 
132765
132765
  > **get** `protected` **\_isAvail**(): `boolean`
132766
132766
 
132767
- Defined in: [sys/ctr.ts:199](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L199)
132767
+ Defined in: [sys/ctr.ts:218](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L218)
132768
132768
 
132769
132769
  当前用户连接是否还在连接中
132770
132770
 
@@ -132780,7 +132780,7 @@ Defined in: [sys/ctr.ts:199](https://github.com/maiyunnet/kebab/blob/master/sys/
132780
132780
 
132781
132781
  > **get** **timeout**(): `number`
132782
132782
 
132783
- Defined in: [sys/ctr.ts:217](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L217)
132783
+ Defined in: [sys/ctr.ts:236](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L236)
132784
132784
 
132785
132785
  获取当前过期时间(毫秒)
132786
132786
 
@@ -132792,7 +132792,7 @@ Defined in: [sys/ctr.ts:217](https://github.com/maiyunnet/kebab/blob/master/sys/
132792
132792
 
132793
132793
  > **set** **timeout**(`num`): `void`
132794
132794
 
132795
- Defined in: [sys/ctr.ts:224](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L224)
132795
+ Defined in: [sys/ctr.ts:243](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L243)
132796
132796
 
132797
132797
  设置当前过期时间(毫秒)
132798
132798
 
@@ -132812,7 +132812,7 @@ Defined in: [sys/ctr.ts:224](https://github.com/maiyunnet/kebab/blob/master/sys/
132812
132812
 
132813
132813
  > `protected` **\_asyncTask**(`func`): `void`
132814
132814
 
132815
- Defined in: [sys/ctr.ts:258](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L258)
132815
+ Defined in: [sys/ctr.ts:277](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L277)
132816
132816
 
132817
132817
  执行一段跳出堆栈的异步代码,代码执行完成前,热更新不会杀死当面进程 且 ftmp 临时文件不会被清除
132818
132818
 
@@ -132834,7 +132834,7 @@ Defined in: [sys/ctr.ts:258](https://github.com/maiyunnet/kebab/blob/master/sys/
132834
132834
 
132835
132835
  > `protected` **\_checkInput**(`input`, `rule`, `rtn`): `boolean`
132836
132836
 
132837
- Defined in: [sys/ctr.ts:799](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L799)
132837
+ Defined in: [sys/ctr.ts:720](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L720)
132838
132838
 
132839
132839
  检测提交的数据类型
132840
132840
 
@@ -132868,7 +132868,7 @@ Defined in: [sys/ctr.ts:799](https://github.com/maiyunnet/kebab/blob/master/sys/
132868
132868
 
132869
132869
  > `protected` **\_checkXInput**(`input`, `rule`, `rtn`, `ignore?`): `boolean`
132870
132870
 
132871
- Defined in: [sys/ctr.ts:978](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L978)
132871
+ Defined in: [sys/ctr.ts:899](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L899)
132872
132872
 
132873
132873
  检测提交的数据类型(会检测 XSRF)
132874
132874
 
@@ -132908,7 +132908,7 @@ Defined in: [sys/ctr.ts:978](https://github.com/maiyunnet/kebab/blob/master/sys/
132908
132908
 
132909
132909
  > `protected` **\_cross**(`opt?`): `boolean`
132910
132910
 
132911
- Defined in: [sys/ctr.ts:1213](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1213)
132911
+ Defined in: [sys/ctr.ts:1136](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1136)
132912
132912
 
132913
132913
  开启跨域请求
132914
132914
 
@@ -132953,7 +132953,7 @@ Defined in: [sys/ctr.ts:1213](https://github.com/maiyunnet/kebab/blob/master/sys
132953
132953
 
132954
132954
  > `protected` **\_device**(): `"unknown"` \| `"android"` \| `"linux"` \| `"windows"` \| `"macintosh"` \| `"ipad"`
132955
132955
 
132956
- Defined in: [sys/ctr.ts:1023](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1023)
132956
+ Defined in: [sys/ctr.ts:944](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L944)
132957
132957
 
132958
132958
  根据用户 ua 获取当前用户的设备类型
132959
132959
 
@@ -132967,7 +132967,7 @@ Defined in: [sys/ctr.ts:1023](https://github.com/maiyunnet/kebab/blob/master/sys
132967
132967
 
132968
132968
  > `protected` **\_enabledXsrf**(`opt?`): `void`
132969
132969
 
132970
- Defined in: [sys/ctr.ts:992](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L992)
132970
+ Defined in: [sys/ctr.ts:913](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L913)
132971
132971
 
132972
132972
  当前页面开启 XSRF 支持(主要检测 cookie 是否存在)
132973
132973
  如果当前页面有 CDN,请不要使用
@@ -132990,7 +132990,7 @@ Defined in: [sys/ctr.ts:992](https://github.com/maiyunnet/kebab/blob/master/sys/
132990
132990
 
132991
132991
  > `protected` **\_end**(`code?`, `reason?`): `void`
132992
132992
 
132993
- Defined in: [sys/ctr.ts:1323](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1323)
132993
+ Defined in: [sys/ctr.ts:1246](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1246)
132994
132994
 
132995
132995
  主动关闭当前 socket 连接
132996
132996
 
@@ -133018,7 +133018,7 @@ WebSocket 关闭码
133018
133018
 
133019
133019
  > `protected` **\_getBasicAuth**(`user`, `pwd`): `string`
133020
133020
 
133021
- Defined in: [sys/ctr.ts:1016](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1016)
133021
+ Defined in: [sys/ctr.ts:937](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L937)
133022
133022
 
133023
133023
  获取 Auth 字符串,用于客户端提交
133024
133024
 
@@ -133046,7 +133046,7 @@ Defined in: [sys/ctr.ts:1016](https://github.com/maiyunnet/kebab/blob/master/sys
133046
133046
 
133047
133047
  > `protected` **\_getLocale**(): `string`
133048
133048
 
133049
- Defined in: [sys/ctr.ts:1204](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1204)
133049
+ Defined in: [sys/ctr.ts:1127](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1127)
133050
133050
 
133051
133051
  获取当前语言名
133052
133052
 
@@ -133060,7 +133060,7 @@ Defined in: [sys/ctr.ts:1204](https://github.com/maiyunnet/kebab/blob/master/sys
133060
133060
 
133061
133061
  > `protected` **\_getLocaleJsonString**(): `string`
133062
133062
 
133063
- Defined in: [sys/ctr.ts:1192](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1192)
133063
+ Defined in: [sys/ctr.ts:1115](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1115)
133064
133064
 
133065
133065
  根据当前后台语言包设置情况获取 JSON 字符串传输到前台
133066
133066
 
@@ -133076,7 +133076,7 @@ string
133076
133076
 
133077
133077
  > `protected` **\_getMemoryUsage**(): `number`
133078
133078
 
133079
- Defined in: [sys/ctr.ts:408](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L408)
133079
+ Defined in: [sys/ctr.ts:427](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L427)
133080
133080
 
133081
133081
  获取截止当前内存的使用情况
133082
133082
 
@@ -133090,7 +133090,7 @@ Defined in: [sys/ctr.ts:408](https://github.com/maiyunnet/kebab/blob/master/sys/
133090
133090
 
133091
133091
  > `protected` **\_getRunTime**(`ms?`): `number`
133092
133092
 
133093
- Defined in: [sys/ctr.ts:400](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L400)
133093
+ Defined in: [sys/ctr.ts:419](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L419)
133094
133094
 
133095
133095
  获取截止当前时间的总运行时间
133096
133096
 
@@ -133112,7 +133112,7 @@ Defined in: [sys/ctr.ts:400](https://github.com/maiyunnet/kebab/blob/master/sys/
133112
133112
 
133113
133113
  > `protected` **\_handleFormData**(`events?`, `limits?`): `Promise`\<`boolean`\>
133114
133114
 
133115
- Defined in: [sys/ctr.ts:1332](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1332)
133115
+ Defined in: [sys/ctr.ts:1255](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1255)
133116
133116
 
133117
133117
  获取 formdata 的信息
133118
133118
 
@@ -133190,7 +133190,7 @@ multipart 字段与文件总数量,默认 1000
133190
133190
 
133191
133191
  > **\_l**(`key`, `data?`): `string`
133192
133192
 
133193
- Defined in: [sys/ctr.ts:1256](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1256)
133193
+ Defined in: [sys/ctr.ts:1179](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1179)
133194
133194
 
133195
133195
  获取语言包值
133196
133196
 
@@ -133216,7 +133216,7 @@ Defined in: [sys/ctr.ts:1256](https://github.com/maiyunnet/kebab/blob/master/sys
133216
133216
 
133217
133217
  > `protected` **\_loadData**\<`T`\>(`path`): `Promise`\<`false` \| `T` \| `null`\>
133218
133218
 
133219
- Defined in: [sys/ctr.ts:1092](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1092)
133219
+ Defined in: [sys/ctr.ts:1013](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1013)
133220
133220
 
133221
133221
  获取 data JSON 数据
133222
133222
 
@@ -133244,7 +133244,7 @@ Defined in: [sys/ctr.ts:1092](https://github.com/maiyunnet/kebab/blob/master/sys
133244
133244
 
133245
133245
  > `protected` **\_loadLocale**(`loc`, `pkg?`): `Promise`\<`boolean`\>
133246
133246
 
133247
- Defined in: [sys/ctr.ts:1143](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1143)
133247
+ Defined in: [sys/ctr.ts:1066](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1066)
133248
133248
 
133249
133249
  设定语言并加载语言包
133250
133250
 
@@ -133272,11 +133272,11 @@ Defined in: [sys/ctr.ts:1143](https://github.com/maiyunnet/kebab/blob/master/sys
133272
133272
 
133273
133273
  > `protected` **\_loadReactPage**(`path`, `props?`, `opt?`): `Promise`\<`string`\>
133274
133274
 
133275
- Defined in: [sys/ctr.ts:444](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L444)
133275
+ Defined in: [sys/ctr.ts:463](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L463)
133276
133276
 
133277
133277
  加载 React 全页面进行 SSR 渲染,组件需渲染完整 HTML 文档(含 html/head/body),无需 EJS
133278
133278
  框架自动注入 props:_urlBase/_urlFull/_urlStc/_staticVer/_staticPath/_staticPathFull
133279
- 多语言:自动注入 _locale(当前语言名)和 _localeData(已载语言包的合并键值对)
133279
+ 多语言:自动注入 _locale(当前语言名)和 _localeData(当前语种已载语言包的合并键值对)
133280
133280
  组件内创建:const l = (key: string, ...args: string[]): string => { let i = 0; return (_localeData[key] ?? key).replace(/\?/g, () => args[i++] ?? ''); };
133281
133281
 
133282
133282
  #### Parameters
@@ -133295,41 +133295,9 @@ Defined in: [sys/ctr.ts:444](https://github.com/maiyunnet/kebab/blob/master/sys/
133295
133295
 
133296
133296
  ##### opt?
133297
133297
 
133298
- 可选配置
133299
-
133300
- ###### hydrate?
133301
-
133302
- `boolean`
133303
-
133304
- 是否注入客户端水合脚本(import map + hydrateRoot),默认 true
133305
-
133306
- ###### reactVer?
133307
-
133308
- `string`
133309
-
133310
- react/react-dom/react-router-dom 版本号,用于 esm.sh CDN,默认 19
133311
-
133312
- ###### router?
133313
-
133314
- `"browser"`
133315
-
133316
- 路由模式,不传则不注入任何 Router,组件自行管理路由(如 MemoryRouter)或无路由
133317
- 'browser':服务端用 StaticRouter,客户端用 BrowserRouter,地址栏与路由联动
133318
- 组件本身只需使用 Routes/Route/Link 等,不要包含任何 Router 包裹层
133319
-
133320
- ###### routerBase?
133321
-
133322
- `string`
133323
-
133324
- BrowserRouter 的 basename,相对于 urlBase,默认空字符串
133325
- 例如组件挂载在 /test/react-router-page,则填 'test/react-router-page'
133326
-
133327
- ###### staticPath?
133328
-
133329
- `string`
133298
+ [`IReactPageOptions`](../interfaces/IReactPageOptions.md) = `{}`
133330
133299
 
133331
- 静态资源基础路径,覆盖 config.set.staticPath,用于指定 CDN 或自定义路径
133332
- 影响 _staticPath prop 以及水合脚本中 JS 文件的 URL 前缀
133300
+ 可选配置
133333
133301
 
133334
133302
  #### Returns
133335
133303
 
@@ -133341,7 +133309,7 @@ BrowserRouter 的 basename,相对于 urlBase,默认空字符串
133341
133309
 
133342
133310
  > `protected` **\_loadView**(`path`, `data?`): `Promise`\<`string`\>
133343
133311
 
133344
- Defined in: [sys/ctr.ts:417](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L417)
133312
+ Defined in: [sys/ctr.ts:436](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L436)
133345
133313
 
133346
133314
  加载视图
133347
133315
 
@@ -133363,11 +133331,11 @@ Defined in: [sys/ctr.ts:417](https://github.com/maiyunnet/kebab/blob/master/sys/
133363
133331
 
133364
133332
  ### \_location()
133365
133333
 
133366
- > `protected` **\_location**(`location`): `false`
133334
+ > `protected` **\_location**(`location`, `httpCode?`): `false`
133367
133335
 
133368
- Defined in: [sys/ctr.ts:1113](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1113)
133336
+ Defined in: [sys/ctr.ts:1035](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1035)
133369
133337
 
133370
- 跳转(302临时跳转),支持相对本项目根路径的路径或绝对路径
133338
+ 跳转,支持相对本项目根路径的路径或绝对路径
133371
133339
 
133372
133340
  #### Parameters
133373
133341
 
@@ -133377,6 +133345,12 @@ Defined in: [sys/ctr.ts:1113](https://github.com/maiyunnet/kebab/blob/master/sys
133377
133345
 
133378
133346
  相对或绝对网址
133379
133347
 
133348
+ ##### httpCode?
133349
+
133350
+ [`TRedirectHttpCode`](../type-aliases/TRedirectHttpCode.md) = `302`
133351
+
133352
+ HTTP 重定向状态码,默认 302
133353
+
133380
133354
  #### Returns
133381
133355
 
133382
133356
  `false`
@@ -133387,7 +133361,7 @@ Defined in: [sys/ctr.ts:1113](https://github.com/maiyunnet/kebab/blob/master/sys
133387
133361
 
133388
133362
  > `protected` **\_ping**(`data?`): `boolean`
133389
133363
 
133390
- Defined in: [sys/ctr.ts:1306](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1306)
133364
+ Defined in: [sys/ctr.ts:1229](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1229)
133391
133365
 
133392
133366
  发送 socket ping
133393
133367
 
@@ -133409,7 +133383,7 @@ Defined in: [sys/ctr.ts:1306](https://github.com/maiyunnet/kebab/blob/master/sys
133409
133383
 
133410
133384
  > `protected` **\_pong**(`data?`): `boolean`
133411
133385
 
133412
- Defined in: [sys/ctr.ts:1314](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1314)
133386
+ Defined in: [sys/ctr.ts:1237](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1237)
133413
133387
 
133414
133388
  发送 socket pong
133415
133389
 
@@ -133431,7 +133405,7 @@ Defined in: [sys/ctr.ts:1314](https://github.com/maiyunnet/kebab/blob/master/sys
133431
133405
 
133432
133406
  > `protected` **\_startSession**(`link`, `auth?`, `opt?`): `Promise`\<`boolean`\>
133433
133407
 
133434
- Defined in: [sys/ctr.ts:1127](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1127)
133408
+ Defined in: [sys/ctr.ts:1050](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1050)
133435
133409
 
133436
133410
  开启 Session
133437
133411
 
@@ -133465,7 +133439,7 @@ Kv 或 Db 实例
133465
133439
 
133466
133440
  > `protected` **\_valibot**\<`TSchema`\>(`schema`, `input`, `options?`): [`TValibotResult`](../type-aliases/TValibotResult.md)\<`TSchema`\>
133467
133441
 
133468
- Defined in: [sys/ctr.ts:718](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L718)
133442
+ Defined in: [sys/ctr.ts:639](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L639)
133469
133443
 
133470
133444
  使用 Valibot schema 校验并解析输入,成功后 output 会自动推导类型
133471
133445
 
@@ -133507,7 +133481,7 @@ Valibot 配置和自定义客户端返回值
133507
133481
 
133508
133482
  > `protected` **\_valibotx**\<`TSchema`\>(`schema`, `input`, `options?`): [`TValibotResult`](../type-aliases/TValibotResult.md)\<`TSchema`, [`IValibotXsrfIssue`](../interfaces/IValibotXsrfIssue.md) \| [`InferIssue`](../../../lib/core/namespaces/v/type-aliases/InferIssue.md)\<`TSchema`\>\>
133509
133483
 
133510
- Defined in: [sys/ctr.ts:742](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L742)
133484
+ Defined in: [sys/ctr.ts:663](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L663)
133511
133485
 
133512
133486
  使用 Valibot schema 校验并解析输入,同时检测 XSRF
133513
133487
 
@@ -133549,7 +133523,7 @@ Valibot 配置、自定义客户端返回值和 XSRF 选项
133549
133523
 
133550
133524
  > `protected` **\_writeBinary**(`data`): `boolean`
133551
133525
 
133552
- Defined in: [sys/ctr.ts:1298](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1298)
133526
+ Defined in: [sys/ctr.ts:1221](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1221)
133553
133527
 
133554
133528
  发送 socket 二进制
133555
133529
 
@@ -133571,7 +133545,7 @@ Defined in: [sys/ctr.ts:1298](https://github.com/maiyunnet/kebab/blob/master/sys
133571
133545
 
133572
133546
  > `protected` **\_writeResult**(`data`): `boolean`
133573
133547
 
133574
- Defined in: [sys/ctr.ts:1290](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1290)
133548
+ Defined in: [sys/ctr.ts:1213](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1213)
133575
133549
 
133576
133550
  发送结果对象文本
133577
133551
 
@@ -133593,7 +133567,7 @@ Defined in: [sys/ctr.ts:1290](https://github.com/maiyunnet/kebab/blob/master/sys
133593
133567
 
133594
133568
  > `protected` **\_writeText**(`data`): `boolean`
133595
133569
 
133596
- Defined in: [sys/ctr.ts:1282](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1282)
133570
+ Defined in: [sys/ctr.ts:1205](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1205)
133597
133571
 
133598
133572
  发送 socket 文本
133599
133573
 
@@ -133615,7 +133589,7 @@ Defined in: [sys/ctr.ts:1282](https://github.com/maiyunnet/kebab/blob/master/sys
133615
133589
 
133616
133590
  > **getAuthorization**(): `false` \| \{ `pwd`: `string`; `type`: `"basic"`; `user`: `string`; \} \| \{ `token`: `string`; `type`: `"bearer"`; \}
133617
133591
 
133618
- Defined in: [sys/ctr.ts:1044](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1044)
133592
+ Defined in: [sys/ctr.ts:965](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L965)
133619
133593
 
133620
133594
  通过 header 或 _auth 获取鉴权信息,支持 Basic Auth 和 Bearer Token
133621
133595
 
@@ -133631,7 +133605,7 @@ Defined in: [sys/ctr.ts:1044](https://github.com/maiyunnet/kebab/blob/master/sys
133631
133605
 
133632
133606
  > **getPrototype**(`name`): [`IConfig`](../../../index/interfaces/IConfig.md)
133633
133607
 
133634
- Defined in: [sys/ctr.ts:282](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L282)
133608
+ Defined in: [sys/ctr.ts:301](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L301)
133635
133609
 
133636
133610
  获取类内部的 prototype
133637
133611
 
@@ -133649,7 +133623,7 @@ Defined in: [sys/ctr.ts:282](https://github.com/maiyunnet/kebab/blob/master/sys/
133649
133623
 
133650
133624
  > **getPrototype**(`name`): [`Session`](../../../lib/session/classes/Session.md) \| `null`
133651
133625
 
133652
- Defined in: [sys/ctr.ts:283](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L283)
133626
+ Defined in: [sys/ctr.ts:302](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L302)
133653
133627
 
133654
133628
  获取类内部的 prototype
133655
133629
 
@@ -133667,7 +133641,7 @@ Defined in: [sys/ctr.ts:283](https://github.com/maiyunnet/kebab/blob/master/sys/
133667
133641
 
133668
133642
  > **getPrototype**(`name`): `IncomingHttpHeaders`
133669
133643
 
133670
- Defined in: [sys/ctr.ts:284](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L284)
133644
+ Defined in: [sys/ctr.ts:303](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L303)
133671
133645
 
133672
133646
  获取类内部的 prototype
133673
133647
 
@@ -133685,7 +133659,7 @@ Defined in: [sys/ctr.ts:284](https://github.com/maiyunnet/kebab/blob/master/sys/
133685
133659
 
133686
133660
  > **getPrototype**(`name`): `IncomingMessage` \| `Http2ServerRequest`
133687
133661
 
133688
- Defined in: [sys/ctr.ts:285](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L285)
133662
+ Defined in: [sys/ctr.ts:304](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L304)
133689
133663
 
133690
133664
  获取类内部的 prototype
133691
133665
 
@@ -133703,7 +133677,7 @@ Defined in: [sys/ctr.ts:285](https://github.com/maiyunnet/kebab/blob/master/sys/
133703
133677
 
133704
133678
  > **getPrototype**(`name`): `Http2ServerResponse`\<`Http2ServerRequest`\> \| `ServerResponse`\<`IncomingMessage`\>
133705
133679
 
133706
- Defined in: [sys/ctr.ts:286](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L286)
133680
+ Defined in: [sys/ctr.ts:305](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L305)
133707
133681
 
133708
133682
  获取类内部的 prototype
133709
133683
 
@@ -133721,7 +133695,7 @@ Defined in: [sys/ctr.ts:286](https://github.com/maiyunnet/kebab/blob/master/sys/
133721
133695
 
133722
133696
  > **getPrototype**(`name`): [`Socket`](../../../lib/ws/classes/Socket.md)
133723
133697
 
133724
- Defined in: [sys/ctr.ts:287](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L287)
133698
+ Defined in: [sys/ctr.ts:306](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L306)
133725
133699
 
133726
133700
  获取类内部的 prototype
133727
133701
 
@@ -133739,7 +133713,7 @@ Defined in: [sys/ctr.ts:287](https://github.com/maiyunnet/kebab/blob/master/sys/
133739
133713
 
133740
133714
  > **getPrototype**(`name`): `Record`\<`string`, [`Json`](../../../index/type-aliases/Json.md)\>
133741
133715
 
133742
- Defined in: [sys/ctr.ts:288](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L288)
133716
+ Defined in: [sys/ctr.ts:307](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L307)
133743
133717
 
133744
133718
  获取类内部的 prototype
133745
133719
 
@@ -133757,7 +133731,7 @@ Defined in: [sys/ctr.ts:288](https://github.com/maiyunnet/kebab/blob/master/sys/
133757
133731
 
133758
133732
  > **getPrototype**(`name`): `string`
133759
133733
 
133760
- Defined in: [sys/ctr.ts:289](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L289)
133734
+ Defined in: [sys/ctr.ts:308](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L308)
133761
133735
 
133762
133736
  获取类内部的 prototype
133763
133737
 
@@ -133775,7 +133749,7 @@ Defined in: [sys/ctr.ts:289](https://github.com/maiyunnet/kebab/blob/master/sys/
133775
133749
 
133776
133750
  > **getPrototype**(`name`): `any`
133777
133751
 
133778
- Defined in: [sys/ctr.ts:290](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L290)
133752
+ Defined in: [sys/ctr.ts:309](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L309)
133779
133753
 
133780
133754
  获取类内部的 prototype
133781
133755
 
@@ -133795,7 +133769,7 @@ Defined in: [sys/ctr.ts:290](https://github.com/maiyunnet/kebab/blob/master/sys/
133795
133769
 
133796
133770
  > **onClose**(): `void` \| `Promise`\<`void`\>
133797
133771
 
133798
- Defined in: [sys/ctr.ts:384](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L384)
133772
+ Defined in: [sys/ctr.ts:403](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L403)
133799
133773
 
133800
133774
  WebSocket 下连接被终止后会自动被调用的事件,可重写此方法
133801
133775
 
@@ -133809,7 +133783,7 @@ WebSocket 下连接被终止后会自动被调用的事件,可重写此方法
133809
133783
 
133810
133784
  > **onData**(`data`, `opcode`): `any`
133811
133785
 
133812
- Defined in: [sys/ctr.ts:349](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L349)
133786
+ Defined in: [sys/ctr.ts:368](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L368)
133813
133787
 
133814
133788
  WebSocket 下当收到数据时会自动被调用的事件,即只文本和二进制数据,返回内容会被发送给 socket
133815
133789
 
@@ -133839,7 +133813,7 @@ WebSocket 下当收到数据时会自动被调用的事件,即只文本和二
133839
133813
 
133840
133814
  > **onDrain**(): `void` \| `Promise`\<`void`\>
133841
133815
 
133842
- Defined in: [sys/ctr.ts:370](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L370)
133816
+ Defined in: [sys/ctr.ts:389](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L389)
133843
133817
 
133844
133818
  WebSocket 下连接恢复可写入状态后会调用此事件,可重写此方法
133845
133819
 
@@ -133853,7 +133827,7 @@ WebSocket 下连接恢复可写入状态后会调用此事件,可重写此方
133853
133827
 
133854
133828
  > **onEnd**(): `void` \| `Promise`\<`void`\>
133855
133829
 
133856
- Defined in: [sys/ctr.ts:377](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L377)
133830
+ Defined in: [sys/ctr.ts:396](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L396)
133857
133831
 
133858
133832
  WebSocket 下连接被 end 后会自动被调用的事件,可重写此方法
133859
133833
 
@@ -133867,7 +133841,7 @@ WebSocket 下连接被 end 后会自动被调用的事件,可重写此方法
133867
133841
 
133868
133842
  > **onLoad**(): `string` \| `boolean` \| [`DbValue`](../../../index/type-aliases/DbValue.md)[] \| `Promise`\<`string` \| `boolean` \| [`DbValue`](../../../index/type-aliases/DbValue.md)[]\>
133869
133843
 
133870
- Defined in: [sys/ctr.ts:308](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L308)
133844
+ Defined in: [sys/ctr.ts:327](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L327)
133871
133845
 
133872
133846
  实例化后会执行的方法,可重写此方法
133873
133847
 
@@ -133883,7 +133857,7 @@ Defined in: [sys/ctr.ts:308](https://github.com/maiyunnet/kebab/blob/master/sys/
133883
133857
 
133884
133858
  > **onMessage**(`data`, `opcode`): `boolean` \| `Promise`\<`boolean` \| `undefined`\> \| `undefined`
133885
133859
 
133886
- Defined in: [sys/ctr.ts:361](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L361)
133860
+ Defined in: [sys/ctr.ts:380](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L380)
133887
133861
 
133888
133862
  包含所有 opcode 的消息,若要发送数据需自行调用 write 方法,data 恒定为原始 buffer
133889
133863
  返回 false 则不会执行默认方法,一般请什么都不要返回
@@ -133913,7 +133887,7 @@ opcode
133913
133887
 
133914
133888
  > **onReady**(): `string` \| `boolean` \| [`DbValue`](../../../index/type-aliases/DbValue.md)[] \| `Promise`\<`string` \| `boolean` \| [`DbValue`](../../../index/type-aliases/DbValue.md)[]\>
133915
133889
 
133916
- Defined in: [sys/ctr.ts:317](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L317)
133890
+ Defined in: [sys/ctr.ts:336](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L336)
133917
133891
 
133918
133892
  onLoad 执行后会执行的方法,可重写此方法
133919
133893
 
@@ -133929,7 +133903,7 @@ onLoad 执行后会执行的方法,可重写此方法
133929
133903
 
133930
133904
  > **onReqStart**(): `number` \| `Promise`\<`number`\>
133931
133905
 
133932
- Defined in: [sys/ctr.ts:392](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L392)
133906
+ Defined in: [sys/ctr.ts:411](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L411)
133933
133907
 
133934
133908
  请求发送开始时调用(仅会在 middle 内触发)
133935
133909
 
@@ -133945,7 +133919,7 @@ Defined in: [sys/ctr.ts:392](https://github.com/maiyunnet/kebab/blob/master/sys/
133945
133919
 
133946
133920
  > **onUnload**(`rtn`): `string` \| `boolean` \| [`DbValue`](../../../index/type-aliases/DbValue.md)[] \| `Promise`\<`string` \| `boolean` \| [`DbValue`](../../../index/type-aliases/DbValue.md)[]\>
133947
133921
 
133948
- Defined in: [sys/ctr.ts:327](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L327)
133922
+ Defined in: [sys/ctr.ts:346](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L346)
133949
133923
 
133950
133924
  整个结束前会执行本方法,可重写此方法对输出结果再处理一次(Websocket 模式无效)
133951
133925
 
@@ -133969,7 +133943,7 @@ Defined in: [sys/ctr.ts:327](https://github.com/maiyunnet/kebab/blob/master/sys/
133969
133943
 
133970
133944
  > **onUpgrade**(): `object`
133971
133945
 
133972
- Defined in: [sys/ctr.ts:336](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L336)
133946
+ Defined in: [sys/ctr.ts:355](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L355)
133973
133947
 
133974
133948
  WebSocket 下在建立 Server 连接之前可对 WebSocket 的信息进行配置
133975
133949
 
@@ -133993,7 +133967,7 @@ WebSocket 配置参数,包含自定义 header 和超时时间
133993
133967
 
133994
133968
  > **setPrototype**(`name`, `val`): `void`
133995
133969
 
133996
- Defined in: [sys/ctr.ts:296](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L296)
133970
+ Defined in: [sys/ctr.ts:315](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L315)
133997
133971
 
133998
133972
  设置类内部的 prototype
133999
133973
 
@@ -134045,7 +134019,7 @@ sys/ctr/functions/isHttpRequestAvailable.md
134045
134019
 
134046
134020
  > **isHttpRequestAvailable**(`req`, `res`): `boolean`
134047
134021
 
134048
- Defined in: [sys/ctr.ts:104](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L104)
134022
+ Defined in: [sys/ctr.ts:123](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L123)
134049
134023
 
134050
134024
  判断当前 HTTP 请求是否仍可响应
134051
134025
 
@@ -134086,12 +134060,14 @@ sys/ctr/index.md
134086
134060
 
134087
134061
  ## Interfaces
134088
134062
 
134063
+ - [IReactPageOptions](interfaces/IReactPageOptions.md)
134089
134064
  - [IValibotOptions](interfaces/IValibotOptions.md)
134090
134065
  - [IValibotXOptions](interfaces/IValibotXOptions.md)
134091
134066
  - [IValibotXsrfIssue](interfaces/IValibotXsrfIssue.md)
134092
134067
 
134093
134068
  ## Type Aliases
134094
134069
 
134070
+ - [TRedirectHttpCode](type-aliases/TRedirectHttpCode.md)
134095
134071
  - [TValibotResponse](type-aliases/TValibotResponse.md)
134096
134072
  - [TValibotResult](type-aliases/TValibotResult.md)
134097
134073
  - [TValibotTranslate](type-aliases/TValibotTranslate.md)
@@ -134101,6 +134077,63 @@ sys/ctr/index.md
134101
134077
  - [clearLocaleData](functions/clearLocaleData.md)
134102
134078
  - [isHttpRequestAvailable](functions/isHttpRequestAvailable.md)
134103
134079
 
134080
+ sys/ctr/interfaces/IReactPageOptions.md
134081
+ ---
134082
+
134083
+ [**Documents for @maiyunnet/kebab**](../../../index.md)
134084
+
134085
+ ***
134086
+
134087
+ [Documents for @maiyunnet/kebab](../../../index.md) / [sys/ctr](../index.md) / IReactPageOptions
134088
+
134089
+ # Interface: IReactPageOptions
134090
+
134091
+ Defined in: [sys/ctr.ts:102](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L102)
134092
+
134093
+ React SSR 页面选项
134094
+
134095
+ ## Properties
134096
+
134097
+ ### hydrate?
134098
+
134099
+ > `optional` **hydrate?**: `boolean`
134100
+
134101
+ Defined in: [sys/ctr.ts:104](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L104)
134102
+
134103
+ 是否注入客户端水合 bundle,默认 true;设为 false 时仅输出服务端渲染的 HTML
134104
+
134105
+ ***
134106
+
134107
+ ### router?
134108
+
134109
+ > `optional` **router?**: `"browser"`
134110
+
134111
+ Defined in: [sys/ctr.ts:110](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L110)
134112
+
134113
+ 路由模式,不传则不注入任何 Router,组件自行管理路由(如 MemoryRouter)或无路由
134114
+ 'browser':服务端用 StaticRouter,客户端用 BrowserRouter,地址栏与路由联动
134115
+ 组件本身只需使用 Routes/Route/Link 等,不要包含任何 Router 包裹层
134116
+
134117
+ ***
134118
+
134119
+ ### routerBase?
134120
+
134121
+ > `optional` **routerBase?**: `string`
134122
+
134123
+ Defined in: [sys/ctr.ts:112](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L112)
134124
+
134125
+ BrowserRouter 的 basename,相对于 urlBase,默认空字符串
134126
+
134127
+ ***
134128
+
134129
+ ### staticPath?
134130
+
134131
+ > `optional` **staticPath?**: `string`
134132
+
134133
+ Defined in: [sys/ctr.ts:114](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L114)
134134
+
134135
+ 静态资源基础路径,覆盖 config.set.staticPath(支持 CDN)
134136
+
134104
134137
  sys/ctr/interfaces/IValibotOptions.md
134105
134138
  ---
134106
134139
 
@@ -134112,7 +134145,7 @@ sys/ctr/interfaces/IValibotOptions.md
134112
134145
 
134113
134146
  # Interface: IValibotOptions\<TIssue\>
134114
134147
 
134115
- Defined in: [sys/ctr.ts:53](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L53)
134148
+ Defined in: [sys/ctr.ts:56](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L56)
134116
134149
 
134117
134150
  Valibot 同步校验选项
134118
134151
 
@@ -134128,7 +134161,7 @@ Valibot 同步校验选项
134128
134161
 
134129
134162
  > `optional` **config?**: [`Config`](../../../lib/core/namespaces/v/interfaces/Config.md)\<`TIssue`\>
134130
134163
 
134131
- Defined in: [sys/ctr.ts:55](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L55)
134164
+ Defined in: [sys/ctr.ts:58](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L58)
134132
134165
 
134133
134166
  传给 Valibot 的校验配置
134134
134167
 
@@ -134138,7 +134171,7 @@ Defined in: [sys/ctr.ts:55](https://github.com/maiyunnet/kebab/blob/master/sys/c
134138
134171
 
134139
134172
  > `optional` **response?**: [`TValibotResponse`](../type-aliases/TValibotResponse.md)\<`TIssue`\>
134140
134173
 
134141
- Defined in: [sys/ctr.ts:57](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L57)
134174
+ Defined in: [sys/ctr.ts:60](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L60)
134142
134175
 
134143
134176
  校验失败时返回给客户端的内容,默认使用首个 issue 的消息
134144
134177
 
@@ -134148,7 +134181,7 @@ Defined in: [sys/ctr.ts:57](https://github.com/maiyunnet/kebab/blob/master/sys/c
134148
134181
 
134149
134182
  > `optional` **translate?**: [`TValibotTranslate`](../type-aliases/TValibotTranslate.md)
134150
134183
 
134151
- Defined in: [sys/ctr.ts:59](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L59)
134184
+ Defined in: [sys/ctr.ts:62](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L62)
134152
134185
 
134153
134186
  使用完整 issue 路径翻译消息
134154
134187
 
@@ -134163,7 +134196,7 @@ sys/ctr/interfaces/IValibotXOptions.md
134163
134196
 
134164
134197
  # Interface: IValibotXOptions\<TIssue\>
134165
134198
 
134166
- Defined in: [sys/ctr.ts:69](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L69)
134199
+ Defined in: [sys/ctr.ts:72](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L72)
134167
134200
 
134168
134201
  带 XSRF 检测的 Valibot 同步校验选项
134169
134202
 
@@ -134179,7 +134212,7 @@ Defined in: [sys/ctr.ts:69](https://github.com/maiyunnet/kebab/blob/master/sys/c
134179
134212
 
134180
134213
  > `optional` **config?**: [`Config`](../../../lib/core/namespaces/v/interfaces/Config.md)\<`TIssue`\>
134181
134214
 
134182
- Defined in: [sys/ctr.ts:71](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L71)
134215
+ Defined in: [sys/ctr.ts:74](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L74)
134183
134216
 
134184
134217
  传给 Valibot 的校验配置
134185
134218
 
@@ -134189,7 +134222,7 @@ Defined in: [sys/ctr.ts:71](https://github.com/maiyunnet/kebab/blob/master/sys/c
134189
134222
 
134190
134223
  > `optional` **ignoreXsrf?**: `boolean`
134191
134224
 
134192
- Defined in: [sys/ctr.ts:77](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L77)
134225
+ Defined in: [sys/ctr.ts:80](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L80)
134193
134226
 
134194
134227
  是否忽略 XSRF 检测
134195
134228
 
@@ -134199,7 +134232,7 @@ Defined in: [sys/ctr.ts:77](https://github.com/maiyunnet/kebab/blob/master/sys/c
134199
134232
 
134200
134233
  > `optional` **response?**: [`TValibotResponse`](../type-aliases/TValibotResponse.md)\<[`IValibotXsrfIssue`](IValibotXsrfIssue.md) \| `TIssue`\>
134201
134234
 
134202
- Defined in: [sys/ctr.ts:73](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L73)
134235
+ Defined in: [sys/ctr.ts:76](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L76)
134203
134236
 
134204
134237
  校验失败时返回给客户端的内容,回调同时可能收到 XSRF issue
134205
134238
 
@@ -134209,7 +134242,7 @@ Defined in: [sys/ctr.ts:73](https://github.com/maiyunnet/kebab/blob/master/sys/c
134209
134242
 
134210
134243
  > `optional` **translate?**: [`TValibotTranslate`](../type-aliases/TValibotTranslate.md)
134211
134244
 
134212
- Defined in: [sys/ctr.ts:75](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L75)
134245
+ Defined in: [sys/ctr.ts:78](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L78)
134213
134246
 
134214
134247
  使用完整 issue 路径翻译消息,包括 XSRF issue
134215
134248
 
@@ -134224,7 +134257,7 @@ sys/ctr/interfaces/IValibotXsrfIssue.md
134224
134257
 
134225
134258
  # Interface: IValibotXsrfIssue
134226
134259
 
134227
- Defined in: [sys/ctr.ts:63](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L63)
134260
+ Defined in: [sys/ctr.ts:66](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L66)
134228
134261
 
134229
134262
  XSRF 校验失败的问题描述
134230
134263
 
@@ -134308,7 +134341,7 @@ The sub issues.
134308
134341
 
134309
134342
  > `readonly` **kind**: `"validation"`
134310
134343
 
134311
- Defined in: [sys/ctr.ts:64](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L64)
134344
+ Defined in: [sys/ctr.ts:67](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L67)
134312
134345
 
134313
134346
  The issue kind.
134314
134347
 
@@ -134392,7 +134425,7 @@ The input requirement.
134392
134425
 
134393
134426
  > `readonly` **type**: `"xsrf"`
134394
134427
 
134395
- Defined in: [sys/ctr.ts:65](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L65)
134428
+ Defined in: [sys/ctr.ts:68](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L68)
134396
134429
 
134397
134430
  The issue type.
134398
134431
 
@@ -134400,6 +134433,23 @@ The issue type.
134400
134433
 
134401
134434
  [`BaseIssue`](../../../lib/core/namespaces/v/interfaces/BaseIssue.md).[`type`](../../../lib/core/namespaces/v/interfaces/BaseIssue.md#type)
134402
134435
 
134436
+ sys/ctr/type-aliases/TRedirectHttpCode.md
134437
+ ---
134438
+
134439
+ [**Documents for @maiyunnet/kebab**](../../../index.md)
134440
+
134441
+ ***
134442
+
134443
+ [Documents for @maiyunnet/kebab](../../../index.md) / [sys/ctr](../index.md) / TRedirectHttpCode
134444
+
134445
+ # Type Alias: TRedirectHttpCode
134446
+
134447
+ > **TRedirectHttpCode** = `301` \| `302` \| `303` \| `307` \| `308`
134448
+
134449
+ Defined in: [sys/ctr.ts:53](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L53)
134450
+
134451
+ HTTP 重定向状态码
134452
+
134403
134453
  sys/ctr/type-aliases/TValibotResponse.md
134404
134454
  ---
134405
134455
 
@@ -134436,7 +134486,7 @@ sys/ctr/type-aliases/TValibotResult.md
134436
134486
 
134437
134487
  > **TValibotResult**\<`TSchema`, `TIssue`\> = \{ `issues`: `undefined`; `output`: [`InferOutput`](../../../lib/core/namespaces/v/type-aliases/InferOutput.md)\<`TSchema`\>; `response`: `undefined`; `success`: `true`; `typed`: `true`; \} \| \{ `issues`: \[`TIssue`, `...TIssue[]`\]; `output`: `undefined`; `response`: [`Json`](../../../index/type-aliases/Json.md)[]; `success`: `false`; `typed`: `boolean`; \}
134438
134488
 
134439
- Defined in: [sys/ctr.ts:81](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L81)
134489
+ Defined in: [sys/ctr.ts:84](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L84)
134440
134490
 
134441
134491
  Valibot 校验结果:仅成功分支提供 schema 推导后的 output
134442
134492
 
@@ -137196,7 +137246,7 @@ sys/route/functions/getFormData.md
137196
137246
 
137197
137247
  > **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)\>; \}\>
137198
137248
 
137199
- Defined in: [sys/route.ts:1037](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1037)
137249
+ Defined in: [sys/route.ts:1039](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1039)
137200
137250
 
137201
137251
  获取 formdata 的 post
137202
137252
 
@@ -137293,7 +137343,7 @@ sys/route/functions/getPost.md
137293
137343
 
137294
137344
  > **getPost**(`req`): `Promise`\<`false` \| \{ `input`: `string`; `post`: `Record`\<`string`, `any`\>; `raw`: `Record`\<`string`, `any`\>; \}\>
137295
137345
 
137296
- Defined in: [sys/route.ts:912](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L912)
137346
+ Defined in: [sys/route.ts:914](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L914)
137297
137347
 
137298
137348
  获取 post 对象(通常已自动获取),如果是文件上传(formdata)的情况则不获取
137299
137349
 
@@ -137411,7 +137461,7 @@ sys/route/functions/unlinkUploadFiles.md
137411
137461
 
137412
137462
  > **unlinkUploadFiles**(`cctr`): `Promise`\<`void`\>
137413
137463
 
137414
- Defined in: [sys/route.ts:870](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L870)
137464
+ Defined in: [sys/route.ts:872](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L872)
137415
137465
 
137416
137466
  删除本次请求所有已上传的临时文件
137417
137467
 
@@ -137440,7 +137490,7 @@ sys/route/functions/waitCtr.md
137440
137490
 
137441
137491
  > **waitCtr**(`cctr`): `Promise`\<`void`\>
137442
137492
 
137443
- Defined in: [sys/route.ts:890](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L890)
137493
+ Defined in: [sys/route.ts:892](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L892)
137444
137494
 
137445
137495
  等待异步任务结束,并删除临时文件,如果结束后还有事务没关闭,则会在本函数中打印控制台并且写入 log 文件
137446
137496
  此时其实已经给客户端返回了,此处等待不消耗客户端的等待时间