@maiyunnet/kebab 9.17.1 → 9.17.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
@@ -1428,7 +1428,7 @@ index/variables/VER.md
1428
1428
 
1429
1429
  # Variable: VER
1430
1430
 
1431
- > `const` **VER**: `"9.17.1"` = `'9.17.1'`
1431
+ > `const` **VER**: `"9.17.3"` = `'9.17.3'`
1432
1432
 
1433
1433
  Defined in: [index.ts:10](https://github.com/maiyunnet/kebab/blob/master/index.ts#L10)
1434
1434
 
@@ -3418,7 +3418,7 @@ lib/core/functions/clone.md
3418
3418
 
3419
3419
  > **clone**\<`T`\>(`obj`): `T`
3420
3420
 
3421
- Defined in: [lib/core.ts:1354](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1354)
3421
+ Defined in: [lib/core.ts:1409](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1409)
3422
3422
 
3423
3423
  完整的克隆一份数组/对象
3424
3424
 
@@ -3482,7 +3482,7 @@ lib/core/functions/debug.md
3482
3482
 
3483
3483
  > **debug**(`message?`, ...`optionalParams`): `void`
3484
3484
 
3485
- Defined in: [lib/core.ts:1400](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1400)
3485
+ Defined in: [lib/core.ts:1455](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1455)
3486
3486
 
3487
3487
  打印调试信息,线上环境不会打印
3488
3488
 
@@ -3517,7 +3517,7 @@ lib/core/functions/display.md
3517
3517
 
3518
3518
  > **display**(`message?`, ...`optionalParams`): `void`
3519
3519
 
3520
- Defined in: [lib/core.ts:1413](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1413)
3520
+ Defined in: [lib/core.ts:1468](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1468)
3521
3521
 
3522
3522
  向控制台直接显示内容,一般情况下禁止使用
3523
3523
 
@@ -3629,7 +3629,7 @@ lib/core/functions/getLog.md
3629
3629
 
3630
3630
  > **getLog**(`opt`): `Promise`\<`false` \| \{ `list`: `any`[] \| `string`[][]; `total`: `number`; \}\>
3631
3631
 
3632
- Defined in: [lib/core.ts:1266](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1266)
3632
+ Defined in: [lib/core.ts:1321](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1321)
3633
3633
 
3634
3634
  获取日志内容为一个数组
3635
3635
 
@@ -3802,7 +3802,7 @@ lib/core/functions/loadEnv.md
3802
3802
 
3803
3803
  > **loadEnv**(`dir`): `Promise`\<`void`\>
3804
3804
 
3805
- Defined in: [lib/core.ts:1484](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1484)
3805
+ Defined in: [lib/core.ts:1539](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1539)
3806
3806
 
3807
3807
  加载 .env 文件到 process.env,若文件不存在则跳过
3808
3808
 
@@ -3831,7 +3831,7 @@ lib/core/functions/log.md
3831
3831
 
3832
3832
  > **log**(`opt`, `msg`, `fend?`): `void`
3833
3833
 
3834
- Defined in: [lib/core.ts:1153](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1153)
3834
+ Defined in: [lib/core.ts:1208](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1208)
3835
3835
 
3836
3836
  写入文件日志
3837
3837
 
@@ -3872,7 +3872,7 @@ lib/core/functions/ls.md
3872
3872
 
3873
3873
  > **ls**(`opt`): `Promise`\<`object`[]\>
3874
3874
 
3875
- Defined in: [lib/core.ts:1315](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1315)
3875
+ Defined in: [lib/core.ts:1370](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1370)
3876
3876
 
3877
3877
  获取目录内文件/文件夹列表
3878
3878
 
@@ -4242,7 +4242,7 @@ lib/core/functions/removeGlobal.md
4242
4242
 
4243
4243
  > **removeGlobal**(`key`, `hosts?`): `Promise`\<`Record`\<`string`, \{ `result`: `boolean`; `return`: `string`; \}\>\>
4244
4244
 
4245
- Defined in: [lib/core.ts:970](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L970)
4245
+ Defined in: [lib/core.ts:1025](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1025)
4246
4246
 
4247
4247
  移除某个跨线程/跨内网服务器全局变量
4248
4248
 
@@ -4277,7 +4277,7 @@ lib/core/functions/resolveEnvVars.md
4277
4277
 
4278
4278
  > **resolveEnvVars**(`obj`): `void`
4279
4279
 
4280
- Defined in: [lib/core.ts:1514](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1514)
4280
+ Defined in: [lib/core.ts:1569](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1569)
4281
4281
 
4282
4282
  将配置对象中的 ${ENV_VAR} 占位符替换为 process.env 的值
4283
4283
 
@@ -4306,7 +4306,7 @@ lib/core/functions/sendNpm.md
4306
4306
 
4307
4307
  > **sendNpm**(`path`, `hosts?`): `Promise`\<`Record`\<`string`, \{ `result`: `boolean`; `return`: `string`; \}\>\>
4308
4308
 
4309
- Defined in: [lib/core.ts:869](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L869)
4309
+ Defined in: [lib/core.ts:924](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L924)
4310
4310
 
4311
4311
  向本机或局域网 RPC 发送 npm install 操作
4312
4312
 
@@ -4341,7 +4341,7 @@ lib/core/functions/sendPackage.md
4341
4341
 
4342
4342
  > **sendPackage**(`content`, `hosts?`): `Promise`\<`Record`\<`string`, \{ `result`: `boolean`; `return`: `string`; \}\>\>
4343
4343
 
4344
- Defined in: [lib/core.ts:1093](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1093)
4344
+ Defined in: [lib/core.ts:1148](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1148)
4345
4345
 
4346
4346
  向本机或局域网 RPC 发送 package.json 更新操作
4347
4347
 
@@ -4376,7 +4376,7 @@ lib/core/functions/sendPm2.md
4376
4376
 
4377
4377
  > **sendPm2**(`name`, `action?`, `hosts?`): `Promise`\<`Record`\<`string`, \{ `result`: `boolean`; `return`: `string`; \}\>\>
4378
4378
 
4379
- Defined in: [lib/core.ts:821](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L821)
4379
+ Defined in: [lib/core.ts:876](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L876)
4380
4380
 
4381
4381
  向本机或局域网 RPC 发送 PM2 操作
4382
4382
 
@@ -4404,6 +4404,8 @@ PM2 操作类型
4404
4404
 
4405
4405
  `Promise`\<`Record`\<`string`, \{ `result`: `boolean`; `return`: `string`; \}\>\>
4406
4406
 
4407
+ 各主机是否已接收并排队,不代表 PM2 操作最终执行成功
4408
+
4407
4409
  lib/core/functions/sendProject.md
4408
4410
  ---
4409
4411
 
@@ -4417,7 +4419,7 @@ lib/core/functions/sendProject.md
4417
4419
 
4418
4420
  > **sendProject**(`path`, `key`, `value`, `hosts?`): `Promise`\<`Record`\<`string`, \{ `result`: `boolean`; `return`: `string`; \}\>\>
4419
4421
 
4420
- Defined in: [lib/core.ts:1045](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1045)
4422
+ Defined in: [lib/core.ts:1100](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1100)
4421
4423
 
4422
4424
  向本机或局域网 RPC 发送项目配置更新操作
4423
4425
 
@@ -4507,6 +4509,37 @@ Defined in: [lib/core.ts:763](https://github.com/maiyunnet/kebab/blob/master/lib
4507
4509
 
4508
4510
  `Promise`\<`Record`\<`string`, \{ `result`: `boolean`; `return`: `string`; \}\>\>
4509
4511
 
4512
+ lib/core/functions/sendStop.md
4513
+ ---
4514
+
4515
+ [**Documents for @maiyunnet/kebab**](../../../index.md)
4516
+
4517
+ ***
4518
+
4519
+ [Documents for @maiyunnet/kebab](../../../index.md) / [lib/core](../index.md) / sendStop
4520
+
4521
+ # Function: sendStop()
4522
+
4523
+ > **sendStop**(`hosts?`): `Promise`\<`Record`\<`string`, \{ `result`: `boolean`; `return`: `string`; \}\>\>
4524
+
4525
+ Defined in: [lib/core.ts:817](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L817)
4526
+
4527
+ 向主进程(或局域网同代码机子)发送 stop 操作,停止接收新连接并在现有连接全部结束后退出
4528
+
4529
+ ## Parameters
4530
+
4531
+ ### hosts?
4532
+
4533
+ `string`[] \| `"config"`
4534
+
4535
+ 局域网主机列表,config 表示使用全局配置;不传时通知当前 master
4536
+
4537
+ ## Returns
4538
+
4539
+ `Promise`\<`Record`\<`string`, \{ `result`: `boolean`; `return`: `string`; \}\>\>
4540
+
4541
+ 各主机发送结果
4542
+
4510
4543
  lib/core/functions/setCookie.md
4511
4544
  ---
4512
4545
 
@@ -4567,7 +4600,7 @@ lib/core/functions/setGlobal.md
4567
4600
 
4568
4601
  > **setGlobal**(`key`, `data`, `hosts?`): `Promise`\<`Record`\<`string`, \{ `result`: `boolean`; `return`: `string`; \}\>\>
4569
4602
 
4570
- Defined in: [lib/core.ts:920](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L920)
4603
+ Defined in: [lib/core.ts:975](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L975)
4571
4604
 
4572
4605
  设置跨线程/指定的局域网主机的全局变量
4573
4606
 
@@ -4666,7 +4699,7 @@ lib/core/functions/updateCode.md
4666
4699
 
4667
4700
  > **updateCode**(`sourcePath`, `path`, `hosts?`, `config?`, `strict?`): `Promise`\<`Record`\<`string`, \{ `result`: `boolean`; `return`: `string`; \}\>\>
4668
4701
 
4669
- Defined in: [lib/core.ts:985](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L985)
4702
+ Defined in: [lib/core.ts:1040](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1040)
4670
4703
 
4671
4704
  上传并覆盖代码文件,config.json、kebab.json、.js.map、.ts, .gitignore 不会被覆盖和新创建
4672
4705
 
@@ -4719,7 +4752,7 @@ lib/core/functions/writeEventStreamHead.md
4719
4752
 
4720
4753
  > **writeEventStreamHead**(`res`): `void`
4721
4754
 
4722
- Defined in: [lib/core.ts:1454](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1454)
4755
+ Defined in: [lib/core.ts:1509](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1509)
4723
4756
 
4724
4757
  提交服务器发送事件(SSE)响应头
4725
4758
 
@@ -4754,7 +4787,7 @@ lib/core/functions/writeHead.md
4754
4787
 
4755
4788
  > **writeHead**(`res`, `statusCode`, `headers?`): `void`
4756
4789
 
4757
- Defined in: [lib/core.ts:1433](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1433)
4790
+ Defined in: [lib/core.ts:1488](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1488)
4758
4791
 
4759
4792
  提交 HTTP 响应状态和头部,兼容 HTTP/1.1 与 HTTP/2
4760
4793
 
@@ -4804,7 +4837,7 @@ lib/core/functions/write.md
4804
4837
 
4805
4838
  > **write**(`res`, `data`): `void`
4806
4839
 
4807
- Defined in: [lib/core.ts:1466](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1466)
4840
+ Defined in: [lib/core.ts:1521](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1521)
4808
4841
 
4809
4842
  向 res 发送数据
4810
4843
 
@@ -4900,6 +4933,7 @@ lib/core/index.md
4900
4933
  - [sendProject](functions/sendProject.md)
4901
4934
  - [sendReload](functions/sendReload.md)
4902
4935
  - [sendRestart](functions/sendRestart.md)
4936
+ - [sendStop](functions/sendStop.md)
4903
4937
  - [setCookie](functions/setCookie.md)
4904
4938
  - [setGlobal](functions/setGlobal.md)
4905
4939
  - [sleep](functions/sleep.md)
@@ -4983,7 +5017,7 @@ lib/core/interfaces/ILogOptions.md
4983
5017
 
4984
5018
  # Interface: ILogOptions
4985
5019
 
4986
- Defined in: [lib/core.ts:1136](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1136)
5020
+ Defined in: [lib/core.ts:1191](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1191)
4987
5021
 
4988
5022
  log 设置的选项
4989
5023
 
@@ -4993,7 +5027,7 @@ log 设置的选项
4993
5027
 
4994
5028
  > `optional` **cookie?**: `Record`\<`string`, `string`\>
4995
5029
 
4996
- Defined in: [lib/core.ts:1142](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1142)
5030
+ Defined in: [lib/core.ts:1197](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1197)
4997
5031
 
4998
5032
  ***
4999
5033
 
@@ -5001,7 +5035,7 @@ Defined in: [lib/core.ts:1142](https://github.com/maiyunnet/kebab/blob/master/li
5001
5035
 
5002
5036
  > `optional` **get?**: `Record`\<`string`, `any`\>
5003
5037
 
5004
- Defined in: [lib/core.ts:1141](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1141)
5038
+ Defined in: [lib/core.ts:1196](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1196)
5005
5039
 
5006
5040
  ***
5007
5041
 
@@ -5009,7 +5043,7 @@ Defined in: [lib/core.ts:1141](https://github.com/maiyunnet/kebab/blob/master/li
5009
5043
 
5010
5044
  > `optional` **headers?**: `IncomingHttpHeaders`
5011
5045
 
5012
- Defined in: [lib/core.ts:1144](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1144)
5046
+ Defined in: [lib/core.ts:1199](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1199)
5013
5047
 
5014
5048
  ***
5015
5049
 
@@ -5017,7 +5051,7 @@ Defined in: [lib/core.ts:1144](https://github.com/maiyunnet/kebab/blob/master/li
5017
5051
 
5018
5052
  > `optional` **hostname?**: `string`
5019
5053
 
5020
- Defined in: [lib/core.ts:1139](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1139)
5054
+ Defined in: [lib/core.ts:1194](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1194)
5021
5055
 
5022
5056
  ***
5023
5057
 
@@ -5025,7 +5059,7 @@ Defined in: [lib/core.ts:1139](https://github.com/maiyunnet/kebab/blob/master/li
5025
5059
 
5026
5060
  > `optional` **path?**: `string`
5027
5061
 
5028
- Defined in: [lib/core.ts:1137](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1137)
5062
+ Defined in: [lib/core.ts:1192](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1192)
5029
5063
 
5030
5064
  ***
5031
5065
 
@@ -5033,7 +5067,7 @@ Defined in: [lib/core.ts:1137](https://github.com/maiyunnet/kebab/blob/master/li
5033
5067
 
5034
5068
  > `optional` **req?**: `IncomingMessage` \| `Http2ServerRequest` \| `null`
5035
5069
 
5036
- Defined in: [lib/core.ts:1140](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1140)
5070
+ Defined in: [lib/core.ts:1195](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1195)
5037
5071
 
5038
5072
  ***
5039
5073
 
@@ -5041,7 +5075,7 @@ Defined in: [lib/core.ts:1140](https://github.com/maiyunnet/kebab/blob/master/li
5041
5075
 
5042
5076
  > `optional` **session?**: `Record`\<`string`, `any`\>
5043
5077
 
5044
- Defined in: [lib/core.ts:1143](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1143)
5078
+ Defined in: [lib/core.ts:1198](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1198)
5045
5079
 
5046
5080
  ***
5047
5081
 
@@ -5049,7 +5083,7 @@ Defined in: [lib/core.ts:1143](https://github.com/maiyunnet/kebab/blob/master/li
5049
5083
 
5050
5084
  > `optional` **urlFull?**: `string`
5051
5085
 
5052
- Defined in: [lib/core.ts:1138](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1138)
5086
+ Defined in: [lib/core.ts:1193](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L1193)
5053
5087
 
5054
5088
  lib/core/namespaces/v/classes/ValiError.md
5055
5089
  ---
@@ -111469,7 +111503,7 @@ lib/core/type-aliases/TPm2Action.md
111469
111503
 
111470
111504
  > **TPm2Action** = `"start"` \| `"stop"` \| `"restart"`
111471
111505
 
111472
- Defined in: [lib/core.ts:813](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L813)
111506
+ Defined in: [lib/core.ts:867](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L867)
111473
111507
 
111474
111508
  PM2 操作类型
111475
111509
 
@@ -111543,7 +111577,7 @@ lib/core/variables/global.md
111543
111577
 
111544
111578
  > `const` **global**: `Record`\<`string`, `any`\> = `{}`
111545
111579
 
111546
- Defined in: [lib/core.ts:912](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L912)
111580
+ Defined in: [lib/core.ts:967](https://github.com/maiyunnet/kebab/blob/master/lib/core.ts#L967)
111547
111581
 
111548
111582
  跨进程全局变量
111549
111583
 
@@ -125042,7 +125076,7 @@ lib/undici/functions/fetch.md
125042
125076
 
125043
125077
  > **fetch**(`input`, `init?`): `Promise`\<`Response`\>
125044
125078
 
125045
- Defined in: [lib/undici.ts:260](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L260)
125079
+ Defined in: [lib/undici.ts:261](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L261)
125046
125080
 
125047
125081
  发起一个完全兼容 fetch 的请求
125048
125082
 
@@ -125077,7 +125111,7 @@ lib/undici/functions/filterHeaders.md
125077
125111
 
125078
125112
  > **filterHeaders**(`headers`, `res?`, `filter?`): `Record`\<`string`, `string` \| `string`[]\>
125079
125113
 
125080
- Defined in: [lib/undici.ts:634](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L634)
125114
+ Defined in: [lib/undici.ts:635](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L635)
125081
125115
 
125082
125116
  剔除不代理的 header,返回新的 header
125083
125117
 
@@ -125118,7 +125152,7 @@ lib/undici/functions/getFormData.md
125118
125152
 
125119
125153
  > **getFormData**(): [`FormData`](../formdata/classes/FormData.md)
125120
125154
 
125121
- Defined in: [lib/undici.ts:618](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L618)
125155
+ Defined in: [lib/undici.ts:619](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L619)
125122
125156
 
125123
125157
  创建 FormData 对象
125124
125158
 
@@ -125201,7 +125235,7 @@ lib/undici/functions/getResponseJson.md
125201
125235
 
125202
125236
  > **getResponseJson**(`u`, `opt?`): `Promise`\<`any`\>
125203
125237
 
125204
- Defined in: [lib/undici.ts:248](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L248)
125238
+ Defined in: [lib/undici.ts:249](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L249)
125205
125239
 
125206
125240
  发起 GET 请求并解析 JSON 响应
125207
125241
 
@@ -125238,7 +125272,7 @@ lib/undici/functions/mproxyData.md
125238
125272
 
125239
125273
  > **mproxyData**(`ctr`): `any`
125240
125274
 
125241
- Defined in: [lib/undici.ts:736](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L736)
125275
+ Defined in: [lib/undici.ts:741](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L741)
125242
125276
 
125243
125277
  获取 mproxy 的附加数据
125244
125278
 
@@ -125267,7 +125301,7 @@ lib/undici/functions/mproxy.md
125267
125301
 
125268
125302
  > **mproxy**(`ctr`, `auth`, `opt?`): `Promise`\<`number`\>
125269
125303
 
125270
- Defined in: [lib/undici.ts:674](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L674)
125304
+ Defined in: [lib/undici.ts:675](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L675)
125271
125305
 
125272
125306
  正向 mproxy 代理,注意提前处理不要自动处理 post 数据,读取 get 的 url 为实际请求地址
125273
125307
  get: url, auth
@@ -125377,7 +125411,7 @@ lib/undici/functions/postJsonResponseJson.md
125377
125411
 
125378
125412
  > **postJsonResponseJson**(`u`, `data`, `opt?`): `Promise`\<`any`\>
125379
125413
 
125380
- Defined in: [lib/undici.ts:220](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L220)
125414
+ Defined in: [lib/undici.ts:221](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L221)
125381
125415
 
125382
125416
  发起 JSON 请求并解析 JSON 响应
125383
125417
 
@@ -125461,7 +125495,7 @@ lib/undici/functions/postResponseJson.md
125461
125495
 
125462
125496
  > **postResponseJson**(`u`, `data`, `opt?`): `Promise`\<`any`\>
125463
125497
 
125464
- Defined in: [lib/undici.ts:235](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L235)
125498
+ Defined in: [lib/undici.ts:236](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L236)
125465
125499
 
125466
125500
  发起 POST 请求并解析 JSON 响应
125467
125501
 
@@ -125504,7 +125538,7 @@ lib/undici/functions/request.md
125504
125538
 
125505
125539
  > **request**(`u`, `data?`, `opt?`): `Promise`\<[`Response`](../response/classes/Response.md)\>
125506
125540
 
125507
- Defined in: [lib/undici.ts:432](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L432)
125541
+ Defined in: [lib/undici.ts:433](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L433)
125508
125542
 
125509
125543
  发起一个请求
125510
125544
 
@@ -125541,7 +125575,7 @@ lib/undici/functions/rproxy.md
125541
125575
 
125542
125576
  > **rproxy**(`ctr`, `route`, `opt?`): `Promise`\<`boolean`\>
125543
125577
 
125544
- Defined in: [lib/undici.ts:766](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L766)
125578
+ Defined in: [lib/undici.ts:771](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L771)
125545
125579
 
125546
125580
  反向代理,将本服务器的某个路由反代到其他网址
125547
125581
 
@@ -125630,7 +125664,7 @@ lib/undici/interfaces/IMproxyOptions.md
125630
125664
 
125631
125665
  # Interface: IMproxyOptions
125632
125666
 
125633
- Defined in: [lib/undici.ts:889](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L889)
125667
+ Defined in: [lib/undici.ts:902](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L902)
125634
125668
 
125635
125669
  正向代理请求的传入参数选项
125636
125670
 
@@ -125640,7 +125674,7 @@ Defined in: [lib/undici.ts:889](https://github.com/maiyunnet/kebab/blob/master/l
125640
125674
 
125641
125675
  > `optional` **filter?**: (`h`) => `boolean`
125642
125676
 
125643
- Defined in: [lib/undici.ts:898](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L898)
125677
+ Defined in: [lib/undici.ts:911](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L911)
125644
125678
 
125645
125679
  过滤 header,返回 true 则留下
125646
125680
 
@@ -125660,7 +125694,7 @@ Defined in: [lib/undici.ts:898](https://github.com/maiyunnet/kebab/blob/master/l
125660
125694
 
125661
125695
  > `optional` **follow?**: `number`
125662
125696
 
125663
- Defined in: [lib/undici.ts:892](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L892)
125697
+ Defined in: [lib/undici.ts:905](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L905)
125664
125698
 
125665
125699
  ***
125666
125700
 
@@ -125668,7 +125702,7 @@ Defined in: [lib/undici.ts:892](https://github.com/maiyunnet/kebab/blob/master/l
125668
125702
 
125669
125703
  > `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
125670
125704
 
125671
- Defined in: [lib/undici.ts:896](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L896)
125705
+ Defined in: [lib/undici.ts:909](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L909)
125672
125706
 
125673
125707
  ***
125674
125708
 
@@ -125676,7 +125710,7 @@ Defined in: [lib/undici.ts:896](https://github.com/maiyunnet/kebab/blob/master/l
125676
125710
 
125677
125711
  > `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
125678
125712
 
125679
- Defined in: [lib/undici.ts:894](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L894)
125713
+ Defined in: [lib/undici.ts:907](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L907)
125680
125714
 
125681
125715
  自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
125682
125716
 
@@ -125686,7 +125720,7 @@ Defined in: [lib/undici.ts:894](https://github.com/maiyunnet/kebab/blob/master/l
125686
125720
 
125687
125721
  > `optional` **local?**: `string`
125688
125722
 
125689
- Defined in: [lib/undici.ts:895](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L895)
125723
+ Defined in: [lib/undici.ts:908](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L908)
125690
125724
 
125691
125725
  ***
125692
125726
 
@@ -125694,7 +125728,7 @@ Defined in: [lib/undici.ts:895](https://github.com/maiyunnet/kebab/blob/master/l
125694
125728
 
125695
125729
  > `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
125696
125730
 
125697
- Defined in: [lib/undici.ts:900](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L900)
125731
+ Defined in: [lib/undici.ts:913](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L913)
125698
125732
 
125699
125733
  默认为 default
125700
125734
 
@@ -125704,7 +125738,7 @@ Defined in: [lib/undici.ts:900](https://github.com/maiyunnet/kebab/blob/master/l
125704
125738
 
125705
125739
  > `optional` **timeout?**: `number`
125706
125740
 
125707
- Defined in: [lib/undici.ts:891](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L891)
125741
+ Defined in: [lib/undici.ts:904](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L904)
125708
125742
 
125709
125743
  秒数,默认 300 秒
125710
125744
 
@@ -125719,7 +125753,7 @@ lib/undici/interfaces/IRequestOptions.md
125719
125753
 
125720
125754
  # Interface: IRequestOptions
125721
125755
 
125722
- Defined in: [lib/undici.ts:852](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L852)
125756
+ Defined in: [lib/undici.ts:863](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L863)
125723
125757
 
125724
125758
  请求的传入参数选项
125725
125759
 
@@ -125729,7 +125763,7 @@ Defined in: [lib/undici.ts:852](https://github.com/maiyunnet/kebab/blob/master/l
125729
125763
 
125730
125764
  > `optional` **cookie?**: `Record`\<`string`, [`ICookie`](../../cookie/interfaces/ICookie.md)\>
125731
125765
 
125732
- Defined in: [lib/undici.ts:881](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L881)
125766
+ Defined in: [lib/undici.ts:894](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L894)
125733
125767
 
125734
125768
  cookie 托管对象
125735
125769
 
@@ -125739,7 +125773,7 @@ cookie 托管对象
125739
125773
 
125740
125774
  > `optional` **follow?**: `number`
125741
125775
 
125742
- Defined in: [lib/undici.ts:862](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L862)
125776
+ Defined in: [lib/undici.ts:875](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L875)
125743
125777
 
125744
125778
  追踪 location 次数,0 为不追踪,默认为 0
125745
125779
 
@@ -125749,7 +125783,7 @@ Defined in: [lib/undici.ts:862](https://github.com/maiyunnet/kebab/blob/master/l
125749
125783
 
125750
125784
  > `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
125751
125785
 
125752
- Defined in: [lib/undici.ts:867](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L867)
125786
+ Defined in: [lib/undici.ts:880](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L880)
125753
125787
 
125754
125788
  ***
125755
125789
 
@@ -125757,7 +125791,7 @@ Defined in: [lib/undici.ts:867](https://github.com/maiyunnet/kebab/blob/master/l
125757
125791
 
125758
125792
  > `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
125759
125793
 
125760
- Defined in: [lib/undici.ts:864](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L864)
125794
+ Defined in: [lib/undici.ts:877](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L877)
125761
125795
 
125762
125796
  自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
125763
125797
 
@@ -125767,7 +125801,7 @@ Defined in: [lib/undici.ts:864](https://github.com/maiyunnet/kebab/blob/master/l
125767
125801
 
125768
125802
  > `optional` **keep?**: `boolean`
125769
125803
 
125770
- Defined in: [lib/undici.ts:877](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L877)
125804
+ Defined in: [lib/undici.ts:890](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L890)
125771
125805
 
125772
125806
  连接是否保持长连接(即是否允许复用),默认为 true
125773
125807
 
@@ -125777,7 +125811,7 @@ Defined in: [lib/undici.ts:877](https://github.com/maiyunnet/kebab/blob/master/l
125777
125811
 
125778
125812
  > `optional` **local?**: `string`
125779
125813
 
125780
- Defined in: [lib/undici.ts:866](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L866)
125814
+ Defined in: [lib/undici.ts:879](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L879)
125781
125815
 
125782
125816
  ***
125783
125817
 
@@ -125785,7 +125819,7 @@ Defined in: [lib/undici.ts:866](https://github.com/maiyunnet/kebab/blob/master/l
125785
125819
 
125786
125820
  > `optional` **log?**: `boolean`
125787
125821
 
125788
- Defined in: [lib/undici.ts:883](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L883)
125822
+ Defined in: [lib/undici.ts:896](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L896)
125789
125823
 
125790
125824
  若有异常写入文件日志,默认为 true
125791
125825
 
@@ -125795,7 +125829,7 @@ Defined in: [lib/undici.ts:883](https://github.com/maiyunnet/kebab/blob/master/l
125795
125829
 
125796
125830
  > `optional` **method?**: `"GET"` \| `"POST"` \| `"PUT"` \| `"DELETE"` \| `"OPTIONS"`
125797
125831
 
125798
- Defined in: [lib/undici.ts:853](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L853)
125832
+ Defined in: [lib/undici.ts:864](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L864)
125799
125833
 
125800
125834
  ***
125801
125835
 
@@ -125803,7 +125837,7 @@ Defined in: [lib/undici.ts:853](https://github.com/maiyunnet/kebab/blob/master/l
125803
125837
 
125804
125838
  > `optional` **mproxy?**: `object`
125805
125839
 
125806
- Defined in: [lib/undici.ts:869](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L869)
125840
+ Defined in: [lib/undici.ts:882](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L882)
125807
125841
 
125808
125842
  正向 mproxy 代理,url 如 https://xxx/abc
125809
125843
 
@@ -125831,7 +125865,7 @@ Defined in: [lib/undici.ts:869](https://github.com/maiyunnet/kebab/blob/master/l
125831
125865
 
125832
125866
  > `optional` **retry?**: `number`
125833
125867
 
125834
- Defined in: [lib/undici.ts:858](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L858)
125868
+ Defined in: [lib/undici.ts:869](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L869)
125835
125869
 
125836
125870
  网络异常后的重试次数,默认 0;流式请求体不可重试,非幂等请求需由调用方保证安全
125837
125871
 
@@ -125841,17 +125875,37 @@ Defined in: [lib/undici.ts:858](https://github.com/maiyunnet/kebab/blob/master/l
125841
125875
 
125842
125876
  > `optional` **retryJson?**: `number`
125843
125877
 
125844
- Defined in: [lib/undici.ts:860](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L860)
125878
+ Defined in: [lib/undici.ts:871](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L871)
125845
125879
 
125846
125880
  JSON 解析失败后的重试次数,默认 0;仅适用于 ResponseJson 快捷方法,非幂等请求需由调用方保证安全
125847
125881
 
125848
125882
  ***
125849
125883
 
125884
+ ### retryJsonHandler?
125885
+
125886
+ > `optional` **retryJsonHandler?**: (`json`) => `boolean`
125887
+
125888
+ Defined in: [lib/undici.ts:873](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L873)
125889
+
125890
+ JSON 重试验证方法;返回 false 时按 retryJson 的设置重试,仅适用于 ResponseJson 快捷方法
125891
+
125892
+ #### Parameters
125893
+
125894
+ ##### json
125895
+
125896
+ `any`
125897
+
125898
+ #### Returns
125899
+
125900
+ `boolean`
125901
+
125902
+ ***
125903
+
125850
125904
  ### reuse?
125851
125905
 
125852
125906
  > `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
125853
125907
 
125854
- Defined in: [lib/undici.ts:879](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L879)
125908
+ Defined in: [lib/undici.ts:892](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L892)
125855
125909
 
125856
125910
  复用池名/Agent,默认为 default
125857
125911
 
@@ -125861,7 +125915,7 @@ Defined in: [lib/undici.ts:879](https://github.com/maiyunnet/kebab/blob/master/l
125861
125915
 
125862
125916
  > `optional` **save?**: `string`
125863
125917
 
125864
- Defined in: [lib/undici.ts:865](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L865)
125918
+ Defined in: [lib/undici.ts:878](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L878)
125865
125919
 
125866
125920
  ***
125867
125921
 
@@ -125869,7 +125923,7 @@ Defined in: [lib/undici.ts:865](https://github.com/maiyunnet/kebab/blob/master/l
125869
125923
 
125870
125924
  > `optional` **signal?**: `AbortSignal`
125871
125925
 
125872
- Defined in: [lib/undici.ts:885](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L885)
125926
+ Defined in: [lib/undici.ts:898](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L898)
125873
125927
 
125874
125928
  请求中止信号
125875
125929
 
@@ -125879,7 +125933,7 @@ Defined in: [lib/undici.ts:885](https://github.com/maiyunnet/kebab/blob/master/l
125879
125933
 
125880
125934
  > `optional` **timeout?**: `number`
125881
125935
 
125882
- Defined in: [lib/undici.ts:856](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L856)
125936
+ Defined in: [lib/undici.ts:867](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L867)
125883
125937
 
125884
125938
  秒数,默认 300 秒
125885
125939
 
@@ -125889,7 +125943,7 @@ Defined in: [lib/undici.ts:856](https://github.com/maiyunnet/kebab/blob/master/l
125889
125943
 
125890
125944
  > `optional` **type?**: `"form"` \| `"json"`
125891
125945
 
125892
- Defined in: [lib/undici.ts:854](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L854)
125946
+ Defined in: [lib/undici.ts:865](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L865)
125893
125947
 
125894
125948
  lib/undici/interfaces/IRproxyOptions.md
125895
125949
  ---
@@ -125902,7 +125956,7 @@ lib/undici/interfaces/IRproxyOptions.md
125902
125956
 
125903
125957
  # Interface: IRproxyOptions
125904
125958
 
125905
- Defined in: [lib/undici.ts:904](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L904)
125959
+ Defined in: [lib/undici.ts:917](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L917)
125906
125960
 
125907
125961
  反向代理请求的传入参数选项
125908
125962
 
@@ -125912,7 +125966,7 @@ Defined in: [lib/undici.ts:904](https://github.com/maiyunnet/kebab/blob/master/l
125912
125966
 
125913
125967
  > `optional` **body?**: `string` \| `Buffer`\<`ArrayBufferLike`\> \| `Readable`
125914
125968
 
125915
- Defined in: [lib/undici.ts:923](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L923)
125969
+ Defined in: [lib/undici.ts:936](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L936)
125916
125970
 
125917
125971
  手动传入请求体(优先于原始 req 流),用于 req 流已消费后仍需转发 body 的场景
125918
125972
 
@@ -125922,7 +125976,7 @@ Defined in: [lib/undici.ts:923](https://github.com/maiyunnet/kebab/blob/master/l
125922
125976
 
125923
125977
  > `optional` **filter?**: (`h`) => `boolean`
125924
125978
 
125925
- Defined in: [lib/undici.ts:913](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L913)
125979
+ Defined in: [lib/undici.ts:926](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L926)
125926
125980
 
125927
125981
  过滤 header,返回 true 则留下
125928
125982
 
@@ -125942,7 +125996,7 @@ Defined in: [lib/undici.ts:913](https://github.com/maiyunnet/kebab/blob/master/l
125942
125996
 
125943
125997
  > `optional` **follow?**: `number`
125944
125998
 
125945
- Defined in: [lib/undici.ts:907](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L907)
125999
+ Defined in: [lib/undici.ts:920](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L920)
125946
126000
 
125947
126001
  ***
125948
126002
 
@@ -125950,7 +126004,7 @@ Defined in: [lib/undici.ts:907](https://github.com/maiyunnet/kebab/blob/master/l
125950
126004
 
125951
126005
  > `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
125952
126006
 
125953
- Defined in: [lib/undici.ts:911](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L911)
126007
+ Defined in: [lib/undici.ts:924](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L924)
125954
126008
 
125955
126009
  ***
125956
126010
 
@@ -125958,7 +126012,7 @@ Defined in: [lib/undici.ts:911](https://github.com/maiyunnet/kebab/blob/master/l
125958
126012
 
125959
126013
  > `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
125960
126014
 
125961
- Defined in: [lib/undici.ts:909](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L909)
126015
+ Defined in: [lib/undici.ts:922](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L922)
125962
126016
 
125963
126017
  自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
125964
126018
 
@@ -125968,7 +126022,7 @@ Defined in: [lib/undici.ts:909](https://github.com/maiyunnet/kebab/blob/master/l
125968
126022
 
125969
126023
  > `optional` **local?**: `string`
125970
126024
 
125971
- Defined in: [lib/undici.ts:910](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L910)
126025
+ Defined in: [lib/undici.ts:923](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L923)
125972
126026
 
125973
126027
  ***
125974
126028
 
@@ -125976,7 +126030,7 @@ Defined in: [lib/undici.ts:910](https://github.com/maiyunnet/kebab/blob/master/l
125976
126030
 
125977
126031
  > `optional` **mproxy?**: `object`
125978
126032
 
125979
- Defined in: [lib/undici.ts:915](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L915)
126033
+ Defined in: [lib/undici.ts:928](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L928)
125980
126034
 
125981
126035
  正向 mproxy 代理,url 如 https://xxx/abc
125982
126036
 
@@ -126004,7 +126058,7 @@ Defined in: [lib/undici.ts:915](https://github.com/maiyunnet/kebab/blob/master/l
126004
126058
 
126005
126059
  > `optional` **querys?**: `Record`\<`string`, `any`\>
126006
126060
 
126007
- Defined in: [lib/undici.ts:925](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L925)
126061
+ Defined in: [lib/undici.ts:938](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L938)
126008
126062
 
126009
126063
  自定义 GET 查询参数,传入后直接替换代理目标 URL 的整个 query string
126010
126064
 
@@ -126014,7 +126068,7 @@ Defined in: [lib/undici.ts:925](https://github.com/maiyunnet/kebab/blob/master/l
126014
126068
 
126015
126069
  > `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
126016
126070
 
126017
- Defined in: [lib/undici.ts:927](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L927)
126071
+ Defined in: [lib/undici.ts:940](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L940)
126018
126072
 
126019
126073
  默认为 default
126020
126074
 
@@ -126024,7 +126078,7 @@ Defined in: [lib/undici.ts:927](https://github.com/maiyunnet/kebab/blob/master/l
126024
126078
 
126025
126079
  > `optional` **timeout?**: `number`
126026
126080
 
126027
- Defined in: [lib/undici.ts:906](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L906)
126081
+ Defined in: [lib/undici.ts:919](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L919)
126028
126082
 
126029
126083
  秒数,默认 300 秒
126030
126084
 
@@ -126535,7 +126589,7 @@ lib/undici/type-aliases/THttpHeaders.md
126535
126589
 
126536
126590
  > **THttpHeaders** = `http.IncomingHttpHeaders` & `object`
126537
126591
 
126538
- Defined in: [lib/undici.ts:932](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L932)
126592
+ Defined in: [lib/undici.ts:945](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L945)
126539
126593
 
126540
126594
  http headers
126541
126595
 
@@ -126822,7 +126876,7 @@ lib/ws/classes/Socket.md
126822
126876
 
126823
126877
  # Class: Socket
126824
126878
 
126825
- Defined in: [lib/ws.ts:96](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L96)
126879
+ Defined in: [lib/ws.ts:106](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L106)
126826
126880
 
126827
126881
  ## Constructors
126828
126882
 
@@ -126830,7 +126884,7 @@ Defined in: [lib/ws.ts:96](https://github.com/maiyunnet/kebab/blob/master/lib/ws
126830
126884
 
126831
126885
  > **new Socket**(`request?`, `socket?`, `head?`, `options?`): `Socket`
126832
126886
 
126833
- Defined in: [lib/ws.ts:101](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L101)
126887
+ Defined in: [lib/ws.ts:111](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L111)
126834
126888
 
126835
126889
  #### Parameters
126836
126890
 
@@ -126868,7 +126922,7 @@ Defined in: [lib/ws.ts:101](https://github.com/maiyunnet/kebab/blob/master/lib/w
126868
126922
 
126869
126923
  > **get** **ended**(): `boolean`
126870
126924
 
126871
- Defined in: [lib/ws.ts:366](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L366)
126925
+ Defined in: [lib/ws.ts:420](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L420)
126872
126926
 
126873
126927
  当前是否已经结束读取,并且无法继续读取
126874
126928
 
@@ -126884,7 +126938,7 @@ Defined in: [lib/ws.ts:366](https://github.com/maiyunnet/kebab/blob/master/lib/w
126884
126938
 
126885
126939
  > **get** **finished**(): `boolean`
126886
126940
 
126887
- Defined in: [lib/ws.ts:371](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L371)
126941
+ Defined in: [lib/ws.ts:425](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L425)
126888
126942
 
126889
126943
  当前是否已经结束写入,并且无法继续写入
126890
126944
 
@@ -126900,7 +126954,7 @@ Defined in: [lib/ws.ts:371](https://github.com/maiyunnet/kebab/blob/master/lib/w
126900
126954
 
126901
126955
  > **get** **isServer**(): `boolean`
126902
126956
 
126903
- Defined in: [lib/ws.ts:378](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L378)
126957
+ Defined in: [lib/ws.ts:432](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L432)
126904
126958
 
126905
126959
  当前连接是不是服务器连接
126906
126960
 
@@ -126916,7 +126970,7 @@ Defined in: [lib/ws.ts:378](https://github.com/maiyunnet/kebab/blob/master/lib/w
126916
126970
 
126917
126971
  > **get** **writable**(): `boolean`
126918
126972
 
126919
- Defined in: [lib/ws.ts:361](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L361)
126973
+ Defined in: [lib/ws.ts:415](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L415)
126920
126974
 
126921
126975
  当前是否是可写状态
126922
126976
 
@@ -126930,7 +126984,7 @@ Defined in: [lib/ws.ts:361](https://github.com/maiyunnet/kebab/blob/master/lib/w
126930
126984
 
126931
126985
  > **connect**(`u`, `opt?`): `Promise`\<`Socket` \| `null`\>
126932
126986
 
126933
- Defined in: [lib/ws.ts:124](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L124)
126987
+ Defined in: [lib/ws.ts:134](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L134)
126934
126988
 
126935
126989
  以客户端形式发起链接
126936
126990
 
@@ -126958,7 +127012,7 @@ Defined in: [lib/ws.ts:124](https://github.com/maiyunnet/kebab/blob/master/lib/w
126958
127012
 
126959
127013
  > **destroy**(): `void`
126960
127014
 
126961
- Defined in: [lib/ws.ts:332](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L332)
127015
+ Defined in: [lib/ws.ts:375](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L375)
126962
127016
 
126963
127017
  #### Returns
126964
127018
 
@@ -126970,7 +127024,7 @@ Defined in: [lib/ws.ts:332](https://github.com/maiyunnet/kebab/blob/master/lib/w
126970
127024
 
126971
127025
  > **end**(): `void`
126972
127026
 
126973
- Defined in: [lib/ws.ts:328](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L328)
127027
+ Defined in: [lib/ws.ts:371](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L371)
126974
127028
 
126975
127029
  #### Returns
126976
127030
 
@@ -126982,7 +127036,7 @@ Defined in: [lib/ws.ts:328](https://github.com/maiyunnet/kebab/blob/master/lib/w
126982
127036
 
126983
127037
  > **off**(`event`): `this`
126984
127038
 
126985
- Defined in: [lib/ws.ts:323](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L323)
127039
+ Defined in: [lib/ws.ts:366](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L366)
126986
127040
 
126987
127041
  取消监听
126988
127042
 
@@ -127004,7 +127058,7 @@ Defined in: [lib/ws.ts:323](https://github.com/maiyunnet/kebab/blob/master/lib/w
127004
127058
 
127005
127059
  > **on**(`event`, `cb`): `this`
127006
127060
 
127007
- Defined in: [lib/ws.ts:282](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L282)
127061
+ Defined in: [lib/ws.ts:327](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L327)
127008
127062
 
127009
127063
  绑定监听
127010
127064
 
@@ -127026,7 +127080,7 @@ Defined in: [lib/ws.ts:282](https://github.com/maiyunnet/kebab/blob/master/lib/w
127026
127080
 
127027
127081
  > **on**(`event`, `cb`): `this`
127028
127082
 
127029
- Defined in: [lib/ws.ts:286](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L286)
127083
+ Defined in: [lib/ws.ts:331](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L331)
127030
127084
 
127031
127085
  绑定监听
127032
127086
 
@@ -127048,7 +127102,7 @@ Defined in: [lib/ws.ts:286](https://github.com/maiyunnet/kebab/blob/master/lib/w
127048
127102
 
127049
127103
  > **on**(`event`, `cb`): `this`
127050
127104
 
127051
- Defined in: [lib/ws.ts:287](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L287)
127105
+ Defined in: [lib/ws.ts:332](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L332)
127052
127106
 
127053
127107
  绑定监听
127054
127108
 
@@ -127068,11 +127122,25 @@ Defined in: [lib/ws.ts:287](https://github.com/maiyunnet/kebab/blob/master/lib/w
127068
127122
 
127069
127123
  ***
127070
127124
 
127125
+ ### pause()
127126
+
127127
+ > **pause**(): `void`
127128
+
127129
+ Defined in: [lib/ws.ts:380](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L380)
127130
+
127131
+ 暂停向消息监听器派发数据,底层仍只保留有界缓存
127132
+
127133
+ #### Returns
127134
+
127135
+ `void`
127136
+
127137
+ ***
127138
+
127071
127139
  ### ping()
127072
127140
 
127073
127141
  > **ping**(`data?`): `boolean`
127074
127142
 
127075
- Defined in: [lib/ws.ts:383](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L383)
127143
+ Defined in: [lib/ws.ts:437](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L437)
127076
127144
 
127077
127145
  发送 ping
127078
127146
 
@@ -127092,7 +127160,7 @@ Defined in: [lib/ws.ts:383](https://github.com/maiyunnet/kebab/blob/master/lib/w
127092
127160
 
127093
127161
  > **pong**(`data?`): `boolean`
127094
127162
 
127095
- Defined in: [lib/ws.ts:394](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L394)
127163
+ Defined in: [lib/ws.ts:448](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L448)
127096
127164
 
127097
127165
  发送 ping
127098
127166
 
@@ -127108,11 +127176,25 @@ Defined in: [lib/ws.ts:394](https://github.com/maiyunnet/kebab/blob/master/lib/w
127108
127176
 
127109
127177
  ***
127110
127178
 
127179
+ ### resume()
127180
+
127181
+ > **resume**(): `void`
127182
+
127183
+ Defined in: [lib/ws.ts:385](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L385)
127184
+
127185
+ 恢复向消息监听器派发数据
127186
+
127187
+ #### Returns
127188
+
127189
+ `void`
127190
+
127191
+ ***
127192
+
127111
127193
  ### writeBinary()
127112
127194
 
127113
127195
  > **writeBinary**(`data`): `boolean`
127114
127196
 
127115
- Defined in: [lib/ws.ts:353](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L353)
127197
+ Defined in: [lib/ws.ts:407](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L407)
127116
127198
 
127117
127199
  发送二进制
127118
127200
 
@@ -127132,7 +127214,7 @@ Defined in: [lib/ws.ts:353](https://github.com/maiyunnet/kebab/blob/master/lib/w
127132
127214
 
127133
127215
  > **writeResult**(`data`): `boolean`
127134
127216
 
127135
- Defined in: [lib/ws.ts:345](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L345)
127217
+ Defined in: [lib/ws.ts:399](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L399)
127136
127218
 
127137
127219
  发送结果对象字符串
127138
127220
 
@@ -127152,7 +127234,7 @@ Defined in: [lib/ws.ts:345](https://github.com/maiyunnet/kebab/blob/master/lib/w
127152
127234
 
127153
127235
  > **writeText**(`data`): `boolean`
127154
127236
 
127155
- Defined in: [lib/ws.ts:337](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L337)
127237
+ Defined in: [lib/ws.ts:391](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L391)
127156
127238
 
127157
127239
  发送文本
127158
127240
 
@@ -127281,7 +127363,7 @@ lib/ws/functions/connect.md
127281
127363
 
127282
127364
  > **connect**(`u`, `opt?`): `Promise`\<[`Socket`](../classes/Socket.md) \| `null`\>
127283
127365
 
127284
- Defined in: [lib/ws.ts:411](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L411)
127366
+ Defined in: [lib/ws.ts:465](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L465)
127285
127367
 
127286
127368
  创建一个 ws 客户端发起 ws 请求
127287
127369
 
@@ -127316,7 +127398,7 @@ lib/ws/functions/createServer.md
127316
127398
 
127317
127399
  > **createServer**(`request`, `socket`, `head?`, `options?`): [`Socket`](../classes/Socket.md)
127318
127400
 
127319
- Defined in: [lib/ws.ts:421](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L421)
127401
+ Defined in: [lib/ws.ts:475](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L475)
127320
127402
 
127321
127403
  创建一个 ws 服务器接收处理器
127322
127404
 
@@ -127365,7 +127447,7 @@ lib/ws/functions/mproxy.md
127365
127447
 
127366
127448
  > **mproxy**(`ctr`, `auth`, `opt?`): `Promise`\<`number`\>
127367
127449
 
127368
- Defined in: [lib/ws.ts:509](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L509)
127450
+ Defined in: [lib/ws.ts:587](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L587)
127369
127451
 
127370
127452
  正向 mproxy 代理,读取 get 的 url 为实际请求地址
127371
127453
  get: url, auth
@@ -127407,7 +127489,7 @@ lib/ws/functions/rproxy.md
127407
127489
 
127408
127490
  > **rproxy**(`ctr`, `url`, `opt?`): `Promise`\<`boolean`\>
127409
127491
 
127410
- Defined in: [lib/ws.ts:546](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L546)
127492
+ Defined in: [lib/ws.ts:624](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L624)
127411
127493
 
127412
127494
  反向代理,将本 socket 连接反代到其他网址,在 ws 的 onLoad 事件中使用
127413
127495
 
@@ -127448,7 +127530,7 @@ lib/ws/functions/rsocket.md
127448
127530
 
127449
127531
  > **rsocket**(`ctr`, `host`, `port`): `Promise`\<`boolean`\>
127450
127532
 
127451
- Defined in: [lib/ws.ts:575](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L575)
127533
+ Defined in: [lib/ws.ts:653](https://github.com/maiyunnet/kebab/blob/master/lib/ws.ts#L653)
127452
127534
 
127453
127535
  反向代理,将本 websocket 连接反代到其他真正的 socket,在 ws 的 onLoad 事件中使用
127454
127536