@maiyunnet/kebab 7.7.0 → 7.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/doc/kebab-rag.md CHANGED
@@ -1385,7 +1385,7 @@ index/variables/VER.md
1385
1385
 
1386
1386
  # Variable: VER
1387
1387
 
1388
- > `const` **VER**: `"7.7.0"` = `'7.7.0'`
1388
+ > `const` **VER**: `"7.7.1"` = `'7.7.1'`
1389
1389
 
1390
1390
  Defined in: [index.ts:10](https://github.com/maiyunnet/kebab/blob/master/index.ts#L10)
1391
1391
 
@@ -4586,7 +4586,7 @@ lib/crypto/functions/aesDecrypt.md
4586
4586
 
4587
4587
  > **aesDecrypt**(`encrypt`, `key`, `iv`, `method`, `output`): `false` \| `Buffer`\<`ArrayBufferLike`\>
4588
4588
 
4589
- Defined in: [lib/crypto.ts:339](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L339)
4589
+ Defined in: [lib/crypto.ts:340](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L340)
4590
4590
 
4591
4591
  AES 解密
4592
4592
 
@@ -4628,7 +4628,7 @@ AES 解密
4628
4628
 
4629
4629
  > **aesDecrypt**(`encrypt`, `key`, `iv?`, `method?`, `output?`): `string` \| `false`
4630
4630
 
4631
- Defined in: [lib/crypto.ts:340](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L340)
4631
+ Defined in: [lib/crypto.ts:341](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L341)
4632
4632
 
4633
4633
  AES 解密
4634
4634
 
@@ -4681,7 +4681,7 @@ lib/crypto/functions/aesEncrypt.md
4681
4681
 
4682
4682
  > **aesEncrypt**(`original`, `key`, `iv`, `method`, `output`): `false` \| `Buffer`\<`ArrayBufferLike`\>
4683
4683
 
4684
- Defined in: [lib/crypto.ts:226](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L226)
4684
+ Defined in: [lib/crypto.ts:227](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L227)
4685
4685
 
4686
4686
  AES 加密
4687
4687
 
@@ -4725,7 +4725,7 @@ AES 加密
4725
4725
 
4726
4726
  > **aesEncrypt**(`original`, `key`, `iv?`, `method?`, `output?`): `string` \| `false`
4727
4727
 
4728
- Defined in: [lib/crypto.ts:227](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L227)
4728
+ Defined in: [lib/crypto.ts:228](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L228)
4729
4729
 
4730
4730
  AES 加密
4731
4731
 
@@ -4780,7 +4780,7 @@ lib/crypto/functions/base64Decode.md
4780
4780
 
4781
4781
  > **base64Decode**(`data`, `encoding`): `Buffer`
4782
4782
 
4783
- Defined in: [lib/crypto.ts:445](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L445)
4783
+ Defined in: [lib/crypto.ts:446](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L446)
4784
4784
 
4785
4785
  base64 解码
4786
4786
 
@@ -4806,7 +4806,7 @@ base64 编码的字符串
4806
4806
 
4807
4807
  > **base64Decode**(`data`, `encoding?`): `string`
4808
4808
 
4809
- Defined in: [lib/crypto.ts:446](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L446)
4809
+ Defined in: [lib/crypto.ts:447](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L447)
4810
4810
 
4811
4811
  base64 解码
4812
4812
 
@@ -4841,7 +4841,7 @@ lib/crypto/functions/base64Encode.md
4841
4841
 
4842
4842
  > **base64Encode**(`data`): `string`
4843
4843
 
4844
- Defined in: [lib/crypto.ts:431](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L431)
4844
+ Defined in: [lib/crypto.ts:432](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L432)
4845
4845
 
4846
4846
  base64 编码
4847
4847
 
@@ -4870,7 +4870,7 @@ lib/crypto/functions/cipherDecrypt.md
4870
4870
 
4871
4871
  > **cipherDecrypt**(`encrypt`, `key`, `iv`, `method`, `output`): `string` \| `false` \| `Buffer`\<`ArrayBufferLike`\>
4872
4872
 
4873
- Defined in: [lib/crypto.ts:276](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L276)
4873
+ Defined in: [lib/crypto.ts:277](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L277)
4874
4874
 
4875
4875
  cipher 解密
4876
4876
 
@@ -4923,7 +4923,7 @@ lib/crypto/functions/cipherEncrypt.md
4923
4923
 
4924
4924
  > **cipherEncrypt**(`original`, `key`, `iv`, `method`, `output`): `string` \| `false` \| `Buffer`\<`ArrayBufferLike`\>
4925
4925
 
4926
- Defined in: [lib/crypto.ts:166](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L166)
4926
+ Defined in: [lib/crypto.ts:167](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L167)
4927
4927
 
4928
4928
  cipher 加密,强烈不建议使用 AES_256_ECB
4929
4929
 
@@ -4978,7 +4978,7 @@ lib/crypto/functions/gcmDecrypt.md
4978
4978
 
4979
4979
  > **gcmDecrypt**(`encrypt`, `key`, `output`): `false` \| `Buffer`\<`ArrayBufferLike`\>
4980
4980
 
4981
- Defined in: [lib/crypto.ts:354](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L354)
4981
+ Defined in: [lib/crypto.ts:355](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L355)
4982
4982
 
4983
4983
  AES 解密
4984
4984
 
@@ -5010,7 +5010,7 @@ AES 解密
5010
5010
 
5011
5011
  > **gcmDecrypt**(`encrypt`, `key`, `output?`): `string` \| `false`
5012
5012
 
5013
- Defined in: [lib/crypto.ts:355](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L355)
5013
+ Defined in: [lib/crypto.ts:356](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L356)
5014
5014
 
5015
5015
  AES 解密
5016
5016
 
@@ -5053,7 +5053,7 @@ lib/crypto/functions/gcmEncrypt.md
5053
5053
 
5054
5054
  > **gcmEncrypt**(`original`, `key`, `output`): `false` \| `Buffer`\<`ArrayBufferLike`\>
5055
5055
 
5056
- Defined in: [lib/crypto.ts:241](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L241)
5056
+ Defined in: [lib/crypto.ts:242](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L242)
5057
5057
 
5058
5058
  AES GCM 托管加密
5059
5059
 
@@ -5085,7 +5085,7 @@ AES GCM 托管加密
5085
5085
 
5086
5086
  > **gcmEncrypt**(`original`, `key`, `output?`): `string` \| `false`
5087
5087
 
5088
- Defined in: [lib/crypto.ts:242](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L242)
5088
+ Defined in: [lib/crypto.ts:243](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L243)
5089
5089
 
5090
5090
  AES GCM 托管加密
5091
5091
 
@@ -5193,7 +5193,7 @@ lib/crypto/functions/hashHmac.md
5193
5193
 
5194
5194
  > **hashHmac**(`algorithm`, `data`, `key?`, `format?`): `string`
5195
5195
 
5196
- Defined in: [lib/crypto.ts:387](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L387)
5196
+ Defined in: [lib/crypto.ts:388](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L388)
5197
5197
 
5198
5198
  hash 或 hmac 加密
5199
5199
 
@@ -5229,7 +5229,7 @@ hash 或 hmac 加密
5229
5229
 
5230
5230
  > **hashHmac**(`algorithm`, `data`, `key`, `format`): `Buffer`
5231
5231
 
5232
- Defined in: [lib/crypto.ts:388](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L388)
5232
+ Defined in: [lib/crypto.ts:389](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L389)
5233
5233
 
5234
5234
  hash 或 hmac 加密
5235
5235
 
@@ -5276,7 +5276,7 @@ lib/crypto/functions/hashHmacFile.md
5276
5276
 
5277
5277
  > **hashHmacFile**(`algorithm`, `path`, `key?`, `encoding?`): `Promise`\<`string` \| `false`\>
5278
5278
 
5279
- Defined in: [lib/crypto.ts:406](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L406)
5279
+ Defined in: [lib/crypto.ts:407](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L407)
5280
5280
 
5281
5281
  hash 或 hmac 加密文件
5282
5282
 
@@ -5312,7 +5312,7 @@ hash 或 hmac 加密文件
5312
5312
 
5313
5313
  > **hashHmacFile**(`algorithm`, `path`, `key`, `encoding`): `Promise`\<`false` \| `Buffer`\<`ArrayBufferLike`\>\>
5314
5314
 
5315
- Defined in: [lib/crypto.ts:407](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L407)
5315
+ Defined in: [lib/crypto.ts:408](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L408)
5316
5316
 
5317
5317
  hash 或 hmac 加密文件
5318
5318
 
@@ -5357,7 +5357,7 @@ lib/crypto/functions/privateDecrypt.md
5357
5357
 
5358
5358
  > **privateDecrypt**(`key`, `buffer`): `Buffer`
5359
5359
 
5360
- Defined in: [lib/crypto.ts:135](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L135)
5360
+ Defined in: [lib/crypto.ts:136](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L136)
5361
5361
 
5362
5362
  非对称私钥解密
5363
5363
 
@@ -5392,7 +5392,7 @@ lib/crypto/functions/privateEncrypt.md
5392
5392
 
5393
5393
  > **privateEncrypt**(`key`, `buffer`): `Buffer`
5394
5394
 
5395
- Defined in: [lib/crypto.ts:113](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L113)
5395
+ Defined in: [lib/crypto.ts:114](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L114)
5396
5396
 
5397
5397
  非对称私钥加密
5398
5398
 
@@ -5427,7 +5427,7 @@ lib/crypto/functions/publicDecrypt.md
5427
5427
 
5428
5428
  > **publicDecrypt**(`key`, `buffer`): `Buffer`
5429
5429
 
5430
- Defined in: [lib/crypto.ts:124](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L124)
5430
+ Defined in: [lib/crypto.ts:125](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L125)
5431
5431
 
5432
5432
  非对称公钥解密
5433
5433
 
@@ -5462,7 +5462,7 @@ lib/crypto/functions/publicEncrypt.md
5462
5462
 
5463
5463
  > **publicEncrypt**(`key`, `buffer`): `Buffer`
5464
5464
 
5465
- Defined in: [lib/crypto.ts:102](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L102)
5465
+ Defined in: [lib/crypto.ts:103](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L103)
5466
5466
 
5467
5467
  非对称公钥加密
5468
5468
 
@@ -5499,7 +5499,7 @@ lib/crypto/functions/sign.md
5499
5499
 
5500
5500
  > **sign**(`data`, `privateKey`, `format`, `algorithm?`): `string`
5501
5501
 
5502
- Defined in: [lib/crypto.ts:68](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L68)
5502
+ Defined in: [lib/crypto.ts:69](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L69)
5503
5503
 
5504
5504
  非对称加签
5505
5505
 
@@ -5537,7 +5537,7 @@ Defined in: [lib/crypto.ts:68](https://github.com/maiyunnet/kebab/blob/master/li
5537
5537
 
5538
5538
  > **sign**(`data`, `privateKey`, `format?`, `algorithm?`): `Buffer`
5539
5539
 
5540
- Defined in: [lib/crypto.ts:71](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L71)
5540
+ Defined in: [lib/crypto.ts:72](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L72)
5541
5541
 
5542
5542
  非对称加签
5543
5543
 
@@ -5586,7 +5586,7 @@ lib/crypto/functions/sm4Decrypt.md
5586
5586
 
5587
5587
  > **sm4Decrypt**(`encrypt`, `key`, `iv`, `method`, `output`): `false` \| `Buffer`\<`ArrayBufferLike`\>
5588
5588
 
5589
- Defined in: [lib/crypto.ts:372](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L372)
5589
+ Defined in: [lib/crypto.ts:373](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L373)
5590
5590
 
5591
5591
  SM4 解密
5592
5592
 
@@ -5628,7 +5628,7 @@ SM4 解密
5628
5628
 
5629
5629
  > **sm4Decrypt**(`encrypt`, `key`, `iv?`, `method?`, `output?`): `string` \| `false`
5630
5630
 
5631
- Defined in: [lib/crypto.ts:373](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L373)
5631
+ Defined in: [lib/crypto.ts:374](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L374)
5632
5632
 
5633
5633
  SM4 解密
5634
5634
 
@@ -5681,7 +5681,7 @@ lib/crypto/functions/sm4Encrypt.md
5681
5681
 
5682
5682
  > **sm4Encrypt**(`original`, `key`, `iv`, `method`, `output`): `false` \| `Buffer`\<`ArrayBufferLike`\>
5683
5683
 
5684
- Defined in: [lib/crypto.ts:259](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L259)
5684
+ Defined in: [lib/crypto.ts:260](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L260)
5685
5685
 
5686
5686
  SM4 加密
5687
5687
 
@@ -5723,7 +5723,7 @@ SM4 加密
5723
5723
 
5724
5724
  > **sm4Encrypt**(`original`, `key`, `iv?`, `method?`, `output?`): `string` \| `false`
5725
5725
 
5726
- Defined in: [lib/crypto.ts:260](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L260)
5726
+ Defined in: [lib/crypto.ts:261](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L261)
5727
5727
 
5728
5728
  SM4 加密
5729
5729
 
@@ -5774,7 +5774,7 @@ lib/crypto/functions/uuid.md
5774
5774
 
5775
5775
  > **uuid**(`options?`): `string`
5776
5776
 
5777
- Defined in: [lib/crypto.ts:459](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L459)
5777
+ Defined in: [lib/crypto.ts:460](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L460)
5778
5778
 
5779
5779
  生成 uuid
5780
5780
 
@@ -5803,7 +5803,7 @@ lib/crypto/functions/verify.md
5803
5803
 
5804
5804
  > **verify**(`data`, `object`, `signature`, `algorithm`): `boolean`
5805
5805
 
5806
- Defined in: [lib/crypto.ts:89](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L89)
5806
+ Defined in: [lib/crypto.ts:90](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L90)
5807
5807
 
5808
5808
  非对称验签
5809
5809
 
@@ -5894,7 +5894,7 @@ lib/crypto/variables/AES_256_CBC.md
5894
5894
 
5895
5895
  > `const` **AES\_256\_CBC**: `"aes-256-cbc"` = `'aes-256-cbc'`
5896
5896
 
5897
- Defined in: [lib/crypto.ts:146](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L146)
5897
+ Defined in: [lib/crypto.ts:147](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L147)
5898
5898
 
5899
5899
  一般不用,兼容性场景下用
5900
5900
 
@@ -5911,7 +5911,7 @@ lib/crypto/variables/AES_256_CTR.md
5911
5911
 
5912
5912
  > `const` **AES\_256\_CTR**: `"aes-256-ctr"` = `'aes-256-ctr'`
5913
5913
 
5914
- Defined in: [lib/crypto.ts:148](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L148)
5914
+ Defined in: [lib/crypto.ts:149](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L149)
5915
5915
 
5916
5916
  设置 iv 会自动切换为 CTR,流式下使用,非流直接使用 GCM
5917
5917
 
@@ -5928,7 +5928,7 @@ lib/crypto/variables/AES_256_ECB.md
5928
5928
 
5929
5929
  > `const` **AES\_256\_ECB**: `"aes-256-ecb"` = `'aes-256-ecb'`
5930
5930
 
5931
- Defined in: [lib/crypto.ts:144](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L144)
5931
+ Defined in: [lib/crypto.ts:145](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L145)
5932
5932
 
5933
5933
  勿使用,无 iv 默认,但勿使用
5934
5934
 
@@ -5945,7 +5945,7 @@ lib/crypto/variables/AES_256_GCM.md
5945
5945
 
5946
5946
  > `const` **AES\_256\_GCM**: `"aes-256-gcm"` = `'aes-256-gcm'`
5947
5947
 
5948
- Defined in: [lib/crypto.ts:150](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L150)
5948
+ Defined in: [lib/crypto.ts:151](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L151)
5949
5949
 
5950
5950
  非流直接使用 GCM
5951
5951
 
@@ -5962,7 +5962,7 @@ lib/crypto/variables/SM4_CBC.md
5962
5962
 
5963
5963
  > `const` **SM4\_CBC**: `"sm4-cbc"` = `'sm4-cbc'`
5964
5964
 
5965
- Defined in: [lib/crypto.ts:154](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L154)
5965
+ Defined in: [lib/crypto.ts:155](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L155)
5966
5966
 
5967
5967
  lib/crypto/variables/SM4_CFB.md
5968
5968
  ---
@@ -5977,7 +5977,7 @@ lib/crypto/variables/SM4_CFB.md
5977
5977
 
5978
5978
  > `const` **SM4\_CFB**: `"sm4-cfb"` = `'sm4-cfb'`
5979
5979
 
5980
- Defined in: [lib/crypto.ts:156](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L156)
5980
+ Defined in: [lib/crypto.ts:157](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L157)
5981
5981
 
5982
5982
  SM4 一般用这个,设置 iv,自动就切换成了这个
5983
5983
 
@@ -5994,7 +5994,7 @@ lib/crypto/variables/SM4_ECB.md
5994
5994
 
5995
5995
  > `const` **SM4\_ECB**: `"sm4-ecb"` = `'sm4-ecb'`
5996
5996
 
5997
- Defined in: [lib/crypto.ts:153](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L153)
5997
+ Defined in: [lib/crypto.ts:154](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L154)
5998
5998
 
5999
5999
  SM4 如果未设置 iv,则默认这个
6000
6000
 
@@ -9874,13 +9874,13 @@ Defined in: [lib/net/formdata.ts:22](https://github.com/maiyunnet/kebab/blob/mas
9874
9874
 
9875
9875
  ### Constructor
9876
9876
 
9877
- > **new FormData**(`opts?`): `FormData`
9877
+ > **new FormData**(`options?`): `FormData`
9878
9878
 
9879
- Defined in: node\_modules/@types/node/stream.d.ts:163
9879
+ Defined in: node\_modules/@types/node/stream.d.ts:98
9880
9880
 
9881
9881
  #### Parameters
9882
9882
 
9883
- ##### opts?
9883
+ ##### options?
9884
9884
 
9885
9885
  `ReadableOptions`\<`Readable`\>
9886
9886
 
@@ -20703,7 +20703,7 @@ Defined in: [sys/mod.ts:68](https://github.com/maiyunnet/kebab/blob/master/sys/m
20703
20703
 
20704
20704
  > `protected` **\_keyGenerator**(): `string`
20705
20705
 
20706
- Defined in: [sys/mod.ts:1752](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1752)
20706
+ Defined in: [sys/mod.ts:1758](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1758)
20707
20707
 
20708
20708
  当 _key 不为空时,则依据继承此方法的方法自动生成填充 key
20709
20709
 
@@ -20725,7 +20725,7 @@ Defined in: [sys/mod.ts:1752](https://github.com/maiyunnet/kebab/blob/master/sys
20725
20725
 
20726
20726
  > **all**(): `Promise`\<`false` \| [`Rows`](Rows.md)\<`Mod`\>\>
20727
20727
 
20728
- Defined in: [sys/mod.ts:1119](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1119)
20728
+ Defined in: [sys/mod.ts:1125](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1125)
20729
20729
 
20730
20730
  ##### Returns
20731
20731
 
@@ -20735,7 +20735,7 @@ Defined in: [sys/mod.ts:1119](https://github.com/maiyunnet/kebab/blob/master/sys
20735
20735
 
20736
20736
  > **all**(`key`): `Promise`\<`false` \| `Record`\<`string`, `Mod`\>\>
20737
20737
 
20738
- Defined in: [sys/mod.ts:1120](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1120)
20738
+ Defined in: [sys/mod.ts:1126](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1126)
20739
20739
 
20740
20740
  ##### Parameters
20741
20741
 
@@ -20761,7 +20761,7 @@ Defined in: [sys/mod.ts:1120](https://github.com/maiyunnet/kebab/blob/master/sys
20761
20761
 
20762
20762
  > **allArray**(): `Promise`\<`false` \| `Record`\<`string`, `any`\>[]\>
20763
20763
 
20764
- Defined in: [sys/mod.ts:1294](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1294)
20764
+ Defined in: [sys/mod.ts:1300](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1300)
20765
20765
 
20766
20766
  ##### Returns
20767
20767
 
@@ -20771,7 +20771,7 @@ Defined in: [sys/mod.ts:1294](https://github.com/maiyunnet/kebab/blob/master/sys
20771
20771
 
20772
20772
  > **allArray**(`key`): `Promise`\<`false` \| `Record`\<`string`, `Record`\<`string`, `any`\>\>\>
20773
20773
 
20774
- Defined in: [sys/mod.ts:1295](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1295)
20774
+ Defined in: [sys/mod.ts:1301](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1301)
20775
20775
 
20776
20776
  ##### Parameters
20777
20777
 
@@ -20789,7 +20789,7 @@ Defined in: [sys/mod.ts:1295](https://github.com/maiyunnet/kebab/blob/master/sys
20789
20789
 
20790
20790
  > **append**(`sql`): `this`
20791
20791
 
20792
- Defined in: [sys/mod.ts:1661](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1661)
20792
+ Defined in: [sys/mod.ts:1667](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1667)
20793
20793
 
20794
20794
  在 sql 最后追加字符串
20795
20795
 
@@ -20809,7 +20809,7 @@ Defined in: [sys/mod.ts:1661](https://github.com/maiyunnet/kebab/blob/master/sys
20809
20809
 
20810
20810
  > **by**(`c`, `d`): `this`
20811
20811
 
20812
- Defined in: [sys/mod.ts:1617](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1617)
20812
+ Defined in: [sys/mod.ts:1623](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1623)
20813
20813
 
20814
20814
  ORDER BY
20815
20815
 
@@ -20837,7 +20837,7 @@ ORDER BY
20837
20837
 
20838
20838
  > **contain**(`contain`): `this`
20839
20839
 
20840
- Defined in: [sys/mod.ts:1670](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1670)
20840
+ Defined in: [sys/mod.ts:1676](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1676)
20841
20841
 
20842
20842
  设置闭包含数据
20843
20843
 
@@ -20865,7 +20865,7 @@ Defined in: [sys/mod.ts:1670](https://github.com/maiyunnet/kebab/blob/master/sys
20865
20865
 
20866
20866
  > **count**(): `Promise`\<`number`\>
20867
20867
 
20868
- Defined in: [sys/mod.ts:1483](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1483)
20868
+ Defined in: [sys/mod.ts:1489](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1489)
20869
20869
 
20870
20870
  根据当前条件,筛选出当前条目该有的数据条数
20871
20871
 
@@ -20879,7 +20879,7 @@ Defined in: [sys/mod.ts:1483](https://github.com/maiyunnet/kebab/blob/master/sys
20879
20879
 
20880
20880
  > **countSql**(): `string`
20881
20881
 
20882
- Defined in: [sys/mod.ts:1503](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1503)
20882
+ Defined in: [sys/mod.ts:1509](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1509)
20883
20883
 
20884
20884
  获取当前条件下的 count 的 SQL 语句
20885
20885
 
@@ -20909,7 +20909,7 @@ true-成功,false-报错,null-唯一键非 _$key 键冲突
20909
20909
 
20910
20910
  > **crossJoin**(`f`, `s`, `index`, `pre`): `this`
20911
20911
 
20912
- Defined in: [sys/mod.ts:1577](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1577)
20912
+ Defined in: [sys/mod.ts:1583](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1583)
20913
20913
 
20914
20914
  cross join 方法
20915
20915
 
@@ -20957,7 +20957,7 @@ ON 信息
20957
20957
 
20958
20958
  > **explain**(`all?`): `Promise`\<`string` \| `false`\>
20959
20959
 
20960
- Defined in: [sys/mod.ts:1416](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1416)
20960
+ Defined in: [sys/mod.ts:1422](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1422)
20961
20961
 
20962
20962
  ##### Parameters
20963
20963
 
@@ -20973,7 +20973,7 @@ Defined in: [sys/mod.ts:1416](https://github.com/maiyunnet/kebab/blob/master/sys
20973
20973
 
20974
20974
  > **explain**(`all`): `Promise`\<`false` \| `Record`\<`string`, `any`\>\>
20975
20975
 
20976
- Defined in: [sys/mod.ts:1417](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1417)
20976
+ Defined in: [sys/mod.ts:1423](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1423)
20977
20977
 
20978
20978
  ##### Parameters
20979
20979
 
@@ -20991,7 +20991,7 @@ Defined in: [sys/mod.ts:1417](https://github.com/maiyunnet/kebab/blob/master/sys
20991
20991
 
20992
20992
  > **filter**(`s`): `this`
20993
20993
 
20994
- Defined in: [sys/mod.ts:1595](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1595)
20994
+ Defined in: [sys/mod.ts:1601](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1601)
20995
20995
 
20996
20996
  筛选器
20997
20997
 
@@ -21025,7 +21025,7 @@ Defined in: [sys/mod.ts:1595](https://github.com/maiyunnet/kebab/blob/master/sys
21025
21025
 
21026
21026
  > **first**(`lock`, `array`): `Promise`\<`false` \| `Record`\<`string`, `any`\> \| `null`\>
21027
21027
 
21028
- Defined in: [sys/mod.ts:1008](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1008)
21028
+ Defined in: [sys/mod.ts:1014](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1014)
21029
21029
 
21030
21030
  ##### Parameters
21031
21031
 
@@ -21045,7 +21045,7 @@ Defined in: [sys/mod.ts:1008](https://github.com/maiyunnet/kebab/blob/master/sys
21045
21045
 
21046
21046
  > **first**(`lock?`, `array?`): `Promise`\<`false` \| `Mod` & `Record`\<`string`, `any`\> \| `null`\>
21047
21047
 
21048
- Defined in: [sys/mod.ts:1012](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1012)
21048
+ Defined in: [sys/mod.ts:1018](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1018)
21049
21049
 
21050
21050
  ##### Parameters
21051
21051
 
@@ -21067,7 +21067,7 @@ Defined in: [sys/mod.ts:1012](https://github.com/maiyunnet/kebab/blob/master/sys
21067
21067
 
21068
21068
  > **firstArray**(`lock`): `Promise`\<`false` \| `Record`\<`string`, `any`\> \| `null`\>
21069
21069
 
21070
- Defined in: [sys/mod.ts:1052](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1052)
21070
+ Defined in: [sys/mod.ts:1058](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1058)
21071
21071
 
21072
21072
  获取数据库第一个原生对象
21073
21073
 
@@ -21089,7 +21089,7 @@ Defined in: [sys/mod.ts:1052](https://github.com/maiyunnet/kebab/blob/master/sys
21089
21089
 
21090
21090
  > **format**(`sql?`, `data?`): `string`
21091
21091
 
21092
- Defined in: [sys/mod.ts:1697](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1697)
21092
+ Defined in: [sys/mod.ts:1703](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1703)
21093
21093
 
21094
21094
  获取带 data 的 sql 语句
21095
21095
 
@@ -21117,7 +21117,7 @@ sql 语句
21117
21117
 
21118
21118
  > **fullJoin**(`f`, `s`, `index`, `pre`): `this`
21119
21119
 
21120
- Defined in: [sys/mod.ts:1565](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1565)
21120
+ Defined in: [sys/mod.ts:1571](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1571)
21121
21121
 
21122
21122
  full join 方法
21123
21123
 
@@ -21179,7 +21179,7 @@ Defined in: [sys/mod.ts:811](https://github.com/maiyunnet/kebab/blob/master/sys/
21179
21179
 
21180
21180
  > **getData**(): `any`[]
21181
21181
 
21182
- Defined in: [sys/mod.ts:1688](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1688)
21182
+ Defined in: [sys/mod.ts:1694](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1694)
21183
21183
 
21184
21184
  获取全部 data
21185
21185
 
@@ -21193,7 +21193,7 @@ Defined in: [sys/mod.ts:1688](https://github.com/maiyunnet/kebab/blob/master/sys
21193
21193
 
21194
21194
  > **getSql**(): `string`
21195
21195
 
21196
- Defined in: [sys/mod.ts:1681](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1681)
21196
+ Defined in: [sys/mod.ts:1687](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1687)
21197
21197
 
21198
21198
  获取 sql 语句
21199
21199
 
@@ -21207,7 +21207,7 @@ Defined in: [sys/mod.ts:1681](https://github.com/maiyunnet/kebab/blob/master/sys
21207
21207
 
21208
21208
  > **group**(`c`): `this`
21209
21209
 
21210
- Defined in: [sys/mod.ts:1626](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1626)
21210
+ Defined in: [sys/mod.ts:1632](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1632)
21211
21211
 
21212
21212
  GROUP BY
21213
21213
 
@@ -21229,7 +21229,7 @@ GROUP BY
21229
21229
 
21230
21230
  > **having**(`s`): `this`
21231
21231
 
21232
- Defined in: [sys/mod.ts:1586](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1586)
21232
+ Defined in: [sys/mod.ts:1592](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1592)
21233
21233
 
21234
21234
  筛选器
21235
21235
 
@@ -21251,7 +21251,7 @@ Defined in: [sys/mod.ts:1586](https://github.com/maiyunnet/kebab/blob/master/sys
21251
21251
 
21252
21252
  > **innerJoin**(`f`, `s`, `index`, `pre`): `this`
21253
21253
 
21254
- Defined in: [sys/mod.ts:1553](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1553)
21254
+ Defined in: [sys/mod.ts:1559](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1559)
21255
21255
 
21256
21256
  inner join 方法
21257
21257
 
@@ -21291,7 +21291,7 @@ ON 信息
21291
21291
 
21292
21292
  > **join**(`f`, `s`, `type`, `index`, `pre`): `this`
21293
21293
 
21294
- Defined in: [sys/mod.ts:1517](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1517)
21294
+ Defined in: [sys/mod.ts:1523](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1523)
21295
21295
 
21296
21296
  #### Parameters
21297
21297
 
@@ -21335,7 +21335,7 @@ ON 信息
21335
21335
 
21336
21336
  > **langText**(`col`, `lang`): `string`
21337
21337
 
21338
- Defined in: [sys/mod.ts:1732](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1732)
21338
+ Defined in: [sys/mod.ts:1738](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1738)
21339
21339
 
21340
21340
  获取字段的可用语种文本
21341
21341
 
@@ -21363,7 +21363,7 @@ Defined in: [sys/mod.ts:1732](https://github.com/maiyunnet/kebab/blob/master/sys
21363
21363
 
21364
21364
  > **leftJoin**(`f`, `s`, `index`, `pre`): `this`
21365
21365
 
21366
- Defined in: [sys/mod.ts:1529](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1529)
21366
+ Defined in: [sys/mod.ts:1535](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1535)
21367
21367
 
21368
21368
  left join 方法
21369
21369
 
@@ -21403,7 +21403,7 @@ ON 信息
21403
21403
 
21404
21404
  > **limit**(`a`, `b`): `this`
21405
21405
 
21406
- Defined in: [sys/mod.ts:1639](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1639)
21406
+ Defined in: [sys/mod.ts:1645](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1645)
21407
21407
 
21408
21408
  LIMIT
21409
21409
 
@@ -21431,7 +21431,7 @@ LIMIT
21431
21431
 
21432
21432
  > **page**(`count`, `page`): `this`
21433
21433
 
21434
- Defined in: [sys/mod.ts:1650](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1650)
21434
+ Defined in: [sys/mod.ts:1656](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1656)
21435
21435
 
21436
21436
  分页
21437
21437
 
@@ -21459,7 +21459,7 @@ Defined in: [sys/mod.ts:1650](https://github.com/maiyunnet/kebab/blob/master/sys
21459
21459
 
21460
21460
  > **refresh**(`lock`): `Promise`\<`boolean` \| `null`\>
21461
21461
 
21462
- Defined in: [sys/mod.ts:933](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L933)
21462
+ Defined in: [sys/mod.ts:939](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L939)
21463
21463
 
21464
21464
  刷新当前模型获取最新数据
21465
21465
 
@@ -21481,7 +21481,7 @@ Defined in: [sys/mod.ts:933](https://github.com/maiyunnet/kebab/blob/master/sys/
21481
21481
 
21482
21482
  > **remove**(): `Promise`\<`boolean`\>
21483
21483
 
21484
- Defined in: [sys/mod.ts:990](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L990)
21484
+ Defined in: [sys/mod.ts:996](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L996)
21485
21485
 
21486
21486
  移除本条目
21487
21487
 
@@ -21495,7 +21495,7 @@ Defined in: [sys/mod.ts:990](https://github.com/maiyunnet/kebab/blob/master/sys/
21495
21495
 
21496
21496
  > **rightJoin**(`f`, `s`, `index`, `pre`): `this`
21497
21497
 
21498
- Defined in: [sys/mod.ts:1541](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1541)
21498
+ Defined in: [sys/mod.ts:1547](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1547)
21499
21499
 
21500
21500
  right join 方法
21501
21501
 
@@ -21535,7 +21535,7 @@ ON 信息
21535
21535
 
21536
21536
  > **save**(`where?`): `Promise`\<`boolean`\>
21537
21537
 
21538
- Defined in: [sys/mod.ts:961](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L961)
21538
+ Defined in: [sys/mod.ts:967](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L967)
21539
21539
 
21540
21540
  更新 set 的数据到数据库,有未保存数据时才保存
21541
21541
 
@@ -21627,7 +21627,7 @@ Defined in: [sys/mod.ts:773](https://github.com/maiyunnet/kebab/blob/master/sys/
21627
21627
 
21628
21628
  > **toArray**\<`TC`\>(): [`TOnlyProperties`](../type-aliases/TOnlyProperties.md)\<`InstanceType`\<`TC`\>\> & `Record`\<`string`, `any`\>
21629
21629
 
21630
- Defined in: [sys/mod.ts:1704](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1704)
21630
+ Defined in: [sys/mod.ts:1710](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1710)
21631
21631
 
21632
21632
  获取值对象,获取的是新创建的数组
21633
21633
 
@@ -21647,7 +21647,7 @@ Defined in: [sys/mod.ts:1704](https://github.com/maiyunnet/kebab/blob/master/sys
21647
21647
 
21648
21648
  > **total**(`f`): `Promise`\<`number`\>
21649
21649
 
21650
- Defined in: [sys/mod.ts:1459](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1459)
21650
+ Defined in: [sys/mod.ts:1465](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1465)
21651
21651
 
21652
21652
  获取总条数,自动抛弃 LIMIT,仅用于获取数据的情况(select)
21653
21653
 
@@ -21667,7 +21667,7 @@ Defined in: [sys/mod.ts:1459](https://github.com/maiyunnet/kebab/blob/master/sys
21667
21667
 
21668
21668
  > **union**(`f`, `type`): `this`
21669
21669
 
21670
- Defined in: [sys/mod.ts:1063](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1063)
21670
+ Defined in: [sys/mod.ts:1069](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1069)
21671
21671
 
21672
21672
  联合查询表数据
21673
21673
 
@@ -21695,7 +21695,7 @@ Defined in: [sys/mod.ts:1063](https://github.com/maiyunnet/kebab/blob/master/sys
21695
21695
 
21696
21696
  > **unionAll**(`f`): `this`
21697
21697
 
21698
- Defined in: [sys/mod.ts:1093](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1093)
21698
+ Defined in: [sys/mod.ts:1099](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1099)
21699
21699
 
21700
21700
  所有联合查询表数据
21701
21701
 
@@ -21717,7 +21717,7 @@ Defined in: [sys/mod.ts:1093](https://github.com/maiyunnet/kebab/blob/master/sys
21717
21717
 
21718
21718
  > **unsaved**(): `boolean`
21719
21719
 
21720
- Defined in: [sys/mod.ts:1723](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1723)
21720
+ Defined in: [sys/mod.ts:1729](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1729)
21721
21721
 
21722
21722
  当前是否设置了未保存 --=
21723
21723
 
@@ -21731,7 +21731,7 @@ Defined in: [sys/mod.ts:1723](https://github.com/maiyunnet/kebab/blob/master/sys
21731
21731
 
21732
21732
  > **updates**(): `Record`\<`string`, `any`\>
21733
21733
 
21734
- Defined in: [sys/mod.ts:1712](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1712)
21734
+ Defined in: [sys/mod.ts:1718](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1718)
21735
21735
 
21736
21736
  获取当前设置要提交的数据
21737
21737
 
@@ -21745,7 +21745,7 @@ Defined in: [sys/mod.ts:1712](https://github.com/maiyunnet/kebab/blob/master/sys
21745
21745
 
21746
21746
  > **upsert**(`conflict`): `Promise`\<`boolean`\>
21747
21747
 
21748
- Defined in: [sys/mod.ts:903](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L903)
21748
+ Defined in: [sys/mod.ts:909](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L909)
21749
21749
 
21750
21750
  插入数据,如果存在则更新(UPSERT)
21751
21751
 
@@ -21767,7 +21767,7 @@ Defined in: [sys/mod.ts:903](https://github.com/maiyunnet/kebab/blob/master/sys/
21767
21767
 
21768
21768
  > **where**(`s`): `this`
21769
21769
 
21770
- Defined in: [sys/mod.ts:1606](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1606)
21770
+ Defined in: [sys/mod.ts:1612](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1612)
21771
21771
 
21772
21772
  是 filter 的别名
21773
21773
 
@@ -22870,7 +22870,7 @@ sys/mod/interfaces/IModUnionItem.md
22870
22870
 
22871
22871
  # Interface: IModUnionItem
22872
22872
 
22873
- Defined in: [sys/mod.ts:1766](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1766)
22873
+ Defined in: [sys/mod.ts:1772](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1772)
22874
22874
 
22875
22875
  ## Properties
22876
22876
 
@@ -22878,7 +22878,7 @@ Defined in: [sys/mod.ts:1766](https://github.com/maiyunnet/kebab/blob/master/sys
22878
22878
 
22879
22879
  > **field**: `string`
22880
22880
 
22881
- Defined in: [sys/mod.ts:1767](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1767)
22881
+ Defined in: [sys/mod.ts:1773](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1773)
22882
22882
 
22883
22883
  ***
22884
22884
 
@@ -22886,7 +22886,7 @@ Defined in: [sys/mod.ts:1767](https://github.com/maiyunnet/kebab/blob/master/sys
22886
22886
 
22887
22887
  > `optional` **where**: `any`
22888
22888
 
22889
- Defined in: [sys/mod.ts:1768](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1768)
22889
+ Defined in: [sys/mod.ts:1774](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1774)
22890
22890
 
22891
22891
  sys/mod/interfaces/IRows.md
22892
22892
  ---
@@ -22899,7 +22899,7 @@ sys/mod/interfaces/IRows.md
22899
22899
 
22900
22900
  # Interface: IRows\<T\>
22901
22901
 
22902
- Defined in: [sys/mod.ts:1760](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1760)
22902
+ Defined in: [sys/mod.ts:1766](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1766)
22903
22903
 
22904
22904
  ## Extends
22905
22905
 
@@ -22917,7 +22917,7 @@ Defined in: [sys/mod.ts:1760](https://github.com/maiyunnet/kebab/blob/master/sys
22917
22917
 
22918
22918
  > `readonly` **length**: `number`
22919
22919
 
22920
- Defined in: [sys/mod.ts:1761](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1761)
22920
+ Defined in: [sys/mod.ts:1767](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1767)
22921
22921
 
22922
22922
  ## Methods
22923
22923
 
@@ -22925,7 +22925,7 @@ Defined in: [sys/mod.ts:1761](https://github.com/maiyunnet/kebab/blob/master/sys
22925
22925
 
22926
22926
  > **item**(`index`): `T`
22927
22927
 
22928
- Defined in: [sys/mod.ts:1762](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1762)
22928
+ Defined in: [sys/mod.ts:1768](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1768)
22929
22929
 
22930
22930
  #### Parameters
22931
22931
 
@@ -22943,7 +22943,7 @@ Defined in: [sys/mod.ts:1762](https://github.com/maiyunnet/kebab/blob/master/sys
22943
22943
 
22944
22944
  > **toArray**(): `Record`\<`string`, `any`\>[]
22945
22945
 
22946
- Defined in: [sys/mod.ts:1763](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1763)
22946
+ Defined in: [sys/mod.ts:1769](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1769)
22947
22947
 
22948
22948
  #### Returns
22949
22949
 
package/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * --- 本文件用来定义每个目录实体地址的常量 ---
6
6
  */
7
7
  /** --- 当前系统版本号 --- */
8
- export declare const VER = "7.7.0";
8
+ export declare const VER = "7.7.1";
9
9
  /** --- 框架根目录,以 / 结尾 --- */
10
10
  export declare const ROOT_PATH: string;
11
11
  export declare const LIB_PATH: string;
package/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * --- 本文件用来定义每个目录实体地址的常量 ---
7
7
  */
8
8
  /** --- 当前系统版本号 --- */
9
- export const VER = '7.7.0';
9
+ export const VER = '7.7.1';
10
10
  // --- 服务端用的路径 ---
11
11
  const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
12
12
  /** --- /xxx/xxx --- */
package/lib/crypto.js CHANGED
@@ -31,6 +31,7 @@ export function generateKeyPair(type, options = {}) {
31
31
  };
32
32
  options.privateKeyEncoding.type ??= 'pkcs8';
33
33
  options.privateKeyEncoding.format ??= 'pem';
34
+ /** --- 由于 generateKeyPair 重载过多且 options 为 any,此处参数也采用 any --- */
34
35
  crypto.generateKeyPair(type, options, (err, publicKey, privateKey) => {
35
36
  resolve({
36
37
  'private': privateKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maiyunnet/kebab",
3
- "version": "7.7.0",
3
+ "version": "7.7.1",
4
4
  "description": "Simple, easy-to-use, and fully-featured Node.js framework that is ready-to-use out of the box.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -22,30 +22,30 @@
22
22
  "#kebab/*": "./*"
23
23
  },
24
24
  "dependencies": {
25
- "@aws-sdk/client-s3": "^3.943.0",
26
- "@aws-sdk/lib-storage": "^3.943.0",
25
+ "@aws-sdk/client-s3": "^3.971.0",
26
+ "@aws-sdk/lib-storage": "^3.971.0",
27
27
  "@litert/http-client": "^1.1.2",
28
28
  "@litert/mime": "^0.1.3",
29
29
  "@litert/redis": "^3.1.0",
30
30
  "@litert/websocket": "^0.2.8",
31
31
  "@types/ssh2": "^1.15.5",
32
- "@zilliz/milvus2-sdk-node": "^2.6.5",
33
- "ejs": "^3.1.10",
32
+ "@zilliz/milvus2-sdk-node": "^2.6.9",
33
+ "ejs": "^4.0.1",
34
34
  "jszip": "^3.10.1",
35
- "mysql2": "^3.15.3",
35
+ "mysql2": "^3.16.1",
36
36
  "node-cron": "^4.2.1",
37
- "openai": "^6.10.0",
38
- "pg": "^8.16.3",
37
+ "openai": "^6.16.0",
38
+ "pg": "^8.17.1",
39
39
  "ssh2": "^1.17.0",
40
40
  "svg-captcha": "^1.4.0",
41
- "tencentcloud-sdk-nodejs": "^4.1.153"
41
+ "tencentcloud-sdk-nodejs": "^4.1.172"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@litert/eslint-plugin-rules": "^0.3.1",
45
45
  "@types/ejs": "^3.1.5",
46
- "@types/node": "^24.10.1",
47
- "@types/pg": "^8.15.6",
48
- "typedoc": "^0.28.15",
46
+ "@types/node": "^25.0.9",
47
+ "@types/pg": "^8.16.0",
48
+ "typedoc": "^0.28.16",
49
49
  "typedoc-plugin-markdown": "^4.9.0",
50
50
  "typescript": "^5.9.3"
51
51
  }
package/sys/master.js CHANGED
@@ -3,8 +3,8 @@
3
3
  * Date: 2019-5-2 21:03:42
4
4
  * Last: 2020-3-7 10:33:17, 2022-07-22 13:40:10, 2022-09-06 22:40:58, 2024-2-7 01:44:59, 2024-7-2 15:17:09, 2025-6-13 13:06:43, 2025-12-5 13:15:03
5
5
  */
6
+ import cluster from 'cluster';
6
7
  import * as os from 'os';
7
- import * as cluster from 'cluster';
8
8
  import * as http from 'http';
9
9
  // --- 库和定义 ---
10
10
  import * as kebab from '#kebab/index.js';
@@ -22,7 +22,7 @@ const workerList = {};
22
22
  */
23
23
  async function run() {
24
24
  // --- 设置 cluster 调度策略为 round-robin(在支持的平台上启用负载均衡) ---
25
- cluster.default.schedulingPolicy = cluster.default.SCHED_RR;
25
+ cluster.schedulingPolicy = cluster.SCHED_RR;
26
26
  // --- 读取配置文件 ---
27
27
  const configContent = await lFs.getContent(kebab.CONF_CWD + 'config.json', 'utf8');
28
28
  if (!configContent) {
@@ -48,7 +48,7 @@ async function run() {
48
48
  for (let i = 0; i < cpuLengthMax; ++i) {
49
49
  await createChildProcess(i);
50
50
  }
51
- cluster.default.on('listening', function (worker, address) {
51
+ cluster.on('listening', function (worker, address) {
52
52
  // --- 子进程开始监听 ---
53
53
  lCore.display(`[master] Listening: worker ${worker.process.pid ?? 'undefined'}, Address: ${address.address}:${address.port}.`);
54
54
  }).on('exit', function (worker, code) {
@@ -419,7 +419,7 @@ async function checkWorkerLost() {
419
419
  * @param cpu CPU ID
420
420
  */
421
421
  async function createChildProcess(cpu) {
422
- const worker = cluster.default.fork();
422
+ const worker = cluster.fork();
423
423
  if (!worker.process.pid) {
424
424
  return;
425
425
  }
package/sys/mod.js CHANGED
@@ -615,8 +615,11 @@ export default class Mod {
615
615
  }
616
616
  // --- 未处理的错误 ---
617
617
  const service = this._db.getService();
618
- lCore.debug('[MOD][create0][' + cstr._$table + ']', service !== null ? lDb.ESERVICE[service] : 'NONE', r);
619
618
  lCore.log(this._ctr ?? {}, '[MOD][create0][' + cstr._$table + '] ' + lText.stringifyJson(r.error?.message ?? '').slice(1, -1).replace(/"/g, '""'), '-error');
619
+ if (lCore.globalConfig.debug) {
620
+ lCore.debug('[MOD][create0][' + cstr._$table + ']', service !== null ? lDb.ESERVICE[service] : 'NONE', r);
621
+ lCore.debug(this._sql.format());
622
+ }
620
623
  return false;
621
624
  }
622
625
  }
@@ -626,8 +629,11 @@ export default class Mod {
626
629
  r = await this._db.execute(this._sql.getSql(), this._sql.getData());
627
630
  if (r.error) {
628
631
  if (r.error.errno !== 1062) {
629
- lCore.debug('[MOD][create1][' + cstr._$table + ']', r);
630
632
  lCore.log(this._ctr ?? {}, '[MOD][create1][' + cstr._$table + '] ' + lText.stringifyJson(r.error?.message ?? '').slice(1, -1).replace(/"/g, '""'), '-error');
633
+ if (lCore.globalConfig.debug) {
634
+ lCore.debug('[MOD][create1][' + cstr._$table + ']', r);
635
+ lCore.debug(this._sql.format());
636
+ }
631
637
  return false;
632
638
  }
633
639
  return null;
@@ -0,0 +1,8 @@
1
+ import * as sCtr from '#kebab/sys/ctr.js';
2
+ export default class extends sCtr.Ctr {
3
+ /**
4
+ * --- Agent 示例接口 ---
5
+ * --- 访问:/agent?q=上海天气怎么样? ---
6
+ */
7
+ index(): Promise<string>;
8
+ }
@@ -0,0 +1,68 @@
1
+ import * as sCtr from '#kebab/sys/ctr.js';
2
+ import * as lAi from '#kebab/lib/ai.js';
3
+ import * as lFs from '#kebab/lib/fs.js';
4
+ import * as lText from '#kebab/lib/text.js';
5
+ /** --- Skill 导入 --- */
6
+ import sWeather from '../skill/weather.js';
7
+ export default class extends sCtr.Ctr {
8
+ /**
9
+ * --- Agent 示例接口 ---
10
+ * --- 访问:/agent?q=上海天气怎么样? ---
11
+ */
12
+ async index() {
13
+ // --- 1. 获取用户问题 ---
14
+ const userPrompt = this._get['q'] ?? '你好';
15
+ // --- 2. 加载系统提示词 ---
16
+ const systemPrompt = await lFs.getContent(`${this._config.const.rootPath}www/example/prompt/agent.txt`, 'utf8') ?? '';
17
+ // --- 3. 初始化 AI ---
18
+ const ai = lAi.get(this, {
19
+ 'service': lAi.ESERVICE.ALICN,
20
+ });
21
+ // --- 4. 准备消息 ---
22
+ const messages = [
23
+ { 'role': 'system', 'content': systemPrompt },
24
+ { 'role': 'user', 'content': userPrompt },
25
+ ];
26
+ // --- 5. 第一次对话,传入 Skills 定义 ---
27
+ const res = await ai.chat({
28
+ 'model': 'qwen-plus',
29
+ 'messages': messages,
30
+ 'tools': [sWeather.definition],
31
+ });
32
+ if (!res) {
33
+ return '系统错误';
34
+ }
35
+ const message = res.choices[0].message;
36
+ // --- 6. 如果 AI 决定调用工具 ---
37
+ if (message.tool_calls && message.tool_calls.length > 0) {
38
+ messages.push(message);
39
+ for (const toolCall of message.tool_calls) {
40
+ if (toolCall.function.name === 'get_weather') {
41
+ // --- 解析参数并执行 ---
42
+ const args = lText.parseJson(toolCall.function.arguments);
43
+ if (args === false) {
44
+ continue;
45
+ }
46
+ const result = await sWeather.execute(args);
47
+ // --- 将结果反馈给消息流 ---
48
+ messages.push({
49
+ 'role': 'tool',
50
+ 'tool_call_id': toolCall.id,
51
+ 'name': 'get_weather',
52
+ 'content': result,
53
+ });
54
+ }
55
+ }
56
+ // --- 7. 第二次对话,获取最终文本回复 ---
57
+ const finalRes = await ai.chat({
58
+ 'model': 'qwen-plus',
59
+ 'messages': messages,
60
+ });
61
+ if (finalRes) {
62
+ return finalRes.choices[0].message.content ?? '未能生成回复';
63
+ }
64
+ }
65
+ // --- 如果不需要工具调用,直接返回内容 ---
66
+ return message.content ?? '未能生成回复';
67
+ }
68
+ }
@@ -0,0 +1,15 @@
1
+ import type * as openai from 'openai';
2
+ /**
3
+ * --- 获取天气预报的 Skill ---
4
+ */
5
+ export default class {
6
+ /** --- Skill 的定义,供 AI 模型识别 --- */
7
+ static definition: openai.default.Chat.ChatCompletionTool;
8
+ /**
9
+ * --- 执行获取天气的逻辑 ---
10
+ * @param args AI 传过来的参数
11
+ */
12
+ static execute(args: {
13
+ 'city': string;
14
+ }): Promise<string>;
15
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * --- 获取天气预报的 Skill ---
3
+ */
4
+ export default class default_1 {
5
+ /** --- Skill 的定义,供 AI 模型识别 --- */
6
+ static definition = {
7
+ 'type': 'function',
8
+ 'function': {
9
+ 'name': 'get_weather',
10
+ 'description': '获取指定城市的天气信息',
11
+ 'parameters': {
12
+ 'type': 'object',
13
+ 'properties': {
14
+ 'city': {
15
+ 'type': 'string',
16
+ 'description': '城市名称,例如“上海”、“北京”',
17
+ },
18
+ },
19
+ 'required': ['city'],
20
+ },
21
+ },
22
+ };
23
+ /**
24
+ * --- 执行获取天气的逻辑 ---
25
+ * @param args AI 传过来的参数
26
+ */
27
+ static async execute(args) {
28
+ // --- 这里是模拟获取天气的逻辑,实际开发中可以调用第三方 API ---
29
+ const weathers = {
30
+ '上海': '晴朗,25℃',
31
+ '北京': '多云,20℃',
32
+ '广州': '阵雨,28℃',
33
+ };
34
+ return weathers[args.city] ?? `抱歉,暂不支持查询 ${args.city} 的天气。`;
35
+ }
36
+ }