@maiyunnet/kebab 9.11.5 → 9.11.6

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
@@ -1360,7 +1360,7 @@ index/variables/VER.md
1360
1360
 
1361
1361
  # Variable: VER
1362
1362
 
1363
- > `const` **VER**: `"9.11.5"` = `'9.11.5'`
1363
+ > `const` **VER**: `"9.11.6"` = `'9.11.6'`
1364
1364
 
1365
1365
  Defined in: [index.ts:10](https://github.com/maiyunnet/kebab/blob/master/index.ts#L10)
1366
1366
 
@@ -18105,7 +18105,7 @@ lib/undici/functions/filterHeaders.md
18105
18105
 
18106
18106
  > **filterHeaders**(`headers`, `res?`, `filter?`): `Record`\<`string`, `string` \| `string`[]\>
18107
18107
 
18108
- Defined in: [lib/undici.ts:529](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L529)
18108
+ Defined in: [lib/undici.ts:530](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L530)
18109
18109
 
18110
18110
  剔除不代理的 header,返回新的 header
18111
18111
 
@@ -18146,7 +18146,7 @@ lib/undici/functions/getFormData.md
18146
18146
 
18147
18147
  > **getFormData**(): [`FormData`](../formdata/classes/FormData.md)
18148
18148
 
18149
- Defined in: [lib/undici.ts:513](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L513)
18149
+ Defined in: [lib/undici.ts:514](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L514)
18150
18150
 
18151
18151
  创建 FormData 对象
18152
18152
 
@@ -18266,7 +18266,7 @@ lib/undici/functions/mproxyData.md
18266
18266
 
18267
18267
  > **mproxyData**(`ctr`): `any`
18268
18268
 
18269
- Defined in: [lib/undici.ts:618](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L618)
18269
+ Defined in: [lib/undici.ts:619](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L619)
18270
18270
 
18271
18271
  获取 mproxy 的附加数据
18272
18272
 
@@ -18295,7 +18295,7 @@ lib/undici/functions/mproxy.md
18295
18295
 
18296
18296
  > **mproxy**(`ctr`, `auth`, `opt?`): `Promise`\<`number`\>
18297
18297
 
18298
- Defined in: [lib/undici.ts:565](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L565)
18298
+ Defined in: [lib/undici.ts:566](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L566)
18299
18299
 
18300
18300
  正向 mproxy 代理,注意提前处理不要自动处理 post 数据,读取 get 的 url 为实际请求地址
18301
18301
  get: url, auth
@@ -18524,7 +18524,7 @@ lib/undici/functions/rproxy.md
18524
18524
 
18525
18525
  > **rproxy**(`ctr`, `route`, `opt?`): `Promise`\<`boolean`\>
18526
18526
 
18527
- Defined in: [lib/undici.ts:636](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L636)
18527
+ Defined in: [lib/undici.ts:637](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L637)
18528
18528
 
18529
18529
  反向代理,注意提前处理不要自动处理 post 数据,将本服务器的某个路由反代到其他网址
18530
18530
 
@@ -18601,7 +18601,7 @@ lib/undici/interfaces/IMproxyOptions.md
18601
18601
 
18602
18602
  # Interface: IMproxyOptions
18603
18603
 
18604
- Defined in: [lib/undici.ts:720](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L720)
18604
+ Defined in: [lib/undici.ts:723](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L723)
18605
18605
 
18606
18606
  正向代理请求的传入参数选项
18607
18607
 
@@ -18611,7 +18611,7 @@ Defined in: [lib/undici.ts:720](https://github.com/maiyunnet/kebab/blob/master/l
18611
18611
 
18612
18612
  > `optional` **filter?**: (`h`) => `boolean`
18613
18613
 
18614
- Defined in: [lib/undici.ts:729](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L729)
18614
+ Defined in: [lib/undici.ts:732](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L732)
18615
18615
 
18616
18616
  过滤 header,返回 true 则留下
18617
18617
 
@@ -18631,7 +18631,7 @@ Defined in: [lib/undici.ts:729](https://github.com/maiyunnet/kebab/blob/master/l
18631
18631
 
18632
18632
  > `optional` **follow?**: `number`
18633
18633
 
18634
- Defined in: [lib/undici.ts:723](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L723)
18634
+ Defined in: [lib/undici.ts:726](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L726)
18635
18635
 
18636
18636
  ***
18637
18637
 
@@ -18639,7 +18639,7 @@ Defined in: [lib/undici.ts:723](https://github.com/maiyunnet/kebab/blob/master/l
18639
18639
 
18640
18640
  > `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
18641
18641
 
18642
- Defined in: [lib/undici.ts:727](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L727)
18642
+ Defined in: [lib/undici.ts:730](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L730)
18643
18643
 
18644
18644
  ***
18645
18645
 
@@ -18647,7 +18647,7 @@ Defined in: [lib/undici.ts:727](https://github.com/maiyunnet/kebab/blob/master/l
18647
18647
 
18648
18648
  > `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
18649
18649
 
18650
- Defined in: [lib/undici.ts:725](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L725)
18650
+ Defined in: [lib/undici.ts:728](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L728)
18651
18651
 
18652
18652
  自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
18653
18653
 
@@ -18657,7 +18657,7 @@ Defined in: [lib/undici.ts:725](https://github.com/maiyunnet/kebab/blob/master/l
18657
18657
 
18658
18658
  > `optional` **local?**: `string`
18659
18659
 
18660
- Defined in: [lib/undici.ts:726](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L726)
18660
+ Defined in: [lib/undici.ts:729](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L729)
18661
18661
 
18662
18662
  ***
18663
18663
 
@@ -18665,7 +18665,7 @@ Defined in: [lib/undici.ts:726](https://github.com/maiyunnet/kebab/blob/master/l
18665
18665
 
18666
18666
  > `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
18667
18667
 
18668
- Defined in: [lib/undici.ts:731](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L731)
18668
+ Defined in: [lib/undici.ts:734](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L734)
18669
18669
 
18670
18670
  默认为 default
18671
18671
 
@@ -18675,9 +18675,9 @@ Defined in: [lib/undici.ts:731](https://github.com/maiyunnet/kebab/blob/master/l
18675
18675
 
18676
18676
  > `optional` **timeout?**: `number`
18677
18677
 
18678
- Defined in: [lib/undici.ts:722](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L722)
18678
+ Defined in: [lib/undici.ts:725](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L725)
18679
18679
 
18680
- 秒数
18680
+ 秒数,默认 300 秒
18681
18681
 
18682
18682
  lib/undici/interfaces/IRequestOptions.md
18683
18683
  ---
@@ -18690,7 +18690,7 @@ lib/undici/interfaces/IRequestOptions.md
18690
18690
 
18691
18691
  # Interface: IRequestOptions
18692
18692
 
18693
- Defined in: [lib/undici.ts:689](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L689)
18693
+ Defined in: [lib/undici.ts:690](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L690)
18694
18694
 
18695
18695
  请求的传入参数选项
18696
18696
 
@@ -18700,7 +18700,7 @@ Defined in: [lib/undici.ts:689](https://github.com/maiyunnet/kebab/blob/master/l
18700
18700
 
18701
18701
  > `optional` **cookie?**: `Record`\<`string`, [`ICookie`](../../cookie/interfaces/ICookie.md)\>
18702
18702
 
18703
- Defined in: [lib/undici.ts:714](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L714)
18703
+ Defined in: [lib/undici.ts:715](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L715)
18704
18704
 
18705
18705
  cookie 托管对象
18706
18706
 
@@ -18710,7 +18710,7 @@ cookie 托管对象
18710
18710
 
18711
18711
  > `optional` **follow?**: `number`
18712
18712
 
18713
- Defined in: [lib/undici.ts:695](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L695)
18713
+ Defined in: [lib/undici.ts:696](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L696)
18714
18714
 
18715
18715
  追踪 location 次数,0 为不追踪,默认为 0
18716
18716
 
@@ -18720,7 +18720,7 @@ Defined in: [lib/undici.ts:695](https://github.com/maiyunnet/kebab/blob/master/l
18720
18720
 
18721
18721
  > `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
18722
18722
 
18723
- Defined in: [lib/undici.ts:700](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L700)
18723
+ Defined in: [lib/undici.ts:701](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L701)
18724
18724
 
18725
18725
  ***
18726
18726
 
@@ -18728,7 +18728,7 @@ Defined in: [lib/undici.ts:700](https://github.com/maiyunnet/kebab/blob/master/l
18728
18728
 
18729
18729
  > `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
18730
18730
 
18731
- Defined in: [lib/undici.ts:697](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L697)
18731
+ Defined in: [lib/undici.ts:698](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L698)
18732
18732
 
18733
18733
  自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
18734
18734
 
@@ -18738,7 +18738,7 @@ Defined in: [lib/undici.ts:697](https://github.com/maiyunnet/kebab/blob/master/l
18738
18738
 
18739
18739
  > `optional` **keep?**: `boolean`
18740
18740
 
18741
- Defined in: [lib/undici.ts:710](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L710)
18741
+ Defined in: [lib/undici.ts:711](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L711)
18742
18742
 
18743
18743
  连接是否保持长连接(即是否允许复用),默认为 true
18744
18744
 
@@ -18748,7 +18748,7 @@ Defined in: [lib/undici.ts:710](https://github.com/maiyunnet/kebab/blob/master/l
18748
18748
 
18749
18749
  > `optional` **local?**: `string`
18750
18750
 
18751
- Defined in: [lib/undici.ts:699](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L699)
18751
+ Defined in: [lib/undici.ts:700](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L700)
18752
18752
 
18753
18753
  ***
18754
18754
 
@@ -18756,7 +18756,7 @@ Defined in: [lib/undici.ts:699](https://github.com/maiyunnet/kebab/blob/master/l
18756
18756
 
18757
18757
  > `optional` **log?**: `boolean`
18758
18758
 
18759
- Defined in: [lib/undici.ts:716](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L716)
18759
+ Defined in: [lib/undici.ts:717](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L717)
18760
18760
 
18761
18761
  若有异常写入文件日志,默认为 true
18762
18762
 
@@ -18766,7 +18766,7 @@ Defined in: [lib/undici.ts:716](https://github.com/maiyunnet/kebab/blob/master/l
18766
18766
 
18767
18767
  > `optional` **method?**: `"GET"` \| `"POST"` \| `"PUT"` \| `"DELETE"` \| `"OPTIONS"`
18768
18768
 
18769
- Defined in: [lib/undici.ts:690](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L690)
18769
+ Defined in: [lib/undici.ts:691](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L691)
18770
18770
 
18771
18771
  ***
18772
18772
 
@@ -18774,7 +18774,7 @@ Defined in: [lib/undici.ts:690](https://github.com/maiyunnet/kebab/blob/master/l
18774
18774
 
18775
18775
  > `optional` **mproxy?**: `object`
18776
18776
 
18777
- Defined in: [lib/undici.ts:702](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L702)
18777
+ Defined in: [lib/undici.ts:703](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L703)
18778
18778
 
18779
18779
  正向 mproxy 代理,url 如 https://xxx/abc
18780
18780
 
@@ -18802,7 +18802,7 @@ Defined in: [lib/undici.ts:702](https://github.com/maiyunnet/kebab/blob/master/l
18802
18802
 
18803
18803
  > `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
18804
18804
 
18805
- Defined in: [lib/undici.ts:712](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L712)
18805
+ Defined in: [lib/undici.ts:713](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L713)
18806
18806
 
18807
18807
  复用池名/Agent,默认为 default
18808
18808
 
@@ -18812,7 +18812,17 @@ Defined in: [lib/undici.ts:712](https://github.com/maiyunnet/kebab/blob/master/l
18812
18812
 
18813
18813
  > `optional` **save?**: `string`
18814
18814
 
18815
- Defined in: [lib/undici.ts:698](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L698)
18815
+ Defined in: [lib/undici.ts:699](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L699)
18816
+
18817
+ ***
18818
+
18819
+ ### signal?
18820
+
18821
+ > `optional` **signal?**: `AbortSignal`
18822
+
18823
+ Defined in: [lib/undici.ts:719](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L719)
18824
+
18825
+ 请求中止信号
18816
18826
 
18817
18827
  ***
18818
18828
 
@@ -18820,9 +18830,9 @@ Defined in: [lib/undici.ts:698](https://github.com/maiyunnet/kebab/blob/master/l
18820
18830
 
18821
18831
  > `optional` **timeout?**: `number`
18822
18832
 
18823
- Defined in: [lib/undici.ts:693](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L693)
18833
+ Defined in: [lib/undici.ts:694](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L694)
18824
18834
 
18825
- 秒数,默认 10
18835
+ 秒数,默认 300
18826
18836
 
18827
18837
  ***
18828
18838
 
@@ -18830,7 +18840,7 @@ Defined in: [lib/undici.ts:693](https://github.com/maiyunnet/kebab/blob/master/l
18830
18840
 
18831
18841
  > `optional` **type?**: `"form"` \| `"json"`
18832
18842
 
18833
- Defined in: [lib/undici.ts:691](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L691)
18843
+ Defined in: [lib/undici.ts:692](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L692)
18834
18844
 
18835
18845
  lib/undici/interfaces/IRproxyOptions.md
18836
18846
  ---
@@ -18843,7 +18853,7 @@ lib/undici/interfaces/IRproxyOptions.md
18843
18853
 
18844
18854
  # Interface: IRproxyOptions
18845
18855
 
18846
- Defined in: [lib/undici.ts:735](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L735)
18856
+ Defined in: [lib/undici.ts:738](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L738)
18847
18857
 
18848
18858
  反向代理请求的传入参数选项
18849
18859
 
@@ -18853,7 +18863,7 @@ Defined in: [lib/undici.ts:735](https://github.com/maiyunnet/kebab/blob/master/l
18853
18863
 
18854
18864
  > `optional` **filter?**: (`h`) => `boolean`
18855
18865
 
18856
- Defined in: [lib/undici.ts:744](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L744)
18866
+ Defined in: [lib/undici.ts:747](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L747)
18857
18867
 
18858
18868
  过滤 header,返回 true 则留下
18859
18869
 
@@ -18873,7 +18883,7 @@ Defined in: [lib/undici.ts:744](https://github.com/maiyunnet/kebab/blob/master/l
18873
18883
 
18874
18884
  > `optional` **follow?**: `number`
18875
18885
 
18876
- Defined in: [lib/undici.ts:738](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L738)
18886
+ Defined in: [lib/undici.ts:741](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L741)
18877
18887
 
18878
18888
  ***
18879
18889
 
@@ -18881,7 +18891,7 @@ Defined in: [lib/undici.ts:738](https://github.com/maiyunnet/kebab/blob/master/l
18881
18891
 
18882
18892
  > `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
18883
18893
 
18884
- Defined in: [lib/undici.ts:742](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L742)
18894
+ Defined in: [lib/undici.ts:745](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L745)
18885
18895
 
18886
18896
  ***
18887
18897
 
@@ -18889,7 +18899,7 @@ Defined in: [lib/undici.ts:742](https://github.com/maiyunnet/kebab/blob/master/l
18889
18899
 
18890
18900
  > `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
18891
18901
 
18892
- Defined in: [lib/undici.ts:740](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L740)
18902
+ Defined in: [lib/undici.ts:743](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L743)
18893
18903
 
18894
18904
  自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
18895
18905
 
@@ -18899,7 +18909,7 @@ Defined in: [lib/undici.ts:740](https://github.com/maiyunnet/kebab/blob/master/l
18899
18909
 
18900
18910
  > `optional` **local?**: `string`
18901
18911
 
18902
- Defined in: [lib/undici.ts:741](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L741)
18912
+ Defined in: [lib/undici.ts:744](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L744)
18903
18913
 
18904
18914
  ***
18905
18915
 
@@ -18907,7 +18917,7 @@ Defined in: [lib/undici.ts:741](https://github.com/maiyunnet/kebab/blob/master/l
18907
18917
 
18908
18918
  > `optional` **mproxy?**: `object`
18909
18919
 
18910
- Defined in: [lib/undici.ts:746](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L746)
18920
+ Defined in: [lib/undici.ts:749](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L749)
18911
18921
 
18912
18922
  正向 mproxy 代理,url 如 https://xxx/abc
18913
18923
 
@@ -18935,7 +18945,7 @@ Defined in: [lib/undici.ts:746](https://github.com/maiyunnet/kebab/blob/master/l
18935
18945
 
18936
18946
  > `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
18937
18947
 
18938
- Defined in: [lib/undici.ts:754](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L754)
18948
+ Defined in: [lib/undici.ts:757](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L757)
18939
18949
 
18940
18950
  默认为 default
18941
18951
 
@@ -18945,9 +18955,9 @@ Defined in: [lib/undici.ts:754](https://github.com/maiyunnet/kebab/blob/master/l
18945
18955
 
18946
18956
  > `optional` **timeout?**: `number`
18947
18957
 
18948
- Defined in: [lib/undici.ts:737](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L737)
18958
+ Defined in: [lib/undici.ts:740](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L740)
18949
18959
 
18950
- 秒数
18960
+ 秒数,默认 300 秒
18951
18961
 
18952
18962
  lib/undici/request/classes/Request.md
18953
18963
  ---
@@ -19434,7 +19444,7 @@ lib/undici/type-aliases/THttpHeaders.md
19434
19444
 
19435
19445
  > **THttpHeaders** = `http.IncomingHttpHeaders` & `object`
19436
19446
 
19437
- Defined in: [lib/undici.ts:759](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L759)
19447
+ Defined in: [lib/undici.ts:762](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L762)
19438
19448
 
19439
19449
  http headers
19440
19450
 
package/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * --- 本文件用来定义每个目录实体地址的常量 ---
6
6
  */
7
7
  /** --- 当前系统版本号 --- */
8
- export declare const VER = "9.11.5";
8
+ export declare const VER = "9.11.6";
9
9
  /** --- 框架根目录,以 / 结尾 --- */
10
10
  export declare const ROOT_PATH: string;
11
11
  /** --- 框架的 LIB,以 / 结尾 --- */
package/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * --- 本文件用来定义每个目录实体地址的常量 ---
7
7
  */
8
8
  /** --- 当前系统版本号 --- */
9
- export const VER = '9.11.5';
9
+ export const VER = '9.11.6';
10
10
  // --- 服务端用的路径 ---
11
11
  const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
12
12
  /** --- /xxx/xxx --- */
@@ -31,7 +31,7 @@ export declare class Response {
31
31
  /**
32
32
  * --- 获取响应读取流对象 ---
33
33
  */
34
- getStream(): (import("undici/types/readable").default & undici.Dispatcher.BodyMixin) | zlib.Gunzip | zlib.Inflate | zlib.BrotliDecompress | null;
34
+ getStream(): zlib.BrotliDecompress | zlib.Gunzip | zlib.Inflate | (import("undici/types/readable").default & undici.Dispatcher.BodyMixin) | null;
35
35
  /**
36
36
  * --- 获取原生响应读取流对象 ---
37
37
  */
package/lib/undici.d.ts CHANGED
@@ -104,7 +104,7 @@ export declare function rproxy(ctr: sCtr.Ctr, route: Record<string, string>, opt
104
104
  export interface IRequestOptions {
105
105
  'method'?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'OPTIONS';
106
106
  'type'?: 'form' | 'json';
107
- /** --- 秒数,默认 10 秒 --- */
107
+ /** --- 秒数,默认 300 秒 --- */
108
108
  'timeout'?: number;
109
109
  /** --- 追踪 location 次数,0 为不追踪,默认为 0 --- */
110
110
  'follow'?: number;
@@ -129,10 +129,12 @@ export interface IRequestOptions {
129
129
  'cookie'?: Record<string, lCookie.ICookie>;
130
130
  /** --- 若有异常写入文件日志,默认为 true --- */
131
131
  'log'?: boolean;
132
+ /** --- 请求中止信号 --- */
133
+ 'signal'?: AbortSignal;
132
134
  }
133
135
  /** --- 正向代理请求的传入参数选项 --- */
134
136
  export interface IMproxyOptions {
135
- /** --- 秒数 --- */
137
+ /** --- 秒数,默认 300 秒 --- */
136
138
  'timeout'?: number;
137
139
  'follow'?: number;
138
140
  /** --- 自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host --- */
@@ -146,7 +148,7 @@ export interface IMproxyOptions {
146
148
  }
147
149
  /** --- 反向代理请求的传入参数选项 --- */
148
150
  export interface IRproxyOptions {
149
- /** --- 秒数 --- */
151
+ /** --- 秒数,默认 300 秒 --- */
150
152
  'timeout'?: number;
151
153
  'follow'?: number;
152
154
  /** --- 自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host --- */
package/lib/undici.js CHANGED
@@ -223,9 +223,10 @@ export async function fetch(input, init = {}) {
223
223
  'headers': headers,
224
224
  'hosts': init.hosts,
225
225
  'mproxy': init.mproxy,
226
+ 'signal': init.signal ?? undefined,
226
227
  'follow': init.redirect === 'follow' ? 10 : 0,
227
228
  };
228
- // --- 检查是否已中止(注意:请求发起后无法中止) ---
229
+ // --- 检查是否已中止 ---
229
230
  if (init.signal?.aborted) {
230
231
  throw new DOMException('This operation was aborted', 'AbortError');
231
232
  }
@@ -271,7 +272,6 @@ export async function fetch(input, init = {}) {
271
272
  });
272
273
  }
273
274
  /** --- 构建自定义 DNS 查询函数 --- */
274
- // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
275
275
  function buildDnsLookup(hosts) {
276
276
  if (!hosts) {
277
277
  return undefined;
@@ -296,7 +296,7 @@ export async function request(u, data, opt = {}) {
296
296
  const puri = opt.mproxy ? lText.parseUrl(opt.mproxy.url) : null;
297
297
  const method = opt.method ?? 'GET';
298
298
  const type = opt.type ?? 'form';
299
- const timeout = opt.timeout ?? 10;
299
+ const timeout = opt.timeout ?? 300;
300
300
  /** --- 追踪 location 次数,0 为不追踪,默认为 0 --- */
301
301
  const follow = opt.follow ?? 0;
302
302
  const hosts = opt.hosts ?? {};
@@ -373,6 +373,7 @@ export async function request(u, data, opt = {}) {
373
373
  'headers': headers,
374
374
  'headersTimeout': timeout * 1_000,
375
375
  'bodyTimeout': timeout * 1_000,
376
+ 'signal': opt.signal,
376
377
  'dispatcher': agent,
377
378
  });
378
379
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maiyunnet/kebab",
3
- "version": "9.11.5",
3
+ "version": "9.11.6",
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": [