@maiyunnet/kebab 9.17.0 → 9.17.2

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.0"` = `'9.17.0'`
1431
+ > `const` **VER**: `"9.17.2"` = `'9.17.2'`
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
 
@@ -113464,21 +113498,33 @@ Defined in: [lib/db/conn.ts:64](https://github.com/maiyunnet/kebab/blob/master/l
113464
113498
 
113465
113499
  ### beginTransaction()
113466
113500
 
113467
- > **beginTransaction**(): `Promise`\<`boolean`\>
113501
+ > **beginTransaction**(`logError?`): `Promise`\<`boolean`\>
113468
113502
 
113469
- Defined in: [lib/db/conn.ts:326](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L326)
113503
+ Defined in: [lib/db/conn.ts:337](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L337)
113504
+
113505
+ 开启事务,只能在独占连接中使用
113506
+
113507
+ #### Parameters
113508
+
113509
+ ##### logError?
113510
+
113511
+ `boolean` = `true`
113512
+
113513
+ 失败时是否记录错误,连接池在非最后一次重试时传 false
113470
113514
 
113471
113515
  #### Returns
113472
113516
 
113473
113517
  `Promise`\<`boolean`\>
113474
113518
 
113519
+ 是否开启成功
113520
+
113475
113521
  ***
113476
113522
 
113477
113523
  ### commit()
113478
113524
 
113479
113525
  > **commit**(): `Promise`\<`boolean`\>
113480
113526
 
113481
- Defined in: [lib/db/conn.ts:352](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L352)
113527
+ Defined in: [lib/db/conn.ts:367](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L367)
113482
113528
 
113483
113529
  #### Returns
113484
113530
 
@@ -113490,7 +113536,7 @@ Defined in: [lib/db/conn.ts:352](https://github.com/maiyunnet/kebab/blob/master/
113490
113536
 
113491
113537
  > **end**(): `Promise`\<`boolean`\>
113492
113538
 
113493
- Defined in: [lib/db/conn.ts:315](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L315)
113539
+ Defined in: [lib/db/conn.ts:320](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L320)
113494
113540
 
113495
113541
  关闭连接,一般情况下不使用
113496
113542
 
@@ -113504,7 +113550,7 @@ Defined in: [lib/db/conn.ts:315](https://github.com/maiyunnet/kebab/blob/master/
113504
113550
 
113505
113551
  > **execute**(`sql`, `values?`): `Promise`\<[`IPacket`](../../interfaces/IPacket.md)\>
113506
113552
 
113507
- Defined in: [lib/db/conn.ts:241](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L241)
113553
+ Defined in: [lib/db/conn.ts:246](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L246)
113508
113554
 
113509
113555
  执行一条 SQL 并获得影响行数对象 packet
113510
113556
 
@@ -113588,7 +113634,7 @@ Defined in: [lib/db/conn.ts:78](https://github.com/maiyunnet/kebab/blob/master/l
113588
113634
 
113589
113635
  > **isAvailable**(`last?`): `Promise`\<`boolean`\>
113590
113636
 
113591
- Defined in: [lib/db/conn.ts:159](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L159)
113637
+ Defined in: [lib/db/conn.ts:164](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L164)
113592
113638
 
113593
113639
  通过执行一条语句判断当前连接是否可用
113594
113640
 
@@ -113652,7 +113698,7 @@ Defined in: [lib/db/conn.ts:123](https://github.com/maiyunnet/kebab/blob/master/
113652
113698
 
113653
113699
  > **query**(`sql`, `values?`): `Promise`\<[`IData`](../../interfaces/IData.md)\>
113654
113700
 
113655
- Defined in: [lib/db/conn.ts:182](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L182)
113701
+ Defined in: [lib/db/conn.ts:187](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L187)
113656
113702
 
113657
113703
  执行一条 SQL 并获得返回数据
113658
113704
 
@@ -113680,7 +113726,7 @@ Defined in: [lib/db/conn.ts:182](https://github.com/maiyunnet/kebab/blob/master/
113680
113726
 
113681
113727
  > **refreshLast**(): `void`
113682
113728
 
113683
- Defined in: [lib/db/conn.ts:151](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L151)
113729
+ Defined in: [lib/db/conn.ts:156](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L156)
113684
113730
 
113685
113731
  设定最后使用时间
113686
113732
 
@@ -113694,7 +113740,7 @@ Defined in: [lib/db/conn.ts:151](https://github.com/maiyunnet/kebab/blob/master/
113694
113740
 
113695
113741
  > **rollback**(): `Promise`\<`boolean`\>
113696
113742
 
113697
- Defined in: [lib/db/conn.ts:372](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L372)
113743
+ Defined in: [lib/db/conn.ts:387](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L387)
113698
113744
 
113699
113745
  #### Returns
113700
113746
 
@@ -113720,7 +113766,7 @@ Defined in: [lib/db/conn.ts:102](https://github.com/maiyunnet/kebab/blob/master/
113720
113766
 
113721
113767
  > **used**(): `void`
113722
113768
 
113723
- Defined in: [lib/db/conn.ts:144](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L144)
113769
+ Defined in: [lib/db/conn.ts:149](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L149)
113724
113770
 
113725
113771
  取消占用
113726
113772
 
@@ -113732,11 +113778,21 @@ Defined in: [lib/db/conn.ts:144](https://github.com/maiyunnet/kebab/blob/master/
113732
113778
 
113733
113779
  ### using()
113734
113780
 
113735
- > **using**(): `boolean`
113781
+ > **using**(`opt?`): `boolean`
113736
113782
 
113737
- Defined in: [lib/db/conn.ts:130](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L130)
113783
+ Defined in: [lib/db/conn.ts:131](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L131)
113738
113784
 
113739
- 判断是否可用(丢失的也算不可用),返回 true 代表获取成功并自动刷新最后时间
113785
+ 判断是否可用(丢失的也算不可用),返回 true 代表获取成功
113786
+
113787
+ #### Parameters
113788
+
113789
+ ##### opt?
113790
+
113791
+ 获取选项,连接巡检独占时不刷新最后使用时间
113792
+
113793
+ ###### refreshLast?
113794
+
113795
+ `boolean`
113740
113796
 
113741
113797
  #### Returns
113742
113798
 
@@ -114044,7 +114100,7 @@ lib/db/pool/classes/Pool.md
114044
114100
 
114045
114101
  # Class: Pool
114046
114102
 
114047
- Defined in: [lib/db/pool.ts:122](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L122)
114103
+ Defined in: [lib/db/pool.ts:127](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L127)
114048
114104
 
114049
114105
  数据库连接池对象
114050
114106
 
@@ -114054,7 +114110,7 @@ Defined in: [lib/db/pool.ts:122](https://github.com/maiyunnet/kebab/blob/master/
114054
114110
 
114055
114111
  > **new Pool**(`etc`, `opt`): `Pool`
114056
114112
 
114057
- Defined in: [lib/db/pool.ts:133](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L133)
114113
+ Defined in: [lib/db/pool.ts:138](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L138)
114058
114114
 
114059
114115
  #### Parameters
114060
114116
 
@@ -114080,7 +114136,7 @@ Defined in: [lib/db/pool.ts:133](https://github.com/maiyunnet/kebab/blob/master/
114080
114136
 
114081
114137
  > **beginTransaction**(`ctr`): `Promise`\<[`Transaction`](../../tran/classes/Transaction.md) \| `null`\>
114082
114138
 
114083
- Defined in: [lib/db/pool.ts:201](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L201)
114139
+ Defined in: [lib/db/pool.ts:206](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L206)
114084
114140
 
114085
114141
  开启事务,返回事务对象并锁定连接,别人任何人不可用,有 ctr 的话必传 this,独立执行时可传 null
114086
114142
 
@@ -114100,7 +114156,7 @@ Defined in: [lib/db/pool.ts:201](https://github.com/maiyunnet/kebab/blob/master/
114100
114156
 
114101
114157
  > **execute**(`sql`, `values?`): `Promise`\<[`IPacket`](../../interfaces/IPacket.md)\>
114102
114158
 
114103
- Defined in: [lib/db/pool.ts:181](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L181)
114159
+ Defined in: [lib/db/pool.ts:186](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L186)
114104
114160
 
114105
114161
  执行一条 SQL 并获得影响行数对象 packet,连接失败抛出错误
114106
114162
 
@@ -114128,7 +114184,7 @@ Defined in: [lib/db/pool.ts:181](https://github.com/maiyunnet/kebab/blob/master/
114128
114184
 
114129
114185
  > **getName**(): `string`
114130
114186
 
114131
- Defined in: [lib/db/pool.ts:147](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L147)
114187
+ Defined in: [lib/db/pool.ts:152](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L152)
114132
114188
 
114133
114189
  获取当前连接的数据库名称
114134
114190
 
@@ -114142,7 +114198,7 @@ Defined in: [lib/db/pool.ts:147](https://github.com/maiyunnet/kebab/blob/master/
114142
114198
 
114143
114199
  > **getQueries**(): `number`
114144
114200
 
114145
- Defined in: [lib/db/pool.ts:339](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L339)
114201
+ Defined in: [lib/db/pool.ts:346](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L346)
114146
114202
 
114147
114203
  获取 SQL 执行次数
114148
114204
 
@@ -114156,7 +114212,7 @@ Defined in: [lib/db/pool.ts:339](https://github.com/maiyunnet/kebab/blob/master/
114156
114212
 
114157
114213
  > **getService**(): [`ESERVICE`](../../enumerations/ESERVICE.md)
114158
114214
 
114159
- Defined in: [lib/db/pool.ts:142](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L142)
114215
+ Defined in: [lib/db/pool.ts:147](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L147)
114160
114216
 
114161
114217
  获取当前连接的服务商
114162
114218
 
@@ -114170,7 +114226,7 @@ Defined in: [lib/db/pool.ts:142](https://github.com/maiyunnet/kebab/blob/master/
114170
114226
 
114171
114227
  > **query**(`sql`, `values?`): `Promise`\<[`IData`](../../interfaces/IData.md)\>
114172
114228
 
114173
- Defined in: [lib/db/pool.ts:157](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L157)
114229
+ Defined in: [lib/db/pool.ts:162](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L162)
114174
114230
 
114175
114231
  执行一条 SQL,无视顺序和相同连接,随用随取
114176
114232
 
@@ -125020,7 +125076,7 @@ lib/undici/functions/fetch.md
125020
125076
 
125021
125077
  > **fetch**(`input`, `init?`): `Promise`\<`Response`\>
125022
125078
 
125023
- 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)
125024
125080
 
125025
125081
  发起一个完全兼容 fetch 的请求
125026
125082
 
@@ -125055,7 +125111,7 @@ lib/undici/functions/filterHeaders.md
125055
125111
 
125056
125112
  > **filterHeaders**(`headers`, `res?`, `filter?`): `Record`\<`string`, `string` \| `string`[]\>
125057
125113
 
125058
- 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)
125059
125115
 
125060
125116
  剔除不代理的 header,返回新的 header
125061
125117
 
@@ -125096,7 +125152,7 @@ lib/undici/functions/getFormData.md
125096
125152
 
125097
125153
  > **getFormData**(): [`FormData`](../formdata/classes/FormData.md)
125098
125154
 
125099
- 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)
125100
125156
 
125101
125157
  创建 FormData 对象
125102
125158
 
@@ -125179,7 +125235,7 @@ lib/undici/functions/getResponseJson.md
125179
125235
 
125180
125236
  > **getResponseJson**(`u`, `opt?`): `Promise`\<`any`\>
125181
125237
 
125182
- 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)
125183
125239
 
125184
125240
  发起 GET 请求并解析 JSON 响应
125185
125241
 
@@ -125216,7 +125272,7 @@ lib/undici/functions/mproxyData.md
125216
125272
 
125217
125273
  > **mproxyData**(`ctr`): `any`
125218
125274
 
125219
- Defined in: [lib/undici.ts:736](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L736)
125275
+ Defined in: [lib/undici.ts:737](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L737)
125220
125276
 
125221
125277
  获取 mproxy 的附加数据
125222
125278
 
@@ -125245,7 +125301,7 @@ lib/undici/functions/mproxy.md
125245
125301
 
125246
125302
  > **mproxy**(`ctr`, `auth`, `opt?`): `Promise`\<`number`\>
125247
125303
 
125248
- 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)
125249
125305
 
125250
125306
  正向 mproxy 代理,注意提前处理不要自动处理 post 数据,读取 get 的 url 为实际请求地址
125251
125307
  get: url, auth
@@ -125355,7 +125411,7 @@ lib/undici/functions/postJsonResponseJson.md
125355
125411
 
125356
125412
  > **postJsonResponseJson**(`u`, `data`, `opt?`): `Promise`\<`any`\>
125357
125413
 
125358
- 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)
125359
125415
 
125360
125416
  发起 JSON 请求并解析 JSON 响应
125361
125417
 
@@ -125439,7 +125495,7 @@ lib/undici/functions/postResponseJson.md
125439
125495
 
125440
125496
  > **postResponseJson**(`u`, `data`, `opt?`): `Promise`\<`any`\>
125441
125497
 
125442
- 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)
125443
125499
 
125444
125500
  发起 POST 请求并解析 JSON 响应
125445
125501
 
@@ -125482,7 +125538,7 @@ lib/undici/functions/request.md
125482
125538
 
125483
125539
  > **request**(`u`, `data?`, `opt?`): `Promise`\<[`Response`](../response/classes/Response.md)\>
125484
125540
 
125485
- 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)
125486
125542
 
125487
125543
  发起一个请求
125488
125544
 
@@ -125519,7 +125575,7 @@ lib/undici/functions/rproxy.md
125519
125575
 
125520
125576
  > **rproxy**(`ctr`, `route`, `opt?`): `Promise`\<`boolean`\>
125521
125577
 
125522
- Defined in: [lib/undici.ts:766](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L766)
125578
+ Defined in: [lib/undici.ts:767](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L767)
125523
125579
 
125524
125580
  反向代理,将本服务器的某个路由反代到其他网址
125525
125581
 
@@ -125608,7 +125664,7 @@ lib/undici/interfaces/IMproxyOptions.md
125608
125664
 
125609
125665
  # Interface: IMproxyOptions
125610
125666
 
125611
- Defined in: [lib/undici.ts:889](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L889)
125667
+ Defined in: [lib/undici.ts:892](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L892)
125612
125668
 
125613
125669
  正向代理请求的传入参数选项
125614
125670
 
@@ -125618,7 +125674,7 @@ Defined in: [lib/undici.ts:889](https://github.com/maiyunnet/kebab/blob/master/l
125618
125674
 
125619
125675
  > `optional` **filter?**: (`h`) => `boolean`
125620
125676
 
125621
- Defined in: [lib/undici.ts:898](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L898)
125677
+ Defined in: [lib/undici.ts:901](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L901)
125622
125678
 
125623
125679
  过滤 header,返回 true 则留下
125624
125680
 
@@ -125638,7 +125694,7 @@ Defined in: [lib/undici.ts:898](https://github.com/maiyunnet/kebab/blob/master/l
125638
125694
 
125639
125695
  > `optional` **follow?**: `number`
125640
125696
 
125641
- Defined in: [lib/undici.ts:892](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L892)
125697
+ Defined in: [lib/undici.ts:895](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L895)
125642
125698
 
125643
125699
  ***
125644
125700
 
@@ -125646,7 +125702,7 @@ Defined in: [lib/undici.ts:892](https://github.com/maiyunnet/kebab/blob/master/l
125646
125702
 
125647
125703
  > `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
125648
125704
 
125649
- Defined in: [lib/undici.ts:896](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L896)
125705
+ Defined in: [lib/undici.ts:899](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L899)
125650
125706
 
125651
125707
  ***
125652
125708
 
@@ -125654,7 +125710,7 @@ Defined in: [lib/undici.ts:896](https://github.com/maiyunnet/kebab/blob/master/l
125654
125710
 
125655
125711
  > `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
125656
125712
 
125657
- Defined in: [lib/undici.ts:894](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L894)
125713
+ Defined in: [lib/undici.ts:897](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L897)
125658
125714
 
125659
125715
  自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
125660
125716
 
@@ -125664,7 +125720,7 @@ Defined in: [lib/undici.ts:894](https://github.com/maiyunnet/kebab/blob/master/l
125664
125720
 
125665
125721
  > `optional` **local?**: `string`
125666
125722
 
125667
- Defined in: [lib/undici.ts:895](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L895)
125723
+ Defined in: [lib/undici.ts:898](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L898)
125668
125724
 
125669
125725
  ***
125670
125726
 
@@ -125672,7 +125728,7 @@ Defined in: [lib/undici.ts:895](https://github.com/maiyunnet/kebab/blob/master/l
125672
125728
 
125673
125729
  > `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
125674
125730
 
125675
- Defined in: [lib/undici.ts:900](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L900)
125731
+ Defined in: [lib/undici.ts:903](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L903)
125676
125732
 
125677
125733
  默认为 default
125678
125734
 
@@ -125682,7 +125738,7 @@ Defined in: [lib/undici.ts:900](https://github.com/maiyunnet/kebab/blob/master/l
125682
125738
 
125683
125739
  > `optional` **timeout?**: `number`
125684
125740
 
125685
- Defined in: [lib/undici.ts:891](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L891)
125741
+ Defined in: [lib/undici.ts:894](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L894)
125686
125742
 
125687
125743
  秒数,默认 300 秒
125688
125744
 
@@ -125697,7 +125753,7 @@ lib/undici/interfaces/IRequestOptions.md
125697
125753
 
125698
125754
  # Interface: IRequestOptions
125699
125755
 
125700
- Defined in: [lib/undici.ts:852](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L852)
125756
+ Defined in: [lib/undici.ts:853](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L853)
125701
125757
 
125702
125758
  请求的传入参数选项
125703
125759
 
@@ -125707,7 +125763,7 @@ Defined in: [lib/undici.ts:852](https://github.com/maiyunnet/kebab/blob/master/l
125707
125763
 
125708
125764
  > `optional` **cookie?**: `Record`\<`string`, [`ICookie`](../../cookie/interfaces/ICookie.md)\>
125709
125765
 
125710
- Defined in: [lib/undici.ts:881](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L881)
125766
+ Defined in: [lib/undici.ts:884](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L884)
125711
125767
 
125712
125768
  cookie 托管对象
125713
125769
 
@@ -125717,7 +125773,7 @@ cookie 托管对象
125717
125773
 
125718
125774
  > `optional` **follow?**: `number`
125719
125775
 
125720
- Defined in: [lib/undici.ts:862](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L862)
125776
+ Defined in: [lib/undici.ts:865](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L865)
125721
125777
 
125722
125778
  追踪 location 次数,0 为不追踪,默认为 0
125723
125779
 
@@ -125727,7 +125783,7 @@ Defined in: [lib/undici.ts:862](https://github.com/maiyunnet/kebab/blob/master/l
125727
125783
 
125728
125784
  > `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
125729
125785
 
125730
- Defined in: [lib/undici.ts:867](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L867)
125786
+ Defined in: [lib/undici.ts:870](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L870)
125731
125787
 
125732
125788
  ***
125733
125789
 
@@ -125735,7 +125791,7 @@ Defined in: [lib/undici.ts:867](https://github.com/maiyunnet/kebab/blob/master/l
125735
125791
 
125736
125792
  > `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
125737
125793
 
125738
- Defined in: [lib/undici.ts:864](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L864)
125794
+ Defined in: [lib/undici.ts:867](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L867)
125739
125795
 
125740
125796
  自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
125741
125797
 
@@ -125745,7 +125801,7 @@ Defined in: [lib/undici.ts:864](https://github.com/maiyunnet/kebab/blob/master/l
125745
125801
 
125746
125802
  > `optional` **keep?**: `boolean`
125747
125803
 
125748
- Defined in: [lib/undici.ts:877](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L877)
125804
+ Defined in: [lib/undici.ts:880](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L880)
125749
125805
 
125750
125806
  连接是否保持长连接(即是否允许复用),默认为 true
125751
125807
 
@@ -125755,7 +125811,7 @@ Defined in: [lib/undici.ts:877](https://github.com/maiyunnet/kebab/blob/master/l
125755
125811
 
125756
125812
  > `optional` **local?**: `string`
125757
125813
 
125758
- Defined in: [lib/undici.ts:866](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L866)
125814
+ Defined in: [lib/undici.ts:869](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L869)
125759
125815
 
125760
125816
  ***
125761
125817
 
@@ -125763,7 +125819,7 @@ Defined in: [lib/undici.ts:866](https://github.com/maiyunnet/kebab/blob/master/l
125763
125819
 
125764
125820
  > `optional` **log?**: `boolean`
125765
125821
 
125766
- Defined in: [lib/undici.ts:883](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L883)
125822
+ Defined in: [lib/undici.ts:886](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L886)
125767
125823
 
125768
125824
  若有异常写入文件日志,默认为 true
125769
125825
 
@@ -125773,7 +125829,7 @@ Defined in: [lib/undici.ts:883](https://github.com/maiyunnet/kebab/blob/master/l
125773
125829
 
125774
125830
  > `optional` **method?**: `"GET"` \| `"POST"` \| `"PUT"` \| `"DELETE"` \| `"OPTIONS"`
125775
125831
 
125776
- Defined in: [lib/undici.ts:853](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L853)
125832
+ Defined in: [lib/undici.ts:854](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L854)
125777
125833
 
125778
125834
  ***
125779
125835
 
@@ -125781,7 +125837,7 @@ Defined in: [lib/undici.ts:853](https://github.com/maiyunnet/kebab/blob/master/l
125781
125837
 
125782
125838
  > `optional` **mproxy?**: `object`
125783
125839
 
125784
- Defined in: [lib/undici.ts:869](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L869)
125840
+ Defined in: [lib/undici.ts:872](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L872)
125785
125841
 
125786
125842
  正向 mproxy 代理,url 如 https://xxx/abc
125787
125843
 
@@ -125809,7 +125865,7 @@ Defined in: [lib/undici.ts:869](https://github.com/maiyunnet/kebab/blob/master/l
125809
125865
 
125810
125866
  > `optional` **retry?**: `number`
125811
125867
 
125812
- Defined in: [lib/undici.ts:858](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L858)
125868
+ Defined in: [lib/undici.ts:859](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L859)
125813
125869
 
125814
125870
  网络异常后的重试次数,默认 0;流式请求体不可重试,非幂等请求需由调用方保证安全
125815
125871
 
@@ -125819,17 +125875,37 @@ Defined in: [lib/undici.ts:858](https://github.com/maiyunnet/kebab/blob/master/l
125819
125875
 
125820
125876
  > `optional` **retryJson?**: `number`
125821
125877
 
125822
- Defined in: [lib/undici.ts:860](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L860)
125878
+ Defined in: [lib/undici.ts:861](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L861)
125823
125879
 
125824
125880
  JSON 解析失败后的重试次数,默认 0;仅适用于 ResponseJson 快捷方法,非幂等请求需由调用方保证安全
125825
125881
 
125826
125882
  ***
125827
125883
 
125884
+ ### retryJsonHandler?
125885
+
125886
+ > `optional` **retryJsonHandler?**: (`json`) => `boolean`
125887
+
125888
+ Defined in: [lib/undici.ts:863](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L863)
125889
+
125890
+ JSON 重试验证方法;返回 false 时按 retryJson 的设置重试,仅适用于 ResponseJson 快捷方法
125891
+
125892
+ #### Parameters
125893
+
125894
+ ##### json
125895
+
125896
+ `any`
125897
+
125898
+ #### Returns
125899
+
125900
+ `boolean`
125901
+
125902
+ ***
125903
+
125828
125904
  ### reuse?
125829
125905
 
125830
125906
  > `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
125831
125907
 
125832
- Defined in: [lib/undici.ts:879](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L879)
125908
+ Defined in: [lib/undici.ts:882](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L882)
125833
125909
 
125834
125910
  复用池名/Agent,默认为 default
125835
125911
 
@@ -125839,7 +125915,7 @@ Defined in: [lib/undici.ts:879](https://github.com/maiyunnet/kebab/blob/master/l
125839
125915
 
125840
125916
  > `optional` **save?**: `string`
125841
125917
 
125842
- Defined in: [lib/undici.ts:865](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L865)
125918
+ Defined in: [lib/undici.ts:868](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L868)
125843
125919
 
125844
125920
  ***
125845
125921
 
@@ -125847,7 +125923,7 @@ Defined in: [lib/undici.ts:865](https://github.com/maiyunnet/kebab/blob/master/l
125847
125923
 
125848
125924
  > `optional` **signal?**: `AbortSignal`
125849
125925
 
125850
- Defined in: [lib/undici.ts:885](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L885)
125926
+ Defined in: [lib/undici.ts:888](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L888)
125851
125927
 
125852
125928
  请求中止信号
125853
125929
 
@@ -125857,7 +125933,7 @@ Defined in: [lib/undici.ts:885](https://github.com/maiyunnet/kebab/blob/master/l
125857
125933
 
125858
125934
  > `optional` **timeout?**: `number`
125859
125935
 
125860
- Defined in: [lib/undici.ts:856](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L856)
125936
+ Defined in: [lib/undici.ts:857](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L857)
125861
125937
 
125862
125938
  秒数,默认 300 秒
125863
125939
 
@@ -125867,7 +125943,7 @@ Defined in: [lib/undici.ts:856](https://github.com/maiyunnet/kebab/blob/master/l
125867
125943
 
125868
125944
  > `optional` **type?**: `"form"` \| `"json"`
125869
125945
 
125870
- Defined in: [lib/undici.ts:854](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L854)
125946
+ Defined in: [lib/undici.ts:855](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L855)
125871
125947
 
125872
125948
  lib/undici/interfaces/IRproxyOptions.md
125873
125949
  ---
@@ -125880,7 +125956,7 @@ lib/undici/interfaces/IRproxyOptions.md
125880
125956
 
125881
125957
  # Interface: IRproxyOptions
125882
125958
 
125883
- Defined in: [lib/undici.ts:904](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L904)
125959
+ Defined in: [lib/undici.ts:907](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L907)
125884
125960
 
125885
125961
  反向代理请求的传入参数选项
125886
125962
 
@@ -125890,7 +125966,7 @@ Defined in: [lib/undici.ts:904](https://github.com/maiyunnet/kebab/blob/master/l
125890
125966
 
125891
125967
  > `optional` **body?**: `string` \| `Buffer`\<`ArrayBufferLike`\> \| `Readable`
125892
125968
 
125893
- Defined in: [lib/undici.ts:923](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L923)
125969
+ Defined in: [lib/undici.ts:926](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L926)
125894
125970
 
125895
125971
  手动传入请求体(优先于原始 req 流),用于 req 流已消费后仍需转发 body 的场景
125896
125972
 
@@ -125900,7 +125976,7 @@ Defined in: [lib/undici.ts:923](https://github.com/maiyunnet/kebab/blob/master/l
125900
125976
 
125901
125977
  > `optional` **filter?**: (`h`) => `boolean`
125902
125978
 
125903
- Defined in: [lib/undici.ts:913](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L913)
125979
+ Defined in: [lib/undici.ts:916](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L916)
125904
125980
 
125905
125981
  过滤 header,返回 true 则留下
125906
125982
 
@@ -125920,7 +125996,7 @@ Defined in: [lib/undici.ts:913](https://github.com/maiyunnet/kebab/blob/master/l
125920
125996
 
125921
125997
  > `optional` **follow?**: `number`
125922
125998
 
125923
- Defined in: [lib/undici.ts:907](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L907)
125999
+ Defined in: [lib/undici.ts:910](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L910)
125924
126000
 
125925
126001
  ***
125926
126002
 
@@ -125928,7 +126004,7 @@ Defined in: [lib/undici.ts:907](https://github.com/maiyunnet/kebab/blob/master/l
125928
126004
 
125929
126005
  > `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
125930
126006
 
125931
- Defined in: [lib/undici.ts:911](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L911)
126007
+ Defined in: [lib/undici.ts:914](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L914)
125932
126008
 
125933
126009
  ***
125934
126010
 
@@ -125936,7 +126012,7 @@ Defined in: [lib/undici.ts:911](https://github.com/maiyunnet/kebab/blob/master/l
125936
126012
 
125937
126013
  > `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
125938
126014
 
125939
- Defined in: [lib/undici.ts:909](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L909)
126015
+ Defined in: [lib/undici.ts:912](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L912)
125940
126016
 
125941
126017
  自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
125942
126018
 
@@ -125946,7 +126022,7 @@ Defined in: [lib/undici.ts:909](https://github.com/maiyunnet/kebab/blob/master/l
125946
126022
 
125947
126023
  > `optional` **local?**: `string`
125948
126024
 
125949
- Defined in: [lib/undici.ts:910](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L910)
126025
+ Defined in: [lib/undici.ts:913](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L913)
125950
126026
 
125951
126027
  ***
125952
126028
 
@@ -125954,7 +126030,7 @@ Defined in: [lib/undici.ts:910](https://github.com/maiyunnet/kebab/blob/master/l
125954
126030
 
125955
126031
  > `optional` **mproxy?**: `object`
125956
126032
 
125957
- Defined in: [lib/undici.ts:915](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L915)
126033
+ Defined in: [lib/undici.ts:918](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L918)
125958
126034
 
125959
126035
  正向 mproxy 代理,url 如 https://xxx/abc
125960
126036
 
@@ -125982,7 +126058,7 @@ Defined in: [lib/undici.ts:915](https://github.com/maiyunnet/kebab/blob/master/l
125982
126058
 
125983
126059
  > `optional` **querys?**: `Record`\<`string`, `any`\>
125984
126060
 
125985
- Defined in: [lib/undici.ts:925](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L925)
126061
+ Defined in: [lib/undici.ts:928](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L928)
125986
126062
 
125987
126063
  自定义 GET 查询参数,传入后直接替换代理目标 URL 的整个 query string
125988
126064
 
@@ -125992,7 +126068,7 @@ Defined in: [lib/undici.ts:925](https://github.com/maiyunnet/kebab/blob/master/l
125992
126068
 
125993
126069
  > `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
125994
126070
 
125995
- Defined in: [lib/undici.ts:927](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L927)
126071
+ Defined in: [lib/undici.ts:930](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L930)
125996
126072
 
125997
126073
  默认为 default
125998
126074
 
@@ -126002,7 +126078,7 @@ Defined in: [lib/undici.ts:927](https://github.com/maiyunnet/kebab/blob/master/l
126002
126078
 
126003
126079
  > `optional` **timeout?**: `number`
126004
126080
 
126005
- Defined in: [lib/undici.ts:906](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L906)
126081
+ Defined in: [lib/undici.ts:909](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L909)
126006
126082
 
126007
126083
  秒数,默认 300 秒
126008
126084
 
@@ -126513,7 +126589,7 @@ lib/undici/type-aliases/THttpHeaders.md
126513
126589
 
126514
126590
  > **THttpHeaders** = `http.IncomingHttpHeaders` & `object`
126515
126591
 
126516
- Defined in: [lib/undici.ts:932](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L932)
126592
+ Defined in: [lib/undici.ts:935](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L935)
126517
126593
 
126518
126594
  http headers
126519
126595