@maiyunnet/kebab 9.12.0 → 9.12.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
@@ -1360,7 +1360,7 @@ index/variables/VER.md
1360
1360
 
1361
1361
  # Variable: VER
1362
1362
 
1363
- > `const` **VER**: `"9.11.9"` = `'9.11.9'`
1363
+ > `const` **VER**: `"9.12.2"` = `'9.12.2'`
1364
1364
 
1365
1365
  Defined in: [index.ts:10](https://github.com/maiyunnet/kebab/blob/master/index.ts#L10)
1366
1366
 
@@ -13741,7 +13741,7 @@ Defined in: [lib/sql.ts:69](https://github.com/maiyunnet/kebab/blob/master/lib/s
13741
13741
 
13742
13742
  > **append**(`sql`): `this`
13743
13743
 
13744
- Defined in: [lib/sql.ts:1005](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1005)
13744
+ Defined in: [lib/sql.ts:1006](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1006)
13745
13745
 
13746
13746
  在 sql 最后追加字符串
13747
13747
 
@@ -13761,7 +13761,7 @@ Defined in: [lib/sql.ts:1005](https://github.com/maiyunnet/kebab/blob/master/lib
13761
13761
 
13762
13762
  > **by**(`c`, `d?`): `this`
13763
13763
 
13764
- Defined in: [lib/sql.ts:761](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L761)
13764
+ Defined in: [lib/sql.ts:762](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L762)
13765
13765
 
13766
13766
  ORDER BY
13767
13767
 
@@ -13789,7 +13789,7 @@ ORDER BY
13789
13789
 
13790
13790
  > **copy**(`f?`, `opt?`): `Sql`
13791
13791
 
13792
- Defined in: [lib/sql.ts:829](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L829)
13792
+ Defined in: [lib/sql.ts:830](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L830)
13793
13793
 
13794
13794
  创建一个本对象的一个新的 sql 对象拷贝
13795
13795
 
@@ -13817,7 +13817,7 @@ Defined in: [lib/sql.ts:829](https://github.com/maiyunnet/kebab/blob/master/lib/
13817
13817
 
13818
13818
  > **crossJoin**(`f`, `s?`, `suf?`, `pre?`): `this`
13819
13819
 
13820
- Defined in: [lib/sql.ts:490](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L490)
13820
+ Defined in: [lib/sql.ts:491](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L491)
13821
13821
 
13822
13822
  cross join 方法
13823
13823
 
@@ -13857,7 +13857,7 @@ MySQL 时为表前缀,PostgreSQL 时为 Schema 名,仅在 join 非默认前
13857
13857
 
13858
13858
  > **delete**(`f`): `this`
13859
13859
 
13860
- Defined in: [lib/sql.ts:378](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L378)
13860
+ Defined in: [lib/sql.ts:379](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L379)
13861
13861
 
13862
13862
  'xx'
13863
13863
 
@@ -13879,7 +13879,7 @@ Defined in: [lib/sql.ts:378](https://github.com/maiyunnet/kebab/blob/master/lib/
13879
13879
 
13880
13880
  > **field**(`str`, `pre?`, `suf?`): `string`
13881
13881
 
13882
- Defined in: [lib/sql.ts:1016](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1016)
13882
+ Defined in: [lib/sql.ts:1017](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1017)
13883
13883
 
13884
13884
  对字段进行包裹
13885
13885
 
@@ -13911,7 +13911,7 @@ MySQL 时为表前缀,PostgreSQL 时为 Schema 名,仅请在 field 表名时
13911
13911
 
13912
13912
  > **format**(`sql?`, `data?`): `string`
13913
13913
 
13914
- Defined in: [lib/sql.ts:995](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L995)
13914
+ Defined in: [lib/sql.ts:996](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L996)
13915
13915
 
13916
13916
  获取带 data 的 sql 语句
13917
13917
 
@@ -13935,7 +13935,7 @@ Defined in: [lib/sql.ts:995](https://github.com/maiyunnet/kebab/blob/master/lib/
13935
13935
 
13936
13936
  > **fullJoin**(`f`, `s?`, `suf?`, `pre?`): `this`
13937
13937
 
13938
- Defined in: [lib/sql.ts:479](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L479)
13938
+ Defined in: [lib/sql.ts:480](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L480)
13939
13939
 
13940
13940
  full join 方法
13941
13941
 
@@ -13975,7 +13975,7 @@ MySQL 时为表前缀,PostgreSQL 时为 Schema 名,仅在 join 非默认前
13975
13975
 
13976
13976
  > **getData**(): [`DbValue`](../../../index/type-aliases/DbValue.md)[]
13977
13977
 
13978
- Defined in: [lib/sql.ts:979](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L979)
13978
+ Defined in: [lib/sql.ts:980](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L980)
13979
13979
 
13980
13980
  获取全部 data
13981
13981
 
@@ -13989,7 +13989,7 @@ Defined in: [lib/sql.ts:979](https://github.com/maiyunnet/kebab/blob/master/lib/
13989
13989
 
13990
13990
  > **getPre**(): `string`
13991
13991
 
13992
- Defined in: [lib/sql.ts:986](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L986)
13992
+ Defined in: [lib/sql.ts:987](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L987)
13993
13993
 
13994
13994
  获取定义的 pre
13995
13995
 
@@ -14003,7 +14003,7 @@ Defined in: [lib/sql.ts:986](https://github.com/maiyunnet/kebab/blob/master/lib/
14003
14003
 
14004
14004
  > **getSql**(): `string`
14005
14005
 
14006
- Defined in: [lib/sql.ts:963](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L963)
14006
+ Defined in: [lib/sql.ts:964](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L964)
14007
14007
 
14008
14008
  获取 sql 语句
14009
14009
 
@@ -14017,7 +14017,7 @@ Defined in: [lib/sql.ts:963](https://github.com/maiyunnet/kebab/blob/master/lib/
14017
14017
 
14018
14018
  > **group**(`c`): `this`
14019
14019
 
14020
- Defined in: [lib/sql.ts:785](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L785)
14020
+ Defined in: [lib/sql.ts:786](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L786)
14021
14021
 
14022
14022
  GROUP BY
14023
14023
 
@@ -14039,7 +14039,7 @@ GROUP BY
14039
14039
 
14040
14040
  > **having**(`s?`): `this`
14041
14041
 
14042
- Defined in: [lib/sql.ts:497](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L497)
14042
+ Defined in: [lib/sql.ts:498](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L498)
14043
14043
 
14044
14044
  having 后置筛选器,用法类似 where
14045
14045
 
@@ -14059,7 +14059,7 @@ having 后置筛选器,用法类似 where
14059
14059
 
14060
14060
  > **innerJoin**(`f`, `s?`, `suf?`, `pre?`): `this`
14061
14061
 
14062
- Defined in: [lib/sql.ts:468](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L468)
14062
+ Defined in: [lib/sql.ts:469](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L469)
14063
14063
 
14064
14064
  inner join 方法
14065
14065
 
@@ -14127,7 +14127,7 @@ Defined in: [lib/sql.ts:99](https://github.com/maiyunnet/kebab/blob/master/lib/s
14127
14127
 
14128
14128
  > **join**(`f`, `s?`, `type?`, `suf?`, `pre?`): `this`
14129
14129
 
14130
- Defined in: [lib/sql.ts:420](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L420)
14130
+ Defined in: [lib/sql.ts:421](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L421)
14131
14131
 
14132
14132
  join 方法
14133
14133
 
@@ -14173,7 +14173,7 @@ MySQL 时为表前缀,PostgreSQL 时为 Schema 名,仅在 join 非默认前
14173
14173
 
14174
14174
  > **leftJoin**(`f`, `s?`, `suf?`, `pre?`): `this`
14175
14175
 
14176
- Defined in: [lib/sql.ts:446](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L446)
14176
+ Defined in: [lib/sql.ts:447](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L447)
14177
14177
 
14178
14178
  left join 方法
14179
14179
 
@@ -14213,7 +14213,7 @@ MySQL 时为表前缀,PostgreSQL 时为 Schema 名,仅在 join 非默认前
14213
14213
 
14214
14214
  > **limit**(`a`, `b?`): `this`
14215
14215
 
14216
- Defined in: [lib/sql.ts:805](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L805)
14216
+ Defined in: [lib/sql.ts:806](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L806)
14217
14217
 
14218
14218
  LIMIT(limit、offset, limit)
14219
14219
 
@@ -14241,7 +14241,7 @@ LIMIT(limit、offset, limit)
14241
14241
 
14242
14242
  > **lock**(): `this`
14243
14243
 
14244
- Defined in: [lib/sql.ts:820](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L820)
14244
+ Defined in: [lib/sql.ts:821](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L821)
14245
14245
 
14246
14246
  追加消极锁,通常不建议使用
14247
14247
 
@@ -14255,7 +14255,7 @@ Defined in: [lib/sql.ts:820](https://github.com/maiyunnet/kebab/blob/master/lib/
14255
14255
 
14256
14256
  > **rightJoin**(`f`, `s?`, `suf?`, `pre?`): `this`
14257
14257
 
14258
- Defined in: [lib/sql.ts:457](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L457)
14258
+ Defined in: [lib/sql.ts:458](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L458)
14259
14259
 
14260
14260
  right join 方法
14261
14261
 
@@ -14295,7 +14295,7 @@ MySQL 时为表前缀,PostgreSQL 时为 Schema 名,仅在 join 非默认前
14295
14295
 
14296
14296
  > **select**(`c`, `f`): `this`
14297
14297
 
14298
- Defined in: [lib/sql.ts:269](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L269)
14298
+ Defined in: [lib/sql.ts:270](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L270)
14299
14299
 
14300
14300
  '*', 'xx'
14301
14301
 
@@ -14323,7 +14323,7 @@ Defined in: [lib/sql.ts:269](https://github.com/maiyunnet/kebab/blob/master/lib/
14323
14323
 
14324
14324
  > **union**(`lsql`, `type?`): `this`
14325
14325
 
14326
- Defined in: [lib/sql.ts:390](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L390)
14326
+ Defined in: [lib/sql.ts:391](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L391)
14327
14327
 
14328
14328
  联查另一个 sql 对象
14329
14329
 
@@ -14351,7 +14351,7 @@ sql 对象
14351
14351
 
14352
14352
  > **unionAll**(`lsql`): `this`
14353
14353
 
14354
- Defined in: [lib/sql.ts:408](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L408)
14354
+ Defined in: [lib/sql.ts:409](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L409)
14355
14355
 
14356
14356
  所有联查另一个 sql 对象
14357
14357
 
@@ -14373,7 +14373,7 @@ sql 对象
14373
14373
 
14374
14374
  > **update**(`f`, `s`): `this`
14375
14375
 
14376
- Defined in: [lib/sql.ts:310](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L310)
14376
+ Defined in: [lib/sql.ts:311](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L311)
14377
14377
 
14378
14378
  UPDATE SQL 方法
14379
14379
 
@@ -14500,7 +14500,7 @@ Defined in: [lib/sql.ts:118](https://github.com/maiyunnet/kebab/blob/master/lib/
14500
14500
 
14501
14501
  > **where**(`s`): `this`
14502
14502
 
14503
- Defined in: [lib/sql.ts:531](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L531)
14503
+ Defined in: [lib/sql.ts:532](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L532)
14504
14504
 
14505
14505
  筛选器
14506
14506
  1. 'city': 'bj', 'type': '2'
@@ -14643,7 +14643,7 @@ lib/sql/functions/aoMix.md
14643
14643
 
14644
14644
  > **aoMix**(`arr`): `Record`\<`string`, `string` \| `number` \| [`Json`](../../../index/type-aliases/Json.md)\>
14645
14645
 
14646
- Defined in: [lib/sql.ts:1401](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1401)
14646
+ Defined in: [lib/sql.ts:1402](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1402)
14647
14647
 
14648
14648
  将数组兑换为组合的对象(Array/Object mix)
14649
14649
 
@@ -14672,7 +14672,7 @@ lib/sql/functions/column.md
14672
14672
 
14673
14673
  > **column**(`field`): `object`
14674
14674
 
14675
- Defined in: [lib/sql.ts:1422](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1422)
14675
+ Defined in: [lib/sql.ts:1423](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1423)
14676
14676
 
14677
14677
  创建字段对象
14678
14678
 
@@ -14711,7 +14711,7 @@ lib/sql/functions/format.md
14711
14711
 
14712
14712
  > **format**(`sql`, `data`, `service?`): `string`
14713
14713
 
14714
- Defined in: [lib/sql.ts:1363](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1363)
14714
+ Defined in: [lib/sql.ts:1364](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1364)
14715
14715
 
14716
14716
  返回代入后的完整 SQL 字符串,这并不安全不能直接执行,只是用来调试打印 sql 语句
14717
14717
 
@@ -14752,7 +14752,7 @@ lib/sql/functions/get.md
14752
14752
 
14753
14753
  > **get**(`opt`): [`Sql`](../classes/Sql.md)
14754
14754
 
14755
- Defined in: [lib/sql.ts:1335](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1335)
14755
+ Defined in: [lib/sql.ts:1336](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1336)
14756
14756
 
14757
14757
  创建 sql 对象
14758
14758
 
@@ -14805,7 +14805,7 @@ lib/sql/functions/json.md
14805
14805
 
14806
14806
  > **json**(`obj`): `any`
14807
14807
 
14808
- Defined in: [lib/sql.ts:1460](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1460)
14808
+ Defined in: [lib/sql.ts:1461](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1461)
14809
14809
 
14810
14810
  将对象转换为 JSON 字符串并避开类型检查,用于适配 PostgreSQL 的 jsonb 字段
14811
14811
 
@@ -14834,7 +14834,7 @@ lib/sql/functions/value.md
14834
14834
 
14835
14835
  > **value**(`val`): `object`
14836
14836
 
14837
- Defined in: [lib/sql.ts:1441](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1441)
14837
+ Defined in: [lib/sql.ts:1442](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1442)
14838
14838
 
14839
14839
  创建字面量值对象,用于 where 条件中 v[0] 需要是值而非字段名的场景
14840
14840
  例:[value('hello'), 'IN', column('tags')]
@@ -18070,7 +18070,7 @@ lib/undici/functions/fetch.md
18070
18070
 
18071
18071
  > **fetch**(`input`, `init?`): `Promise`\<`Response`\>
18072
18072
 
18073
- Defined in: [lib/undici.ts:174](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L174)
18073
+ Defined in: [lib/undici.ts:175](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L175)
18074
18074
 
18075
18075
  发起一个完全兼容 fetch 的请求
18076
18076
 
@@ -18105,7 +18105,7 @@ lib/undici/functions/filterHeaders.md
18105
18105
 
18106
18106
  > **filterHeaders**(`headers`, `res?`, `filter?`): `Record`\<`string`, `string` \| `string`[]\>
18107
18107
 
18108
- Defined in: [lib/undici.ts:530](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L530)
18108
+ Defined in: [lib/undici.ts:531](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L531)
18109
18109
 
18110
18110
  剔除不代理的 header,返回新的 header
18111
18111
 
@@ -18146,7 +18146,7 @@ lib/undici/functions/getFormData.md
18146
18146
 
18147
18147
  > **getFormData**(): [`FormData`](../formdata/classes/FormData.md)
18148
18148
 
18149
- Defined in: [lib/undici.ts:514](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L514)
18149
+ Defined in: [lib/undici.ts:515](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L515)
18150
18150
 
18151
18151
  创建 FormData 对象
18152
18152
 
@@ -18167,7 +18167,7 @@ lib/undici/functions/get.md
18167
18167
 
18168
18168
  > **get**(`u`, `opt?`): `Promise`\<[`Response`](../response/classes/Response.md)\>
18169
18169
 
18170
- Defined in: [lib/undici.ts:89](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L89)
18170
+ Defined in: [lib/undici.ts:90](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L90)
18171
18171
 
18172
18172
  发起一个 get 请求
18173
18173
 
@@ -18202,7 +18202,7 @@ lib/undici/functions/getProxyAgent.md
18202
18202
 
18203
18203
  > **getProxyAgent**(`url`): `ProxyAgent`
18204
18204
 
18205
- Defined in: [lib/undici.ts:20](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L20)
18205
+ Defined in: [lib/undici.ts:21](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L21)
18206
18206
 
18207
18207
  获取代理 agent
18208
18208
 
@@ -18229,7 +18229,7 @@ lib/undici/functions/getResponseJson.md
18229
18229
 
18230
18230
  > **getResponseJson**(`u`, `opt?`): `Promise`\<`any`\>
18231
18231
 
18232
- Defined in: [lib/undici.ts:153](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L153)
18232
+ Defined in: [lib/undici.ts:154](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L154)
18233
18233
 
18234
18234
  发起 GET 请求并解析 JSON 响应
18235
18235
 
@@ -18266,7 +18266,7 @@ lib/undici/functions/mproxyData.md
18266
18266
 
18267
18267
  > **mproxyData**(`ctr`): `any`
18268
18268
 
18269
- Defined in: [lib/undici.ts:619](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L619)
18269
+ Defined in: [lib/undici.ts:620](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L620)
18270
18270
 
18271
18271
  获取 mproxy 的附加数据
18272
18272
 
@@ -18295,7 +18295,7 @@ lib/undici/functions/mproxy.md
18295
18295
 
18296
18296
  > **mproxy**(`ctr`, `auth`, `opt?`): `Promise`\<`number`\>
18297
18297
 
18298
- Defined in: [lib/undici.ts:566](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L566)
18298
+ Defined in: [lib/undici.ts:567](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L567)
18299
18299
 
18300
18300
  正向 mproxy 代理,注意提前处理不要自动处理 post 数据,读取 get 的 url 为实际请求地址
18301
18301
  get: url, auth
@@ -18337,7 +18337,7 @@ lib/undici/functions/open.md
18337
18337
 
18338
18338
  > **open**(`u`): [`Request`](../request/classes/Request.md)
18339
18339
 
18340
- Defined in: [lib/undici.ts:80](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L80)
18340
+ Defined in: [lib/undici.ts:81](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L81)
18341
18341
 
18342
18342
  创建一个请求对象
18343
18343
 
@@ -18364,7 +18364,7 @@ lib/undici/functions/postJson.md
18364
18364
 
18365
18365
  > **postJson**(`u`, `data`, `opt?`): `Promise`\<[`Response`](../response/classes/Response.md)\>
18366
18366
 
18367
- Defined in: [lib/undici.ts:114](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L114)
18367
+ Defined in: [lib/undici.ts:115](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L115)
18368
18368
 
18369
18369
  发起 JSON 请求
18370
18370
 
@@ -18405,7 +18405,7 @@ lib/undici/functions/postJsonResponseJson.md
18405
18405
 
18406
18406
  > **postJsonResponseJson**(`u`, `data`, `opt?`): `Promise`\<`any`\>
18407
18407
 
18408
- Defined in: [lib/undici.ts:130](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L130)
18408
+ Defined in: [lib/undici.ts:131](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L131)
18409
18409
 
18410
18410
  发起 JSON 请求并解析 JSON 响应,失败时返回 null
18411
18411
 
@@ -18446,7 +18446,7 @@ lib/undici/functions/post.md
18446
18446
 
18447
18447
  > **post**(`u`, `data`, `opt?`): `Promise`\<[`Response`](../response/classes/Response.md)\>
18448
18448
 
18449
- Defined in: [lib/undici.ts:99](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L99)
18449
+ Defined in: [lib/undici.ts:100](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L100)
18450
18450
 
18451
18451
  发起一个 post 请求
18452
18452
 
@@ -18487,7 +18487,7 @@ lib/undici/functions/request.md
18487
18487
 
18488
18488
  > **request**(`u`, `data?`, `opt?`): `Promise`\<[`Response`](../response/classes/Response.md)\>
18489
18489
 
18490
- Defined in: [lib/undici.ts:343](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L343)
18490
+ Defined in: [lib/undici.ts:344](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L344)
18491
18491
 
18492
18492
  发起一个请求
18493
18493
 
@@ -18524,7 +18524,7 @@ lib/undici/functions/rproxy.md
18524
18524
 
18525
18525
  > **rproxy**(`ctr`, `route`, `opt?`): `Promise`\<`boolean`\>
18526
18526
 
18527
- Defined in: [lib/undici.ts:649](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L649)
18527
+ Defined in: [lib/undici.ts:650](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L650)
18528
18528
 
18529
18529
  反向代理,将本服务器的某个路由反代到其他网址
18530
18530
 
@@ -18612,7 +18612,7 @@ lib/undici/interfaces/IMproxyOptions.md
18612
18612
 
18613
18613
  # Interface: IMproxyOptions
18614
18614
 
18615
- Defined in: [lib/undici.ts:743](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L743)
18615
+ Defined in: [lib/undici.ts:758](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L758)
18616
18616
 
18617
18617
  正向代理请求的传入参数选项
18618
18618
 
@@ -18622,7 +18622,7 @@ Defined in: [lib/undici.ts:743](https://github.com/maiyunnet/kebab/blob/master/l
18622
18622
 
18623
18623
  > `optional` **filter?**: (`h`) => `boolean`
18624
18624
 
18625
- Defined in: [lib/undici.ts:752](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L752)
18625
+ Defined in: [lib/undici.ts:767](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L767)
18626
18626
 
18627
18627
  过滤 header,返回 true 则留下
18628
18628
 
@@ -18642,7 +18642,7 @@ Defined in: [lib/undici.ts:752](https://github.com/maiyunnet/kebab/blob/master/l
18642
18642
 
18643
18643
  > `optional` **follow?**: `number`
18644
18644
 
18645
- Defined in: [lib/undici.ts:746](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L746)
18645
+ Defined in: [lib/undici.ts:761](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L761)
18646
18646
 
18647
18647
  ***
18648
18648
 
@@ -18650,7 +18650,7 @@ Defined in: [lib/undici.ts:746](https://github.com/maiyunnet/kebab/blob/master/l
18650
18650
 
18651
18651
  > `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
18652
18652
 
18653
- Defined in: [lib/undici.ts:750](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L750)
18653
+ Defined in: [lib/undici.ts:765](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L765)
18654
18654
 
18655
18655
  ***
18656
18656
 
@@ -18658,7 +18658,7 @@ Defined in: [lib/undici.ts:750](https://github.com/maiyunnet/kebab/blob/master/l
18658
18658
 
18659
18659
  > `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
18660
18660
 
18661
- Defined in: [lib/undici.ts:748](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L748)
18661
+ Defined in: [lib/undici.ts:763](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L763)
18662
18662
 
18663
18663
  自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
18664
18664
 
@@ -18668,7 +18668,7 @@ Defined in: [lib/undici.ts:748](https://github.com/maiyunnet/kebab/blob/master/l
18668
18668
 
18669
18669
  > `optional` **local?**: `string`
18670
18670
 
18671
- Defined in: [lib/undici.ts:749](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L749)
18671
+ Defined in: [lib/undici.ts:764](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L764)
18672
18672
 
18673
18673
  ***
18674
18674
 
@@ -18676,7 +18676,7 @@ Defined in: [lib/undici.ts:749](https://github.com/maiyunnet/kebab/blob/master/l
18676
18676
 
18677
18677
  > `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
18678
18678
 
18679
- Defined in: [lib/undici.ts:754](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L754)
18679
+ Defined in: [lib/undici.ts:769](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L769)
18680
18680
 
18681
18681
  默认为 default
18682
18682
 
@@ -18686,7 +18686,7 @@ Defined in: [lib/undici.ts:754](https://github.com/maiyunnet/kebab/blob/master/l
18686
18686
 
18687
18687
  > `optional` **timeout?**: `number`
18688
18688
 
18689
- Defined in: [lib/undici.ts:745](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L745)
18689
+ Defined in: [lib/undici.ts:760](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L760)
18690
18690
 
18691
18691
  秒数,默认 300 秒
18692
18692
 
@@ -18701,7 +18701,7 @@ lib/undici/interfaces/IRequestOptions.md
18701
18701
 
18702
18702
  # Interface: IRequestOptions
18703
18703
 
18704
- Defined in: [lib/undici.ts:710](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L710)
18704
+ Defined in: [lib/undici.ts:725](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L725)
18705
18705
 
18706
18706
  请求的传入参数选项
18707
18707
 
@@ -18711,7 +18711,7 @@ Defined in: [lib/undici.ts:710](https://github.com/maiyunnet/kebab/blob/master/l
18711
18711
 
18712
18712
  > `optional` **cookie?**: `Record`\<`string`, [`ICookie`](../../cookie/interfaces/ICookie.md)\>
18713
18713
 
18714
- Defined in: [lib/undici.ts:735](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L735)
18714
+ Defined in: [lib/undici.ts:750](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L750)
18715
18715
 
18716
18716
  cookie 托管对象
18717
18717
 
@@ -18721,7 +18721,7 @@ cookie 托管对象
18721
18721
 
18722
18722
  > `optional` **follow?**: `number`
18723
18723
 
18724
- Defined in: [lib/undici.ts:716](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L716)
18724
+ Defined in: [lib/undici.ts:731](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L731)
18725
18725
 
18726
18726
  追踪 location 次数,0 为不追踪,默认为 0
18727
18727
 
@@ -18731,7 +18731,7 @@ Defined in: [lib/undici.ts:716](https://github.com/maiyunnet/kebab/blob/master/l
18731
18731
 
18732
18732
  > `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
18733
18733
 
18734
- Defined in: [lib/undici.ts:721](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L721)
18734
+ Defined in: [lib/undici.ts:736](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L736)
18735
18735
 
18736
18736
  ***
18737
18737
 
@@ -18739,7 +18739,7 @@ Defined in: [lib/undici.ts:721](https://github.com/maiyunnet/kebab/blob/master/l
18739
18739
 
18740
18740
  > `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
18741
18741
 
18742
- Defined in: [lib/undici.ts:718](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L718)
18742
+ Defined in: [lib/undici.ts:733](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L733)
18743
18743
 
18744
18744
  自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
18745
18745
 
@@ -18749,7 +18749,7 @@ Defined in: [lib/undici.ts:718](https://github.com/maiyunnet/kebab/blob/master/l
18749
18749
 
18750
18750
  > `optional` **keep?**: `boolean`
18751
18751
 
18752
- Defined in: [lib/undici.ts:731](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L731)
18752
+ Defined in: [lib/undici.ts:746](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L746)
18753
18753
 
18754
18754
  连接是否保持长连接(即是否允许复用),默认为 true
18755
18755
 
@@ -18759,7 +18759,7 @@ Defined in: [lib/undici.ts:731](https://github.com/maiyunnet/kebab/blob/master/l
18759
18759
 
18760
18760
  > `optional` **local?**: `string`
18761
18761
 
18762
- Defined in: [lib/undici.ts:720](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L720)
18762
+ Defined in: [lib/undici.ts:735](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L735)
18763
18763
 
18764
18764
  ***
18765
18765
 
@@ -18767,7 +18767,7 @@ Defined in: [lib/undici.ts:720](https://github.com/maiyunnet/kebab/blob/master/l
18767
18767
 
18768
18768
  > `optional` **log?**: `boolean`
18769
18769
 
18770
- Defined in: [lib/undici.ts:737](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L737)
18770
+ Defined in: [lib/undici.ts:752](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L752)
18771
18771
 
18772
18772
  若有异常写入文件日志,默认为 true
18773
18773
 
@@ -18777,7 +18777,7 @@ Defined in: [lib/undici.ts:737](https://github.com/maiyunnet/kebab/blob/master/l
18777
18777
 
18778
18778
  > `optional` **method?**: `"GET"` \| `"POST"` \| `"PUT"` \| `"DELETE"` \| `"OPTIONS"`
18779
18779
 
18780
- Defined in: [lib/undici.ts:711](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L711)
18780
+ Defined in: [lib/undici.ts:726](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L726)
18781
18781
 
18782
18782
  ***
18783
18783
 
@@ -18785,7 +18785,7 @@ Defined in: [lib/undici.ts:711](https://github.com/maiyunnet/kebab/blob/master/l
18785
18785
 
18786
18786
  > `optional` **mproxy?**: `object`
18787
18787
 
18788
- Defined in: [lib/undici.ts:723](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L723)
18788
+ Defined in: [lib/undici.ts:738](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L738)
18789
18789
 
18790
18790
  正向 mproxy 代理,url 如 https://xxx/abc
18791
18791
 
@@ -18813,7 +18813,7 @@ Defined in: [lib/undici.ts:723](https://github.com/maiyunnet/kebab/blob/master/l
18813
18813
 
18814
18814
  > `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
18815
18815
 
18816
- Defined in: [lib/undici.ts:733](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L733)
18816
+ Defined in: [lib/undici.ts:748](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L748)
18817
18817
 
18818
18818
  复用池名/Agent,默认为 default
18819
18819
 
@@ -18823,7 +18823,7 @@ Defined in: [lib/undici.ts:733](https://github.com/maiyunnet/kebab/blob/master/l
18823
18823
 
18824
18824
  > `optional` **save?**: `string`
18825
18825
 
18826
- Defined in: [lib/undici.ts:719](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L719)
18826
+ Defined in: [lib/undici.ts:734](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L734)
18827
18827
 
18828
18828
  ***
18829
18829
 
@@ -18831,7 +18831,7 @@ Defined in: [lib/undici.ts:719](https://github.com/maiyunnet/kebab/blob/master/l
18831
18831
 
18832
18832
  > `optional` **signal?**: `AbortSignal`
18833
18833
 
18834
- Defined in: [lib/undici.ts:739](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L739)
18834
+ Defined in: [lib/undici.ts:754](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L754)
18835
18835
 
18836
18836
  请求中止信号
18837
18837
 
@@ -18841,7 +18841,7 @@ Defined in: [lib/undici.ts:739](https://github.com/maiyunnet/kebab/blob/master/l
18841
18841
 
18842
18842
  > `optional` **timeout?**: `number`
18843
18843
 
18844
- Defined in: [lib/undici.ts:714](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L714)
18844
+ Defined in: [lib/undici.ts:729](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L729)
18845
18845
 
18846
18846
  秒数,默认 300 秒
18847
18847
 
@@ -18851,7 +18851,7 @@ Defined in: [lib/undici.ts:714](https://github.com/maiyunnet/kebab/blob/master/l
18851
18851
 
18852
18852
  > `optional` **type?**: `"form"` \| `"json"`
18853
18853
 
18854
- Defined in: [lib/undici.ts:712](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L712)
18854
+ Defined in: [lib/undici.ts:727](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L727)
18855
18855
 
18856
18856
  lib/undici/interfaces/IRproxyOptions.md
18857
18857
  ---
@@ -18864,7 +18864,7 @@ lib/undici/interfaces/IRproxyOptions.md
18864
18864
 
18865
18865
  # Interface: IRproxyOptions
18866
18866
 
18867
- Defined in: [lib/undici.ts:758](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L758)
18867
+ Defined in: [lib/undici.ts:773](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L773)
18868
18868
 
18869
18869
  反向代理请求的传入参数选项
18870
18870
 
@@ -18874,7 +18874,7 @@ Defined in: [lib/undici.ts:758](https://github.com/maiyunnet/kebab/blob/master/l
18874
18874
 
18875
18875
  > `optional` **body?**: `string` \| `Buffer`\<`ArrayBufferLike`\> \| `Readable`
18876
18876
 
18877
- Defined in: [lib/undici.ts:777](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L777)
18877
+ Defined in: [lib/undici.ts:792](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L792)
18878
18878
 
18879
18879
  手动传入请求体(优先于原始 req 流),用于 req 流已消费后仍需转发 body 的场景
18880
18880
 
@@ -18884,7 +18884,7 @@ Defined in: [lib/undici.ts:777](https://github.com/maiyunnet/kebab/blob/master/l
18884
18884
 
18885
18885
  > `optional` **filter?**: (`h`) => `boolean`
18886
18886
 
18887
- Defined in: [lib/undici.ts:767](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L767)
18887
+ Defined in: [lib/undici.ts:782](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L782)
18888
18888
 
18889
18889
  过滤 header,返回 true 则留下
18890
18890
 
@@ -18904,7 +18904,7 @@ Defined in: [lib/undici.ts:767](https://github.com/maiyunnet/kebab/blob/master/l
18904
18904
 
18905
18905
  > `optional` **follow?**: `number`
18906
18906
 
18907
- Defined in: [lib/undici.ts:761](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L761)
18907
+ Defined in: [lib/undici.ts:776](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L776)
18908
18908
 
18909
18909
  ***
18910
18910
 
@@ -18912,7 +18912,7 @@ Defined in: [lib/undici.ts:761](https://github.com/maiyunnet/kebab/blob/master/l
18912
18912
 
18913
18913
  > `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
18914
18914
 
18915
- Defined in: [lib/undici.ts:765](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L765)
18915
+ Defined in: [lib/undici.ts:780](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L780)
18916
18916
 
18917
18917
  ***
18918
18918
 
@@ -18920,7 +18920,7 @@ Defined in: [lib/undici.ts:765](https://github.com/maiyunnet/kebab/blob/master/l
18920
18920
 
18921
18921
  > `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
18922
18922
 
18923
- Defined in: [lib/undici.ts:763](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L763)
18923
+ Defined in: [lib/undici.ts:778](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L778)
18924
18924
 
18925
18925
  自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
18926
18926
 
@@ -18930,7 +18930,7 @@ Defined in: [lib/undici.ts:763](https://github.com/maiyunnet/kebab/blob/master/l
18930
18930
 
18931
18931
  > `optional` **local?**: `string`
18932
18932
 
18933
- Defined in: [lib/undici.ts:764](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L764)
18933
+ Defined in: [lib/undici.ts:779](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L779)
18934
18934
 
18935
18935
  ***
18936
18936
 
@@ -18938,7 +18938,7 @@ Defined in: [lib/undici.ts:764](https://github.com/maiyunnet/kebab/blob/master/l
18938
18938
 
18939
18939
  > `optional` **mproxy?**: `object`
18940
18940
 
18941
- Defined in: [lib/undici.ts:769](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L769)
18941
+ Defined in: [lib/undici.ts:784](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L784)
18942
18942
 
18943
18943
  正向 mproxy 代理,url 如 https://xxx/abc
18944
18944
 
@@ -18966,7 +18966,7 @@ Defined in: [lib/undici.ts:769](https://github.com/maiyunnet/kebab/blob/master/l
18966
18966
 
18967
18967
  > `optional` **querys?**: `Record`\<`string`, `any`\>
18968
18968
 
18969
- Defined in: [lib/undici.ts:779](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L779)
18969
+ Defined in: [lib/undici.ts:794](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L794)
18970
18970
 
18971
18971
  自定义 GET 查询参数,传入后直接替换代理目标 URL 的整个 query string
18972
18972
 
@@ -18976,7 +18976,7 @@ Defined in: [lib/undici.ts:779](https://github.com/maiyunnet/kebab/blob/master/l
18976
18976
 
18977
18977
  > `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
18978
18978
 
18979
- Defined in: [lib/undici.ts:781](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L781)
18979
+ Defined in: [lib/undici.ts:796](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L796)
18980
18980
 
18981
18981
  默认为 default
18982
18982
 
@@ -18986,7 +18986,7 @@ Defined in: [lib/undici.ts:781](https://github.com/maiyunnet/kebab/blob/master/l
18986
18986
 
18987
18987
  > `optional` **timeout?**: `number`
18988
18988
 
18989
- Defined in: [lib/undici.ts:760](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L760)
18989
+ Defined in: [lib/undici.ts:775](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L775)
18990
18990
 
18991
18991
  秒数,默认 300 秒
18992
18992
 
@@ -19475,7 +19475,7 @@ lib/undici/type-aliases/THttpHeaders.md
19475
19475
 
19476
19476
  > **THttpHeaders** = `http.IncomingHttpHeaders` & `object`
19477
19477
 
19478
- Defined in: [lib/undici.ts:786](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L786)
19478
+ Defined in: [lib/undici.ts:801](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L801)
19479
19479
 
19480
19480
  http headers
19481
19481
 
package/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * --- 本文件用来定义每个目录实体地址的常量 ---
6
6
  */
7
7
  /** --- 当前系统版本号 --- */
8
- export declare const VER = "9.12.0";
8
+ export declare const VER = "9.12.2";
9
9
  /** --- 框架根目录,以 / 结尾 --- */
10
10
  export declare const ROOT_PATH: string;
11
11
  /** --- 框架的 LIB,以 / 结尾 --- */
package/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * --- 本文件用来定义每个目录实体地址的常量 ---
7
7
  */
8
8
  /** --- 当前系统版本号 --- */
9
- export const VER = '9.12.0';
9
+ export const VER = '9.12.2';
10
10
  // --- 服务端用的路径 ---
11
11
  const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
12
12
  /** --- /xxx/xxx --- */
package/lib/net.js CHANGED
@@ -445,8 +445,8 @@ export function getFormData() {
445
445
  }
446
446
  /** --- proxy 要剔除的基础头部 --- */
447
447
  const proxyContinueHeaders = [
448
- 'host', 'connection', 'http-version', 'http-code', 'http-url',
449
- 'transfer-encoding'
448
+ 'host', 'connection', 'keep-alive', 'http-version', 'http-code', 'http-url',
449
+ 'transfer-encoding', 'upgrade', 'proxy-connection'
450
450
  ];
451
451
  /**
452
452
  * --- 剔除不代理的 header,返回新的 header ---
package/lib/sql.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Project: Kebab, User: JianSuoQiYue
3
3
  * Date: 2019-5-27 20:18:50
4
- * Last: 2020-3-29 19:37:25, 2022-07-24 22:38:11, 2023-5-24 18:49:18, 2023-6-13 22:20:21, 2023-12-11 13:58:54, 2023-12-14 13:14:40, 2023-12-21 00:04:40, 2024-4-11 19:29:29, 2024-9-2 17:15:28, 2025-8-3 21:28:18, 2025-11-9 16:20:23, 2026-4-30 13:49:44
4
+ * Last: 2020-3-29 19:37:25, 2022-07-24 22:38:11, 2023-5-24 18:49:18, 2023-6-13 22:20:21, 2023-12-11 13:58:54, 2023-12-14 13:14:40, 2023-12-21 00:04:40, 2024-4-11 19:29:29, 2024-9-2 17:15:28, 2025-8-3 21:28:18, 2025-11-9 16:20:23, 2026-4-30 13:49:44, 2026-6-1 11:30:00
5
5
  */
6
6
  import * as kebab from '#kebab/index.js';
7
7
  import * as ctr from '#kebab/sys/ctr.js';
package/lib/sql.js CHANGED
@@ -183,25 +183,26 @@ export class Sql {
183
183
  const quotedTable = this.field(table, this._pre);
184
184
  const quotedKey = this.field(key);
185
185
  if (this._service === ESERVICE.MYSQL) {
186
- // --- MySQL 8.0.19+ VALUES ROW() 派生表语法 ---
186
+ // --- MySQL UNION ALL SELECT 派生表语法 ---
187
187
  // --- 必须把 tmp 放在 UPDATE 的 table_references 最前面,并使用 STRAIGHT_JOIN:
188
188
  // 1. tmp 是小数据集,作为驱动表逐行查找目标表
189
189
  // 2. STRAIGHT_JOIN 强制目标表按 key 条件被查找,避免优化器反向全表扫描
190
- // 3. 相比 CASE WHENkey 只出现一次,SQL 和参数量都更小 ---
191
- const valueParts = [];
192
- for (const row of rows) {
193
- const parts = row.map(v => {
190
+ // 3. 相比 VALUES ROW()UNION ALL SELECT 不会将派生表列强制转换为目标表类型,
191
+ // 避免 "Data too long for column" 错误 ---
192
+ const selectParts = [];
193
+ for (let ri = 0; ri < rows.length; ri++) {
194
+ const row = rows[ri];
195
+ const parts = row.map((v, ci) => {
194
196
  const result = this._processValue(v);
195
197
  if (result.data.length > 0) {
196
198
  this._data.push(...result.data);
197
199
  }
198
- return result.sql;
200
+ return ri === 0 ? `${result.sql} AS ${this.field(allCols[ci])}` : result.sql;
199
201
  });
200
- valueParts.push(`ROW(${parts.join(', ')})`);
202
+ selectParts.push(`SELECT ${parts.join(', ')}`);
201
203
  }
202
- const tmpCols = allCols.map(c => this.field(c)).join(', ');
203
204
  const setClauses = cols.map(c => `t.${this.field(c)} = tmp.${this.field(c)}`).join(', ');
204
- this._sql = [`UPDATE (VALUES ${valueParts.join(', ')}) AS tmp(${tmpCols}) STRAIGHT_JOIN ${quotedTable} t ON t.${quotedKey} = tmp.${quotedKey} SET ${setClauses}`];
205
+ this._sql = [`UPDATE (${selectParts.join(' UNION ALL ')}) AS tmp STRAIGHT_JOIN ${quotedTable} t ON t.${quotedKey} = tmp.${quotedKey} SET ${setClauses}`];
205
206
  }
206
207
  else {
207
208
  // --- PostgreSQL 使用 UPDATE FROM (VALUES ...) ---
package/lib/undici.js CHANGED
@@ -333,7 +333,7 @@ export async function request(u, data, opt = {}) {
333
333
  headers['content-length'] = data.getLength();
334
334
  }
335
335
  }
336
- headers['accept-encoding'] = 'gzip, deflate';
336
+ headers['accept-encoding'] ??= 'gzip, deflate';
337
337
  // --- cookie 托管 ---
338
338
  if (opt.cookie) {
339
339
  headers['cookie'] = lCookie.buildCookieQuery(opt.cookie, uri);
@@ -621,8 +621,10 @@ export async function rproxy(ctr, route, opt = {}) {
621
621
  if (rres.headers) {
622
622
  filterHeaders(rres.headers, res, opt.filter);
623
623
  }
624
+ /** --- 上游已压缩则不再压缩,避免双重压缩导致乱码 --- */
625
+ const upstreamEncoded = !!(rres.headers?.['content-encoding']);
624
626
  /** --- 当前的压缩对象 --- */
625
- const compress = lZlib.createCompress(req.headers['accept-encoding'] ?? '');
627
+ const compress = upstreamEncoded ? null : lZlib.createCompress(req.headers['accept-encoding'] ?? '');
626
628
  if (compress) {
627
629
  res.setHeader('content-encoding', compress.type);
628
630
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maiyunnet/kebab",
3
- "version": "9.12.0",
3
+ "version": "9.12.2",
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": [
package/sys/mod.js CHANGED
@@ -1184,7 +1184,7 @@ export default class Mod {
1184
1184
  sql = sql
1185
1185
  .replace(/ LIMIT [0-9 ,]+(OFFSET [0-9]+)?/ig, '')
1186
1186
  .replace(/ ORDER BY [\w`",. ]+(DESC|ASC)?/ig, '');
1187
- if (sql.includes(' GROUP BY ')) {
1187
+ if (sql.includes(' GROUP BY ') || /\bUNION\b/i.test(sql)) {
1188
1188
  return `SELECT COUNT(0) AS ${q}count${q} FROM(` + sql + `) AS ${q}f${q}`;
1189
1189
  }
1190
1190
  return sql