@maiyunnet/kebab 9.18.0 → 9.18.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
@@ -225,7 +225,7 @@ Defined in: [index.ts:183](https://github.com/maiyunnet/kebab/blob/master/index.
225
225
 
226
226
  > **ctrPath**: `string`
227
227
 
228
- Defined in: [index.ts:208](https://github.com/maiyunnet/kebab/blob/master/index.ts#L208)
228
+ Defined in: [index.ts:210](https://github.com/maiyunnet/kebab/blob/master/index.ts#L210)
229
229
 
230
230
  ***
231
231
 
@@ -233,7 +233,7 @@ Defined in: [index.ts:208](https://github.com/maiyunnet/kebab/blob/master/index.
233
233
 
234
234
  > **dataPath**: `string`
235
235
 
236
- Defined in: [index.ts:210](https://github.com/maiyunnet/kebab/blob/master/index.ts#L210)
236
+ Defined in: [index.ts:212](https://github.com/maiyunnet/kebab/blob/master/index.ts#L212)
237
237
 
238
238
  ***
239
239
 
@@ -289,7 +289,7 @@ Defined in: [index.ts:195](https://github.com/maiyunnet/kebab/blob/master/index.
289
289
 
290
290
  > **modPath**: `string`
291
291
 
292
- Defined in: [index.ts:207](https://github.com/maiyunnet/kebab/blob/master/index.ts#L207)
292
+ Defined in: [index.ts:209](https://github.com/maiyunnet/kebab/blob/master/index.ts#L209)
293
293
 
294
294
  ***
295
295
 
@@ -327,7 +327,7 @@ Defined in: [index.ts:189](https://github.com/maiyunnet/kebab/blob/master/index.
327
327
 
328
328
  > **rootPath**: `string`
329
329
 
330
- Defined in: [index.ts:206](https://github.com/maiyunnet/kebab/blob/master/index.ts#L206)
330
+ Defined in: [index.ts:208](https://github.com/maiyunnet/kebab/blob/master/index.ts#L208)
331
331
 
332
332
  ***
333
333
 
@@ -351,7 +351,7 @@ Defined in: [index.ts:190](https://github.com/maiyunnet/kebab/blob/master/index.
351
351
 
352
352
  > **uri**: [`IUrlParse`](IUrlParse.md)
353
353
 
354
- Defined in: [index.ts:202](https://github.com/maiyunnet/kebab/blob/master/index.ts#L202)
354
+ Defined in: [index.ts:204](https://github.com/maiyunnet/kebab/blob/master/index.ts#L204)
355
355
 
356
356
  ***
357
357
 
@@ -359,7 +359,7 @@ Defined in: [index.ts:202](https://github.com/maiyunnet/kebab/blob/master/index.
359
359
 
360
360
  > **urlBase**: `string`
361
361
 
362
- Defined in: [index.ts:215](https://github.com/maiyunnet/kebab/blob/master/index.ts#L215)
362
+ Defined in: [index.ts:217](https://github.com/maiyunnet/kebab/blob/master/index.ts#L217)
363
363
 
364
364
  ***
365
365
 
@@ -367,7 +367,17 @@ Defined in: [index.ts:215](https://github.com/maiyunnet/kebab/blob/master/index.
367
367
 
368
368
  > **urlFull**: `string`
369
369
 
370
- Defined in: [index.ts:217](https://github.com/maiyunnet/kebab/blob/master/index.ts#L217)
370
+ Defined in: [index.ts:219](https://github.com/maiyunnet/kebab/blob/master/index.ts#L219)
371
+
372
+ ***
373
+
374
+ ### urlOrigin
375
+
376
+ > **urlOrigin**: `string`
377
+
378
+ Defined in: [index.ts:203](https://github.com/maiyunnet/kebab/blob/master/index.ts#L203)
379
+
380
+ 协议与 host,如 https://example.com:8443
371
381
 
372
382
  ***
373
383
 
@@ -375,7 +385,7 @@ Defined in: [index.ts:217](https://github.com/maiyunnet/kebab/blob/master/index.
375
385
 
376
386
  > **urlStc**: `string`
377
387
 
378
- Defined in: [index.ts:216](https://github.com/maiyunnet/kebab/blob/master/index.ts#L216)
388
+ Defined in: [index.ts:218](https://github.com/maiyunnet/kebab/blob/master/index.ts#L218)
379
389
 
380
390
  ***
381
391
 
@@ -383,7 +393,7 @@ Defined in: [index.ts:216](https://github.com/maiyunnet/kebab/blob/master/index.
383
393
 
384
394
  > **urlStcFull**: `string`
385
395
 
386
- Defined in: [index.ts:218](https://github.com/maiyunnet/kebab/blob/master/index.ts#L218)
396
+ Defined in: [index.ts:220](https://github.com/maiyunnet/kebab/blob/master/index.ts#L220)
387
397
 
388
398
  ***
389
399
 
@@ -391,7 +401,7 @@ Defined in: [index.ts:218](https://github.com/maiyunnet/kebab/blob/master/index.
391
401
 
392
402
  > **viewPath**: `string`
393
403
 
394
- Defined in: [index.ts:209](https://github.com/maiyunnet/kebab/blob/master/index.ts#L209)
404
+ Defined in: [index.ts:211](https://github.com/maiyunnet/kebab/blob/master/index.ts#L211)
395
405
 
396
406
  ***
397
407
 
@@ -407,7 +417,7 @@ Defined in: [index.ts:196](https://github.com/maiyunnet/kebab/blob/master/index.
407
417
 
408
418
  > **wsPath**: `string`
409
419
 
410
- Defined in: [index.ts:211](https://github.com/maiyunnet/kebab/blob/master/index.ts#L211)
420
+ Defined in: [index.ts:213](https://github.com/maiyunnet/kebab/blob/master/index.ts#L213)
411
421
 
412
422
  index/interfaces/IConfigDb.md
413
423
  ---
@@ -967,7 +977,7 @@ index/interfaces/IPostFile.md
967
977
 
968
978
  # Interface: IPostFile
969
979
 
970
- Defined in: [index.ts:230](https://github.com/maiyunnet/kebab/blob/master/index.ts#L230)
980
+ Defined in: [index.ts:232](https://github.com/maiyunnet/kebab/blob/master/index.ts#L232)
971
981
 
972
982
  上传的文件信息对象
973
983
 
@@ -977,7 +987,7 @@ Defined in: [index.ts:230](https://github.com/maiyunnet/kebab/blob/master/index.
977
987
 
978
988
  > `readonly` **name**: `string`
979
989
 
980
- Defined in: [index.ts:231](https://github.com/maiyunnet/kebab/blob/master/index.ts#L231)
990
+ Defined in: [index.ts:233](https://github.com/maiyunnet/kebab/blob/master/index.ts#L233)
981
991
 
982
992
  ***
983
993
 
@@ -985,7 +995,7 @@ Defined in: [index.ts:231](https://github.com/maiyunnet/kebab/blob/master/index.
985
995
 
986
996
  > `readonly` **origin**: `string`
987
997
 
988
- Defined in: [index.ts:232](https://github.com/maiyunnet/kebab/blob/master/index.ts#L232)
998
+ Defined in: [index.ts:234](https://github.com/maiyunnet/kebab/blob/master/index.ts#L234)
989
999
 
990
1000
  ***
991
1001
 
@@ -993,7 +1003,7 @@ Defined in: [index.ts:232](https://github.com/maiyunnet/kebab/blob/master/index.
993
1003
 
994
1004
  > `readonly` **path**: `string`
995
1005
 
996
- Defined in: [index.ts:234](https://github.com/maiyunnet/kebab/blob/master/index.ts#L234)
1006
+ Defined in: [index.ts:236](https://github.com/maiyunnet/kebab/blob/master/index.ts#L236)
997
1007
 
998
1008
  ***
999
1009
 
@@ -1001,7 +1011,7 @@ Defined in: [index.ts:234](https://github.com/maiyunnet/kebab/blob/master/index.
1001
1011
 
1002
1012
  > `readonly` **size**: `number`
1003
1013
 
1004
- Defined in: [index.ts:233](https://github.com/maiyunnet/kebab/blob/master/index.ts#L233)
1014
+ Defined in: [index.ts:235](https://github.com/maiyunnet/kebab/blob/master/index.ts#L235)
1005
1015
 
1006
1016
  index/interfaces/IUrlParse.md
1007
1017
  ---
@@ -1115,7 +1125,7 @@ index/interfaces/IVhost.md
1115
1125
 
1116
1126
  # Interface: IVhost
1117
1127
 
1118
- Defined in: [index.ts:222](https://github.com/maiyunnet/kebab/blob/master/index.ts#L222)
1128
+ Defined in: [index.ts:224](https://github.com/maiyunnet/kebab/blob/master/index.ts#L224)
1119
1129
 
1120
1130
  虚拟机配置对象
1121
1131
 
@@ -1125,7 +1135,7 @@ Defined in: [index.ts:222](https://github.com/maiyunnet/kebab/blob/master/index.
1125
1135
 
1126
1136
  > `readonly` **domains**: `string`[]
1127
1137
 
1128
- Defined in: [index.ts:224](https://github.com/maiyunnet/kebab/blob/master/index.ts#L224)
1138
+ Defined in: [index.ts:226](https://github.com/maiyunnet/kebab/blob/master/index.ts#L226)
1129
1139
 
1130
1140
  ***
1131
1141
 
@@ -1133,7 +1143,7 @@ Defined in: [index.ts:224](https://github.com/maiyunnet/kebab/blob/master/index.
1133
1143
 
1134
1144
  > `readonly` `optional` **name?**: `string`
1135
1145
 
1136
- Defined in: [index.ts:223](https://github.com/maiyunnet/kebab/blob/master/index.ts#L223)
1146
+ Defined in: [index.ts:225](https://github.com/maiyunnet/kebab/blob/master/index.ts#L225)
1137
1147
 
1138
1148
  ***
1139
1149
 
@@ -1141,7 +1151,7 @@ Defined in: [index.ts:223](https://github.com/maiyunnet/kebab/blob/master/index.
1141
1151
 
1142
1152
  > `readonly` `optional` **remark?**: `string`
1143
1153
 
1144
- Defined in: [index.ts:226](https://github.com/maiyunnet/kebab/blob/master/index.ts#L226)
1154
+ Defined in: [index.ts:228](https://github.com/maiyunnet/kebab/blob/master/index.ts#L228)
1145
1155
 
1146
1156
  ***
1147
1157
 
@@ -1149,7 +1159,7 @@ Defined in: [index.ts:226](https://github.com/maiyunnet/kebab/blob/master/index.
1149
1159
 
1150
1160
  > `readonly` **root**: `string`
1151
1161
 
1152
- Defined in: [index.ts:225](https://github.com/maiyunnet/kebab/blob/master/index.ts#L225)
1162
+ Defined in: [index.ts:227](https://github.com/maiyunnet/kebab/blob/master/index.ts#L227)
1153
1163
 
1154
1164
  index.md
1155
1165
  ---
@@ -1428,7 +1438,7 @@ index/variables/VER.md
1428
1438
 
1429
1439
  # Variable: VER
1430
1440
 
1431
- > `const` **VER**: `"9.18.0"` = `'9.18.0'`
1441
+ > `const` **VER**: `"9.18.1"` = `'9.18.1'`
1432
1442
 
1433
1443
  Defined in: [index.ts:10](https://github.com/maiyunnet/kebab/blob/master/index.ts#L10)
1434
1444
 
@@ -137044,7 +137054,7 @@ sys/route/functions/getFormData.md
137044
137054
 
137045
137055
  > **getFormData**(`req`, `events?`, `limits?`): `Promise`\<`false` \| \{ `files`: `Record`\<`string`, [`IPostFile`](../../../index/interfaces/IPostFile.md) \| [`IPostFile`](../../../index/interfaces/IPostFile.md)[]\>; `post`: `Record`\<`string`, [`Json`](../../../index/type-aliases/Json.md)\>; \}\>
137046
137056
 
137047
- Defined in: [sys/route.ts:993](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L993)
137057
+ Defined in: [sys/route.ts:994](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L994)
137048
137058
 
137049
137059
  获取 formdata 的 post
137050
137060
 
@@ -137141,7 +137151,7 @@ sys/route/functions/getPost.md
137141
137151
 
137142
137152
  > **getPost**(`req`): `Promise`\<\{ `input`: `string`; `post`: `Record`\<`string`, `any`\>; `raw`: `Record`\<`string`, `any`\>; \}\>
137143
137153
 
137144
- Defined in: [sys/route.ts:907](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L907)
137154
+ Defined in: [sys/route.ts:908](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L908)
137145
137155
 
137146
137156
  获取 post 对象(通常已自动获取),如果是文件上传(formdata)的情况则不获取
137147
137157
 
@@ -137257,7 +137267,7 @@ sys/route/functions/unlinkUploadFiles.md
137257
137267
 
137258
137268
  > **unlinkUploadFiles**(`cctr`): `Promise`\<`void`\>
137259
137269
 
137260
- Defined in: [sys/route.ts:866](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L866)
137270
+ Defined in: [sys/route.ts:867](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L867)
137261
137271
 
137262
137272
  删除本次请求所有已上传的临时文件
137263
137273
 
@@ -137286,7 +137296,7 @@ sys/route/functions/waitCtr.md
137286
137296
 
137287
137297
  > **waitCtr**(`cctr`): `Promise`\<`void`\>
137288
137298
 
137289
- Defined in: [sys/route.ts:886](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L886)
137299
+ Defined in: [sys/route.ts:887](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L887)
137290
137300
 
137291
137301
  等待异步任务结束,并删除临时文件,如果结束后还有事务没关闭,则会在本函数中打印控制台并且写入 log 文件
137292
137302
  此时其实已经给客户端返回了,此处等待不消耗客户端的等待时间
package/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * --- 本文件用来定义每个目录实体地址的常量 ---
6
6
  */
7
7
  /** --- 当前系统版本号 --- */
8
- export declare const VER = "9.18.0";
8
+ export declare const VER = "9.18.1";
9
9
  /** --- 框架根目录,以 / 结尾 --- */
10
10
  export declare const ROOT_PATH: string;
11
11
  /** --- 框架的 LIB,以 / 结尾 --- */
@@ -159,6 +159,8 @@ export interface IConfigConst {
159
159
  'host': string;
160
160
  'hostname': string;
161
161
  'hostport': number;
162
+ /** --- 协议与 host,如 https://example.com:8443 --- */
163
+ 'urlOrigin': string;
162
164
  'uri': IUrlParse;
163
165
  'rootPath': string;
164
166
  'modPath': string;
package/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * --- 本文件用来定义每个目录实体地址的常量 ---
7
7
  */
8
8
  /** --- 当前系统版本号 --- */
9
- export const VER = '9.18.0';
9
+ export const VER = '9.18.1';
10
10
  // --- 服务端用的路径 ---
11
11
  const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
12
12
  /** --- /xxx/xxx --- */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maiyunnet/kebab",
3
- "version": "9.18.0",
3
+ "version": "9.18.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": [
package/sys/route.js CHANGED
@@ -145,6 +145,7 @@ export async function run(data) {
145
145
  'host': data.uri.host ?? '',
146
146
  'hostname': data.uri.hostname ?? '',
147
147
  'hostport': data.uri.port ? parseInt(data.uri.port) : (data.uri.protocol === 'https:' ? 443 : 80),
148
+ 'urlOrigin': (data.uri.protocol ?? '') + '//' + (data.uri.host ?? ''),
148
149
  'uri': data.uri,
149
150
  // --- 服务端用的路径 ---
150
151
  'rootPath': data.rootPath,