@lsby/net-core 0.11.2 → 0.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/dist/bin/gen-api-list/bin.cjs +14 -2
  2. package/dist/bin/gen-api-list/index.cjs +14 -2
  3. package/dist/bin/gen-api-type/bin.cjs +60 -43
  4. package/dist/bin/gen-api-type/index.cjs +60 -43
  5. package/dist/bin/gen-test/bin.cjs +16 -4
  6. package/dist/bin/gen-test/index.cjs +16 -4
  7. package/dist/cjs/bin/gen-api-list/bin.cjs +14 -2
  8. package/dist/cjs/bin/gen-api-list/index.cjs +14 -2
  9. package/dist/cjs/bin/gen-api-type/bin.cjs +60 -43
  10. package/dist/cjs/bin/gen-api-type/index.cjs +60 -43
  11. package/dist/cjs/bin/gen-test/bin.cjs +16 -4
  12. package/dist/cjs/bin/gen-test/index.cjs +16 -4
  13. package/dist/cjs/global/log.cjs +31 -0
  14. package/dist/cjs/global/log.d.cts +5 -0
  15. package/dist/cjs/global/model/hub.cjs +84 -0
  16. package/dist/cjs/global/model/hub.d.cts +26 -0
  17. package/dist/cjs/global/model/web-socket.cjs +166 -0
  18. package/dist/cjs/global/model/web-socket.d.cts +21 -0
  19. package/dist/cjs/global/web-socket.cjs +169 -0
  20. package/dist/cjs/global/web-socket.d.cts +7 -0
  21. package/dist/cjs/help/help.cjs +151 -2
  22. package/dist/cjs/help/help.d.cts +12 -5
  23. package/dist/cjs/help/interior.cjs +12 -1
  24. package/dist/cjs/help/interior.d.cts +6 -3
  25. package/dist/cjs/index.cjs +672 -454
  26. package/dist/cjs/index.d.cts +27 -18
  27. package/dist/cjs/interface/interface-base.cjs +15 -17
  28. package/dist/cjs/interface/interface-base.d.cts +43 -5
  29. package/dist/cjs/interface/interface-logic.cjs +148 -12
  30. package/dist/cjs/interface/interface-logic.d.cts +131 -7
  31. package/dist/cjs/interface/interface-plugin.cjs +45 -0
  32. package/dist/cjs/interface/interface-plugin.d.cts +37 -0
  33. package/dist/cjs/{plugin/plug.cjs → interface/interface-returner.cjs} +7 -17
  34. package/dist/cjs/interface/interface-returner.d.cts +32 -0
  35. package/dist/cjs/interface/interface-test.cjs +41 -9
  36. package/dist/cjs/interface/interface-test.d.cts +29 -6
  37. package/dist/cjs/plugin/{extend/custom-data.cjs → custom-data.cjs} +18 -11
  38. package/dist/cjs/plugin/custom-data.d.cts +16 -0
  39. package/dist/cjs/plugin/custom.cjs +54 -0
  40. package/dist/cjs/plugin/custom.d.cts +18 -0
  41. package/dist/cjs/plugin/form.cjs +109 -0
  42. package/dist/cjs/plugin/form.d.cts +37 -0
  43. package/dist/cjs/plugin/{extend/json.cjs → json.cjs} +24 -20
  44. package/dist/cjs/plugin/json.d.cts +36 -0
  45. package/dist/cjs/plugin/{extend/log-headers.cjs → log-headers.cjs} +18 -12
  46. package/dist/cjs/plugin/log-headers.d.cts +17 -0
  47. package/dist/cjs/plugin/parse-path.cjs +100 -0
  48. package/dist/cjs/plugin/parse-path.d.cts +73 -0
  49. package/dist/cjs/plugin/{extend/query.cjs → query.cjs} +24 -20
  50. package/dist/cjs/plugin/query.d.cts +36 -0
  51. package/dist/cjs/plugin/urlencoded.cjs +103 -0
  52. package/dist/cjs/plugin/urlencoded.d.cts +36 -0
  53. package/dist/cjs/plugin/web-socket.cjs +183 -0
  54. package/dist/cjs/plugin/web-socket.d.cts +31 -0
  55. package/dist/cjs/returner/common.cjs +107 -0
  56. package/dist/cjs/returner/common.d.cts +36 -0
  57. package/dist/cjs/returner/custom.cjs +55 -0
  58. package/dist/cjs/returner/custom.d.cts +26 -0
  59. package/dist/cjs/returner/file-stream-download.cjs +111 -0
  60. package/dist/cjs/returner/file-stream-download.d.cts +33 -0
  61. package/dist/cjs/returner/static-file.cjs +95 -0
  62. package/dist/cjs/returner/static-file.d.cts +30 -0
  63. package/dist/cjs/returner/virtual-file.cjs +66 -0
  64. package/dist/cjs/returner/virtual-file.d.cts +30 -0
  65. package/dist/cjs/server/server.cjs +187 -139
  66. package/dist/cjs/server/server.d.cts +37 -4
  67. package/dist/cjs/symbol/export-type.cjs +1 -1
  68. package/dist/cjs/types/types.cjs +18 -0
  69. package/dist/cjs/types/types.d.cts +22 -0
  70. package/dist/esm/bin/gen-api-list/bin.js +2 -1
  71. package/dist/esm/bin/gen-api-list/index.js +2 -1
  72. package/dist/esm/bin/gen-api-type/bin.js +1 -1
  73. package/dist/esm/bin/gen-api-type/index.js +1 -1
  74. package/dist/esm/bin/gen-test/bin.js +2 -1
  75. package/dist/esm/bin/gen-test/index.js +2 -1
  76. package/dist/esm/{chunk-ZIVQ3WZA.js → chunk-2CGBESLT.js} +12 -2
  77. package/dist/esm/{chunk-B5DKJ5AV.js → chunk-6OPO4OWK.js} +60 -43
  78. package/dist/esm/{chunk-C5FED6EO.js → chunk-7GT72IUT.js} +34 -16
  79. package/dist/esm/chunk-7OU27OBO.js +14 -0
  80. package/dist/esm/chunk-7S6SPW32.js +35 -0
  81. package/dist/esm/{chunk-NRUNCIP7.js → chunk-AB35ZHL3.js} +48 -59
  82. package/dist/esm/chunk-AG36MLAF.js +65 -0
  83. package/dist/esm/chunk-EGIJQJFI.js +21 -0
  84. package/dist/esm/chunk-F5IAX56T.js +7 -0
  85. package/dist/esm/chunk-FP6Q65NN.js +7 -0
  86. package/dist/esm/chunk-GGNRLQAM.js +48 -0
  87. package/dist/esm/chunk-HINGVOU6.js +21 -0
  88. package/dist/esm/{chunk-ZF7EC2OM.js → chunk-HT7VG4BT.js} +1 -1
  89. package/dist/esm/{chunk-AFWSZAXR.js → chunk-HWIV3BTW.js} +7 -4
  90. package/dist/esm/chunk-J5BX4WJJ.js +69 -0
  91. package/dist/esm/chunk-JLNRCPJD.js +34 -0
  92. package/dist/esm/chunk-JSMTJQ3K.js +69 -0
  93. package/dist/esm/chunk-MRTIZDKN.js +88 -0
  94. package/dist/esm/{chunk-7LQRWJ3X.js → chunk-MVMDWJTB.js} +14 -1
  95. package/dist/esm/chunk-NTDDPUP7.js +59 -0
  96. package/dist/esm/chunk-OEABQXPT.js +29 -0
  97. package/dist/esm/chunk-P23ZAK4I.js +10 -0
  98. package/dist/esm/chunk-PAP3X3RJ.js +37 -0
  99. package/dist/esm/chunk-QQFE27NG.js +37 -0
  100. package/dist/esm/chunk-RVEKW2PT.js +31 -0
  101. package/dist/esm/chunk-RWSXMQQI.js +22 -0
  102. package/dist/esm/{chunk-E23EZWBE.js → chunk-TE6CG2FF.js} +9 -13
  103. package/dist/esm/{chunk-UKAZDGUR.js → chunk-W7HT4TA6.js} +5 -2
  104. package/dist/esm/chunk-WXTNTK3M.js +40 -0
  105. package/dist/esm/global/log.d.ts +5 -0
  106. package/dist/esm/global/log.js +6 -0
  107. package/dist/esm/global/model/hub.d.ts +26 -0
  108. package/dist/esm/global/model/hub.js +8 -0
  109. package/dist/esm/global/model/web-socket.d.ts +21 -0
  110. package/dist/esm/global/model/web-socket.js +8 -0
  111. package/dist/esm/global/web-socket.d.ts +7 -0
  112. package/dist/esm/global/web-socket.js +9 -0
  113. package/dist/esm/help/help.d.ts +12 -5
  114. package/dist/esm/help/help.js +9 -3
  115. package/dist/esm/help/interior.d.ts +6 -3
  116. package/dist/esm/help/interior.js +3 -1
  117. package/dist/esm/index.d.ts +27 -18
  118. package/dist/esm/index.js +63 -59
  119. package/dist/esm/interface/interface-base.d.ts +43 -5
  120. package/dist/esm/interface/interface-base.js +1 -1
  121. package/dist/esm/interface/interface-logic.d.ts +131 -7
  122. package/dist/esm/interface/interface-logic.js +6 -2
  123. package/dist/esm/interface/interface-plugin.d.ts +37 -0
  124. package/dist/esm/{plugin/plug.js → interface/interface-plugin.js} +1 -1
  125. package/dist/esm/interface/interface-returner.d.ts +32 -0
  126. package/dist/esm/interface/interface-returner.js +6 -0
  127. package/dist/esm/interface/interface-test.d.ts +29 -6
  128. package/dist/esm/interface/interface-test.js +5 -3
  129. package/dist/esm/plugin/custom-data.d.ts +16 -0
  130. package/dist/esm/plugin/{extend/custom-data.js → custom-data.js} +2 -2
  131. package/dist/esm/plugin/custom.d.ts +18 -0
  132. package/dist/esm/plugin/custom.js +7 -0
  133. package/dist/esm/plugin/form.d.ts +37 -0
  134. package/dist/esm/plugin/form.js +42 -0
  135. package/dist/esm/plugin/json.d.ts +36 -0
  136. package/dist/esm/plugin/json.js +8 -0
  137. package/dist/esm/plugin/log-headers.d.ts +17 -0
  138. package/dist/esm/plugin/{extend/log-headers.js → log-headers.js} +2 -2
  139. package/dist/esm/plugin/parse-path.d.ts +73 -0
  140. package/dist/esm/plugin/parse-path.js +8 -0
  141. package/dist/esm/plugin/query.d.ts +36 -0
  142. package/dist/esm/plugin/query.js +8 -0
  143. package/dist/esm/plugin/urlencoded.d.ts +36 -0
  144. package/dist/esm/plugin/urlencoded.js +8 -0
  145. package/dist/esm/plugin/web-socket.d.ts +31 -0
  146. package/dist/esm/plugin/web-socket.js +8 -0
  147. package/dist/esm/returner/common.d.ts +36 -0
  148. package/dist/esm/returner/common.js +8 -0
  149. package/dist/esm/returner/custom.d.ts +26 -0
  150. package/dist/esm/returner/custom.js +7 -0
  151. package/dist/esm/returner/file-stream-download.d.ts +33 -0
  152. package/dist/esm/returner/file-stream-download.js +8 -0
  153. package/dist/esm/returner/static-file.d.ts +30 -0
  154. package/dist/esm/returner/static-file.js +7 -0
  155. package/dist/esm/returner/virtual-file.d.ts +30 -0
  156. package/dist/esm/returner/virtual-file.js +7 -0
  157. package/dist/esm/server/server.d.ts +37 -4
  158. package/dist/esm/server/server.js +5 -3
  159. package/dist/esm/symbol/export-type.js +1 -1
  160. package/dist/esm/types/types.d.ts +22 -0
  161. package/dist/esm/types/types.js +1 -0
  162. package/package.json +35 -40
  163. package/dist/bin/gen-api-list/test.cjs +0 -1
  164. package/dist/bin/gen-api-list/test.d.cts +0 -2
  165. package/dist/bin/gen-api-type/test.cjs +0 -1
  166. package/dist/bin/gen-api-type/test.d.cts +0 -2
  167. package/dist/cjs/action/action.bak.cjs +0 -158
  168. package/dist/cjs/action/action.bak.d.cts +0 -99
  169. package/dist/cjs/bin/gen-api-list/test.cjs +0 -1
  170. package/dist/cjs/bin/gen-api-list/test.d.cts +0 -2
  171. package/dist/cjs/bin/gen-api-type/test.cjs +0 -1
  172. package/dist/cjs/bin/gen-api-type/test.d.cts +0 -2
  173. package/dist/cjs/global/global.cjs +0 -91
  174. package/dist/cjs/global/global.d.cts +0 -21
  175. package/dist/cjs/interface/interface-result.cjs +0 -65
  176. package/dist/cjs/interface/interface-result.d.cts +0 -8
  177. package/dist/cjs/interface/interface-retuen.cjs +0 -49
  178. package/dist/cjs/interface/interface-retuen.d.cts +0 -30
  179. package/dist/cjs/interface-base-gRngpxki.d.cts +0 -235
  180. package/dist/cjs/plugin/extend/custom-data.d.cts +0 -17
  181. package/dist/cjs/plugin/extend/json.d.cts +0 -25
  182. package/dist/cjs/plugin/extend/log-headers.d.cts +0 -15
  183. package/dist/cjs/plugin/extend/query.d.cts +0 -25
  184. package/dist/cjs/plugin/extend/urlencoded.cjs +0 -76
  185. package/dist/cjs/plugin/extend/urlencoded.d.cts +0 -16
  186. package/dist/cjs/plugin/extend/web-socket.cjs +0 -168
  187. package/dist/cjs/plugin/extend/web-socket.d.cts +0 -27
  188. package/dist/cjs/plugin/plug.d.cts +0 -8
  189. package/dist/cjs/wrapper/common-wrapper-return.cjs +0 -106
  190. package/dist/cjs/wrapper/common-wrapper-return.d.cts +0 -29
  191. package/dist/cjs/wrapper/common-wrapper.cjs +0 -102
  192. package/dist/cjs/wrapper/common-wrapper.d.cts +0 -27
  193. package/dist/cjs/wrapper/deferred-result-wrapper.cjs +0 -102
  194. package/dist/cjs/wrapper/deferred-result-wrapper.d.cts +0 -26
  195. package/dist/cjs/wrapper/express-compatible-wrapper.cjs +0 -228
  196. package/dist/cjs/wrapper/express-compatible-wrapper.d.cts +0 -55
  197. package/dist/cjs/wrapper/file-download-wrapper.cjs +0 -134
  198. package/dist/cjs/wrapper/file-download-wrapper.d.cts +0 -80
  199. package/dist/esm/action/action.bak.d.ts +0 -99
  200. package/dist/esm/action/action.bak.js +0 -133
  201. package/dist/esm/bin/gen-api-list/test.d.ts +0 -2
  202. package/dist/esm/bin/gen-api-type/test.d.ts +0 -2
  203. package/dist/esm/bin/gen-api-type/test.js +0 -0
  204. package/dist/esm/chunk-3XRAG6DM.js +0 -30
  205. package/dist/esm/chunk-43GZE5YL.js +0 -17
  206. package/dist/esm/chunk-7MHKNSNT.js +0 -20
  207. package/dist/esm/chunk-DNJQGD5M.js +0 -39
  208. package/dist/esm/chunk-H7LZCHCE.js +0 -24
  209. package/dist/esm/chunk-HDPEZW7H.js +0 -24
  210. package/dist/esm/chunk-MDUWXEQ7.js +0 -37
  211. package/dist/esm/chunk-N7TPWCQ5.js +0 -17
  212. package/dist/esm/chunk-NB2QNDI2.js +0 -24
  213. package/dist/esm/chunk-NCYHKHIH.js +0 -54
  214. package/dist/esm/chunk-NJKBRPN7.js +0 -66
  215. package/dist/esm/chunk-TSDOOGHG.js +0 -37
  216. package/dist/esm/chunk-UUXGAK5S.js +0 -31
  217. package/dist/esm/chunk-VMCAX3QH.js +0 -18
  218. package/dist/esm/chunk-XBAKTT6S.js +0 -23
  219. package/dist/esm/chunk-XSYZ5A6R.js +0 -61
  220. package/dist/esm/global/global.d.ts +0 -21
  221. package/dist/esm/global/global.js +0 -8
  222. package/dist/esm/interface/interface-result.d.ts +0 -8
  223. package/dist/esm/interface/interface-result.js +0 -10
  224. package/dist/esm/interface/interface-retuen.d.ts +0 -30
  225. package/dist/esm/interface/interface-retuen.js +0 -10
  226. package/dist/esm/interface-base-DDfmN_Dg.d.ts +0 -235
  227. package/dist/esm/plugin/extend/custom-data.d.ts +0 -17
  228. package/dist/esm/plugin/extend/json.d.ts +0 -25
  229. package/dist/esm/plugin/extend/json.js +0 -8
  230. package/dist/esm/plugin/extend/log-headers.d.ts +0 -15
  231. package/dist/esm/plugin/extend/query.d.ts +0 -25
  232. package/dist/esm/plugin/extend/query.js +0 -8
  233. package/dist/esm/plugin/extend/urlencoded.d.ts +0 -16
  234. package/dist/esm/plugin/extend/urlencoded.js +0 -7
  235. package/dist/esm/plugin/extend/web-socket.d.ts +0 -27
  236. package/dist/esm/plugin/extend/web-socket.js +0 -8
  237. package/dist/esm/plugin/plug.d.ts +0 -8
  238. package/dist/esm/wrapper/common-wrapper-return.d.ts +0 -29
  239. package/dist/esm/wrapper/common-wrapper-return.js +0 -9
  240. package/dist/esm/wrapper/common-wrapper.d.ts +0 -27
  241. package/dist/esm/wrapper/common-wrapper.js +0 -9
  242. package/dist/esm/wrapper/deferred-result-wrapper.d.ts +0 -26
  243. package/dist/esm/wrapper/deferred-result-wrapper.js +0 -9
  244. package/dist/esm/wrapper/express-compatible-wrapper.d.ts +0 -55
  245. package/dist/esm/wrapper/express-compatible-wrapper.js +0 -11
  246. package/dist/esm/wrapper/file-download-wrapper.d.ts +0 -80
  247. package/dist/esm/wrapper/file-download-wrapper.js +0 -9
  248. /package/dist/esm/{bin/gen-api-list/test.js → chunk-BWFSM5FK.js} +0 -0
@@ -0,0 +1,36 @@
1
+ import express from 'express';
2
+ import { z } from 'zod';
3
+ import { 严格递归合并对象 as ________ } from '../help/help.js';
4
+ import { 获得接口逻辑插件类型 as __________ } from '../interface/interface-logic.js';
5
+ import { 插件 as __, 任意插件 as ____, 取插件正确ts类型 as _____ts__ } from '../interface/interface-plugin.js';
6
+ import '../types/types.js';
7
+ import '@lsby/ts-log';
8
+ import '../global/model/web-socket.js';
9
+ import 'ws';
10
+ import '../global/model/hub.js';
11
+ import '@lsby/ts-fp-data';
12
+ import '../help/interior.js';
13
+
14
+ declare let 错误类型描述: z.ZodObject<{
15
+ code: z.ZodLiteral<400>;
16
+ data: z.ZodString;
17
+ }, "strip", z.ZodTypeAny, {
18
+ code: 400;
19
+ data: string;
20
+ }, {
21
+ code: 400;
22
+ data: string;
23
+ }>;
24
+ declare class UrlEncoded参数解析插件<Result extends z.AnyZodObject> extends __<typeof 错误类型描述, z.ZodObject<{
25
+ urlencoded: Result;
26
+ }>> {
27
+ constructor(t: Result, opt: Parameters<typeof express.urlencoded>[0]);
28
+ }
29
+ type 任意UrlEncoded参数解析插件 = UrlEncoded参数解析插件<any>;
30
+ type 任意UrlEncoded参数解析插件项 = 任意UrlEncoded参数解析插件;
31
+ type 合并UrlEncoded参数解析插件结果<Arr extends Array<____>> = Arr extends [] ? {} : Arr extends [infer x, ...infer xs] ? x extends infer 插件项 ? xs extends Array<____> ? 插件项 extends 任意UrlEncoded参数解析插件项 ? ________<{
32
+ urlencoded: _____ts__<插件项>['urlencoded'];
33
+ }, 合并UrlEncoded参数解析插件结果<xs>> : 合并UrlEncoded参数解析插件结果<xs> : {} : {} : {};
34
+ type 计算接口逻辑UrlEncoded参数<接口逻辑> = 合并UrlEncoded参数解析插件结果<__________<接口逻辑>>;
35
+
36
+ export { UrlEncoded参数解析插件, type 任意UrlEncoded参数解析插件, type 任意UrlEncoded参数解析插件项, type 合并UrlEncoded参数解析插件结果, type 计算接口逻辑UrlEncoded参数 };
@@ -0,0 +1,8 @@
1
+ import {
2
+ UrlEncoded参数解析插件
3
+ } from "../chunk-QQFE27NG.js";
4
+ import "../chunk-2CGBESLT.js";
5
+ import "../chunk-EGIJQJFI.js";
6
+ export {
7
+ UrlEncoded\u53C2\u6570\u89E3\u6790\u63D2\u4EF6
8
+ };
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ import { 集线器监听器持有者 as _________ } from '../global/model/hub.js';
3
+ import { 插件 as __, 任意插件 as ____ } from '../interface/interface-plugin.js';
4
+ import '@lsby/ts-fp-data';
5
+ import 'express';
6
+ import '../types/types.js';
7
+ import '@lsby/ts-log';
8
+ import '../global/model/web-socket.js';
9
+ import 'ws';
10
+
11
+ declare let 错误类型描述: z.ZodNever;
12
+ declare class WebSocket插件<后推前信息 extends z.AnyZodObject | z.ZodNever | z.ZodUnion<any>, 前推后信息 extends z.AnyZodObject | z.ZodNever | z.ZodUnion<any>> extends __<typeof 错误类型描述, z.ZodObject<{
13
+ ws操作: z.ZodUnion<[
14
+ z.ZodObject<{
15
+ 发送ws信息: z.ZodFunction<z.ZodTuple<[后推前信息], null>, z.ZodPromise<z.ZodVoid>>;
16
+ 监听ws信息: z.ZodFunction<z.ZodTuple<[z.ZodFunction<z.ZodTuple<[前推后信息], null>, z.ZodPromise<z.ZodVoid>>], null>, z.ZodPromise<z.ZodUnion<[z.ZodType<_________<unknown>>, z.ZodNull]>>>;
17
+ 关闭ws连接: z.ZodFunction<z.ZodTuple<[], null>, z.ZodPromise<z.ZodVoid>>;
18
+ 设置清理函数: z.ZodFunction<z.ZodTuple<[z.ZodFunction<z.ZodTuple<[], null>, z.ZodPromise<z.ZodVoid>>], null>, z.ZodPromise<z.ZodVoid>>;
19
+ }>,
20
+ z.ZodNull
21
+ ]>;
22
+ }>> {
23
+ constructor(后推前信息描述: 后推前信息, 前推后信息描述: 前推后信息, wsKey?: string);
24
+ }
25
+ type 任意WS插件 = WebSocket插件<any, any>;
26
+ type 任意WS插件项 = 任意WS插件;
27
+ type 取WS插件泛型<A> = A extends WebSocket插件<infer x, infer y> ? [x, y] : never;
28
+ type 取第一个WS插件输出<Arr extends Array<____>> = Arr extends [] ? {} : Arr extends [infer x, ...infer xs] ? x extends infer 插件项 ? xs extends Array<____> ? 插件项 extends 任意WS插件项 ? z.infer<取WS插件泛型<插件项>[0]> : 取第一个WS插件输出<xs> : {} : {} : {};
29
+ type 取第一个WS插件输入<Arr extends Array<____>> = Arr extends [] ? {} : Arr extends [infer x, ...infer xs] ? x extends infer 插件项 ? xs extends Array<____> ? 插件项 extends 任意WS插件项 ? z.infer<取WS插件泛型<插件项>[1]> : 取第一个WS插件输入<xs> : {} : {} : {};
30
+
31
+ export { WebSocket插件, type 任意WS插件, type 任意WS插件项, type 取WS插件泛型, type 取第一个WS插件输入, type 取第一个WS插件输出 };
@@ -0,0 +1,8 @@
1
+ import {
2
+ WebSocket插件
3
+ } from "../chunk-7GT72IUT.js";
4
+ import "../chunk-NTDDPUP7.js";
5
+ import "../chunk-EGIJQJFI.js";
6
+ export {
7
+ WebSocket\u63D2\u4EF6
8
+ };
@@ -0,0 +1,36 @@
1
+ import { Either } from '@lsby/ts-fp-data';
2
+ import { Request, Response } from 'express';
3
+ import { z } from 'zod';
4
+ import { 接口返回器 as _____ } from '../interface/interface-returner.js';
5
+ import { 请求附加参数类型 as ________ } from '../types/types.js';
6
+ import '../interface/interface-logic.js';
7
+ import '../help/interior.js';
8
+ import '../interface/interface-plugin.js';
9
+ import '@lsby/ts-log';
10
+ import '../global/model/web-socket.js';
11
+ import 'ws';
12
+ import '../global/model/hub.js';
13
+
14
+ declare class 常用接口返回器<实现错误类型Zod extends z.ZodTypeAny, 实现正确类型Zod extends z.ZodTypeAny> extends _____<z.infer<实现错误类型Zod>, z.infer<实现正确类型Zod>, z.ZodObject<{
15
+ status: z.ZodLiteral<'fail'>;
16
+ data: 实现错误类型Zod;
17
+ }>, z.ZodObject<{
18
+ status: z.ZodLiteral<'success'>;
19
+ data: 实现正确类型Zod;
20
+ }>> {
21
+ private 实现错误类型Zod;
22
+ private 实现正确类型Zod;
23
+ private 自定义返回头?;
24
+ constructor(实现错误类型Zod: 实现错误类型Zod, 实现正确类型Zod: 实现正确类型Zod, 自定义返回头?: Record<string, string> | undefined);
25
+ 获得接口错误形式Zod(): z.ZodObject<{
26
+ status: z.ZodLiteral<'fail'>;
27
+ data: 实现错误类型Zod;
28
+ }>;
29
+ 获得接口正确形式Zod(): z.ZodObject<{
30
+ status: z.ZodLiteral<'success'>;
31
+ data: 实现正确类型Zod;
32
+ }>;
33
+ 实现(req: Request, res: Response, 数据: Either<z.infer<实现错误类型Zod>, z.infer<实现正确类型Zod>>, 请求附加参数: ________): void;
34
+ }
35
+
36
+ export { 常用接口返回器 };
@@ -0,0 +1,8 @@
1
+ import {
2
+ 常用接口返回器
3
+ } from "../chunk-AG36MLAF.js";
4
+ import "../chunk-FP6Q65NN.js";
5
+ import "../chunk-2CGBESLT.js";
6
+ export {
7
+ \u5E38\u7528\u63A5\u53E3\u8FD4\u56DE\u5668
8
+ };
@@ -0,0 +1,26 @@
1
+ import { Either } from '@lsby/ts-fp-data';
2
+ import { Request, Response } from 'express';
3
+ import { z } from 'zod';
4
+ import { 接口返回器 as _____ } from '../interface/interface-returner.js';
5
+ import { 请求附加参数类型 as ________ } from '../types/types.js';
6
+ import '../interface/interface-logic.js';
7
+ import '../help/interior.js';
8
+ import '../interface/interface-plugin.js';
9
+ import '@lsby/ts-log';
10
+ import '../global/model/web-socket.js';
11
+ import 'ws';
12
+ import '../global/model/hub.js';
13
+
14
+ declare class 自定义接口返回器<实现错误类型Zod extends z.ZodTypeAny, 实现正确类型Zod extends z.ZodTypeAny, 接口错误类型Zod extends z.ZodTypeAny, 接口正确类型Zod extends z.ZodTypeAny> extends _____<z.infer<实现错误类型Zod>, z.infer<实现正确类型Zod>, 接口错误类型Zod, 接口正确类型Zod> {
15
+ private 实现错误类型Zod;
16
+ private 实现正确类型Zod;
17
+ private 接口错误类型Zod;
18
+ private 接口正确类型Zod;
19
+ private 实现函数;
20
+ constructor(实现错误类型Zod: 实现错误类型Zod, 实现正确类型Zod: 实现正确类型Zod, 接口错误类型Zod: 接口错误类型Zod, 接口正确类型Zod: 接口正确类型Zod, 实现函数: (req: Request, res: Response, 数据: Either<z.infer<实现错误类型Zod>, z.infer<实现正确类型Zod>>, 请求附加参数: ________) => void);
21
+ 获得接口错误形式Zod(): 接口错误类型Zod;
22
+ 获得接口正确形式Zod(): 接口正确类型Zod;
23
+ 实现(req: Request, res: Response, 数据: Either<z.infer<实现错误类型Zod>, z.infer<实现正确类型Zod>>, 请求附加参数: ________): void;
24
+ }
25
+
26
+ export { 自定义接口返回器 };
@@ -0,0 +1,7 @@
1
+ import {
2
+ 自定义接口返回器
3
+ } from "../chunk-OEABQXPT.js";
4
+ import "../chunk-FP6Q65NN.js";
5
+ export {
6
+ \u81EA\u5B9A\u4E49\u63A5\u53E3\u8FD4\u56DE\u5668
7
+ };
@@ -0,0 +1,33 @@
1
+ import { Either } from '@lsby/ts-fp-data';
2
+ import { Request, Response } from 'express';
3
+ import { Readable } from 'node:stream';
4
+ import { z } from 'zod';
5
+ import { 接口返回器 as _____ } from '../interface/interface-returner.js';
6
+ import { 请求附加参数类型 as ________ } from '../types/types.js';
7
+ import '../interface/interface-logic.js';
8
+ import '../help/interior.js';
9
+ import '../interface/interface-plugin.js';
10
+ import '@lsby/ts-log';
11
+ import '../global/model/web-socket.js';
12
+ import 'ws';
13
+ import '../global/model/hub.js';
14
+
15
+ declare class 文件流式下载返回器<实现错误类型Zod extends z.ZodTypeAny, 实现正确类型Zod extends z.ZodObject<{
16
+ data: z.ZodType<Readable>;
17
+ filename: z.ZodOptional<z.ZodString>;
18
+ mimeType: z.ZodOptional<z.ZodString>;
19
+ }>> extends _____<z.infer<实现错误类型Zod>, z.infer<实现正确类型Zod>, z.ZodObject<{
20
+ status: z.ZodLiteral<'fail'>;
21
+ data: 实现错误类型Zod;
22
+ }>, z.ZodAny> {
23
+ private 实现错误类型Zod;
24
+ constructor(实现错误类型Zod: 实现错误类型Zod);
25
+ 获得接口错误形式Zod(): z.ZodObject<{
26
+ status: z.ZodLiteral<'fail'>;
27
+ data: 实现错误类型Zod;
28
+ }>;
29
+ 获得接口正确形式Zod(): z.ZodAny;
30
+ 实现(req: Request, res: Response, 数据: Either<z.infer<实现错误类型Zod>, z.infer<实现正确类型Zod>>, 请求附加参数: ________): void;
31
+ }
32
+
33
+ export { 文件流式下载返回器 };
@@ -0,0 +1,8 @@
1
+ import {
2
+ 文件流式下载返回器
3
+ } from "../chunk-JSMTJQ3K.js";
4
+ import "../chunk-FP6Q65NN.js";
5
+ import "../chunk-2CGBESLT.js";
6
+ export {
7
+ \u6587\u4EF6\u6D41\u5F0F\u4E0B\u8F7D\u8FD4\u56DE\u5668
8
+ };
@@ -0,0 +1,30 @@
1
+ import { Either } from '@lsby/ts-fp-data';
2
+ import { Request, Response } from 'express';
3
+ import { z } from 'zod';
4
+ import { 接口返回器 as _____ } from '../interface/interface-returner.js';
5
+ import { 请求附加参数类型 as ________ } from '../types/types.js';
6
+ import '../interface/interface-logic.js';
7
+ import '../help/interior.js';
8
+ import '../interface/interface-plugin.js';
9
+ import '@lsby/ts-log';
10
+ import '../global/model/web-socket.js';
11
+ import 'ws';
12
+ import '../global/model/hub.js';
13
+
14
+ declare class 静态文件返回器 extends _____<string, {
15
+ filePath: string;
16
+ }, z.ZodAny, z.ZodAny> {
17
+ private MIME类型映射;
18
+ private 缓存控制;
19
+ constructor(options: {
20
+ MIME类型映射?: Record<string, string>;
21
+ 缓存控制?: string;
22
+ });
23
+ 获得接口错误形式Zod(): z.ZodAny;
24
+ 获得接口正确形式Zod(): z.ZodAny;
25
+ 实现(req: Request, res: Response, 数据: Either<string, {
26
+ filePath: string;
27
+ }>, 请求附加参数: ________): Promise<void>;
28
+ }
29
+
30
+ export { 静态文件返回器 };
@@ -0,0 +1,7 @@
1
+ import {
2
+ 静态文件返回器
3
+ } from "../chunk-J5BX4WJJ.js";
4
+ import "../chunk-FP6Q65NN.js";
5
+ export {
6
+ \u9759\u6001\u6587\u4EF6\u8FD4\u56DE\u5668
7
+ };
@@ -0,0 +1,30 @@
1
+ import { Either } from '@lsby/ts-fp-data';
2
+ import { Request, Response } from 'express';
3
+ import { z } from 'zod';
4
+ import { 接口返回器 as _____ } from '../interface/interface-returner.js';
5
+ import { 请求附加参数类型 as ________ } from '../types/types.js';
6
+ import '../interface/interface-logic.js';
7
+ import '../help/interior.js';
8
+ import '../interface/interface-plugin.js';
9
+ import '@lsby/ts-log';
10
+ import '../global/model/web-socket.js';
11
+ import 'ws';
12
+ import '../global/model/hub.js';
13
+
14
+ declare class 虚拟文件返回器 extends _____<string, {
15
+ fileContent: string | Buffer;
16
+ MIMEType: string;
17
+ }, z.ZodAny, z.ZodAny> {
18
+ private 缓存控制;
19
+ constructor(options: {
20
+ 缓存控制?: string;
21
+ });
22
+ 获得接口错误形式Zod(): z.ZodAny;
23
+ 获得接口正确形式Zod(): z.ZodAny;
24
+ 实现(req: Request, res: Response, 数据: Either<string, {
25
+ fileContent: string | Buffer;
26
+ MIMEType: string;
27
+ }>, 请求附加参数: ________): void;
28
+ }
29
+
30
+ export { 虚拟文件返回器 };
@@ -0,0 +1,7 @@
1
+ import {
2
+ 虚拟文件返回器
3
+ } from "../chunk-WXTNTK3M.js";
4
+ import "../chunk-FP6Q65NN.js";
5
+ export {
6
+ \u865A\u62DF\u6587\u4EF6\u8FD4\u56DE\u5668
7
+ };
@@ -1,8 +1,41 @@
1
+ import * as http from 'node:http';
2
+ import { 任意接口 as ____ } from '../interface/interface-base.js';
3
+ import '../types/types.js';
1
4
  import '@lsby/ts-log';
2
- import 'node:http';
3
- export { 日 as 日志回调类型, 服 as 服务器, 请 as 请求附加参数类型 } from '../interface-base-DDfmN_Dg.js';
4
- import 'zod';
5
+ import '../global/model/web-socket.js';
6
+ import 'ws';
7
+ import '../global/model/hub.js';
8
+ import '../interface/interface-logic.js';
5
9
  import '@lsby/ts-fp-data';
6
10
  import 'express';
7
11
  import '../help/interior.js';
8
- import '../interface/interface-retuen.js';
12
+ import '../interface/interface-plugin.js';
13
+ import 'zod';
14
+ import '../interface/interface-returner.js';
15
+
16
+ type 日志回调类型 = (level: 'trace' | 'debug' | 'info' | 'warn' | 'error', namespace: string, content: string) => Promise<void>;
17
+ declare class 服务器 {
18
+ private log;
19
+ private 日志回调?;
20
+ private 接口们;
21
+ private 端口;
22
+ private 动态路由表;
23
+ private 静态路由表;
24
+ constructor(options: {
25
+ 接口们: ____[];
26
+ 端口: number;
27
+ 日志回调?: 日志回调类型;
28
+ });
29
+ run(): Promise<{
30
+ ip: string[];
31
+ api: string[];
32
+ server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
33
+ }>;
34
+ private 处理请求;
35
+ private 处理接口逻辑;
36
+ private 初始化WebSocket;
37
+ private 关闭WebSocket连接;
38
+ private 获取本地地址;
39
+ }
40
+
41
+ export { type 日志回调类型, 服务器 };
@@ -1,8 +1,10 @@
1
1
  import {
2
2
  服务器
3
- } from "../chunk-NRUNCIP7.js";
4
- import "../chunk-NJKBRPN7.js";
5
- import "../chunk-ZIVQ3WZA.js";
3
+ } from "../chunk-AB35ZHL3.js";
4
+ import "../chunk-P23ZAK4I.js";
5
+ import "../chunk-MRTIZDKN.js";
6
+ import "../chunk-NTDDPUP7.js";
7
+ import "../chunk-F5IAX56T.js";
6
8
  export {
7
9
  \u670D\u52A1\u5668
8
10
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  EXPORT_TYPE
3
- } from "../chunk-ZF7EC2OM.js";
3
+ } from "../chunk-HT7VG4BT.js";
4
4
  export {
5
5
  EXPORT_TYPE
6
6
  };
@@ -0,0 +1,22 @@
1
+ import { Log } from '@lsby/ts-log';
2
+ import { WebSocket管理器 as WebSocket___ } from '../global/model/web-socket.js';
3
+ import 'ws';
4
+ import '../global/model/hub.js';
5
+
6
+ type 空对象 = Record<PropertyKey, never>;
7
+ type 兼容空对象 = Record<PropertyKey, unknown>;
8
+ type 非空基本类型 = string | number | boolean;
9
+ type 基本类型 = 非空基本类型 | null;
10
+ type 递归基本类型 = 基本类型 | {
11
+ [k: PropertyKey]: 递归基本类型;
12
+ } | Array<递归基本类型>;
13
+ type 可序列化类型 = 基本类型 | {
14
+ [k: string]: 可序列化类型;
15
+ } | Array<可序列化类型>;
16
+ type 请求附加参数类型 = {
17
+ log: Log;
18
+ 请求id: string;
19
+ webSocket管理器: WebSocket___;
20
+ };
21
+
22
+ export type { 兼容空对象, 可序列化类型, 基本类型, 空对象, 请求附加参数类型, 递归基本类型, 非空基本类型 };
@@ -0,0 +1 @@
1
+ import "../chunk-BWFSM5FK.js";
package/package.json CHANGED
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "name": "@lsby/net-core",
3
- "version": "0.11.2",
3
+ "version": "0.13.3",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/lsby/net-core.git"
7
+ },
4
8
  "type": "module",
5
9
  "exports": {
6
10
  "require": "./dist/cjs/index.cjs",
@@ -15,56 +19,47 @@
15
19
  "dist"
16
20
  ],
17
21
  "scripts": {
18
- "build:all": "npm run build:cjs && npm run build:esm && npm run build:bin",
19
- "build:bin": "tsup src/bin/**/*.ts --external typescript --format cjs --clean --dts -d dist/bin",
20
- "build:cjs": "tsup src/**/*.ts --external typescript --format cjs --clean --dts -d dist/cjs",
21
- "build:esm": "tsup src/**/*.ts --external typescript --format esm --clean --dts -d dist/esm",
22
- "check:all": "npm run check:format && npm run check:lint && npm run check:type:check",
23
- "check:format": "prettier --write .",
24
- "check:lint": "eslint . --fix",
25
- "check:type:check": "tsc --noEmit",
26
- "check:type:check:watch": "tsc --noEmit -w",
27
- "prepare": "husky",
28
- "pub:public": "npm run check:all && npm run test:base && npm run build:all && bumpp && npm publish --access public",
29
- "test:base": "npm run check:all && vitest run",
30
- "test:coverage": "npm run check:all && vitest run --coverage && open-cli ./coverage/index.html"
22
+ "_build:all": "npm run _build:cjs && npm run _build:esm && npm run _build:bin",
23
+ "_build:bin": "tsup src/bin/**/*.ts --external typescript --format cjs --clean --dts -d dist/bin",
24
+ "_build:cjs": "tsup src/**/*.ts --external typescript --format cjs --clean --dts -d dist/cjs",
25
+ "_build:esm": "tsup src/**/*.ts --external typescript --format esm --clean --dts -d dist/esm",
26
+ "_check:all": "npm run _check:format && npm run _check:lint",
27
+ "_check:format": "prettier --write .",
28
+ "_check:lint": "eslint . --fix",
29
+ "public:npm": "npm run _build:all && bumpp && npm publish"
31
30
  },
32
31
  "dependencies": {
33
- "@lsby/ts-global": "^0.0.8",
34
32
  "commander": "^12.1.0",
35
- "lodash": "^4.17.21",
33
+ "multer": "^2.0.2",
36
34
  "short-uuid": "^5.2.0",
37
35
  "ws": "^8.18.0"
38
36
  },
39
37
  "devDependencies": {
40
- "@ianvs/prettier-plugin-sort-imports": "^4.2.1",
41
- "@lsby/eslint-config": "^0.2.31",
42
- "@lsby/eslint-plugin": "^0.0.15",
43
- "@types/lodash": "^4.17.7",
44
- "@types/node": "^20.12.10",
45
- "@types/ws": "^8.5.13",
46
- "@vitest/coverage-v8": "^2.0.2",
38
+ "@ianvs/prettier-plugin-sort-imports": "^4.7.0",
39
+ "@lsby/eslint-config": "^0.5.3",
40
+ "@lsby/eslint-plugin": "^0.2.1",
41
+ "@types/eslint": "^9.6.1",
42
+ "@types/multer": "^2.0.0",
43
+ "@types/node": "^25.0.6",
44
+ "@types/ws": "^8.18.1",
47
45
  "bumpp": "^9.4.1",
48
- "eslint": "^8.57.0",
49
- "eslint-config-prettier": "^9.1.0",
50
- "eslint-plugin-jsdoc": "^50.2.4",
51
- "eslint-plugin-react": "^7.36.1",
52
- "eslint-plugin-react-hooks": "^4.6.2",
53
- "eslint-plugin-sort-class-members": "^1.20.0",
54
- "husky": "^9.1.7",
55
- "prettier": "3.3.3",
56
- "prettier-plugin-organize-imports": "^4.1.0",
57
- "prettier-plugin-packagejson": "^2.5.2",
58
- "tsup": "^8.5.0",
59
- "typescript": "<5.6.0",
60
- "vitest": "^2.0.2"
46
+ "eslint": "^9.39.2",
47
+ "eslint-config-prettier": "^10.1.8",
48
+ "eslint-plugin-jsdoc": "^62.0.0",
49
+ "eslint-plugin-sort-class-members": "^1.21.0",
50
+ "prettier": "3.7.4",
51
+ "prettier-plugin-organize-imports": "^4.3.0",
52
+ "prettier-plugin-packagejson": "^2.5.20",
53
+ "tsup": "^8.5.1",
54
+ "typescript": "^5.9.3",
55
+ "typescript-eslint": "^8.52.0"
61
56
  },
62
57
  "peerDependencies": {
63
- "@lsby/ts-fp-data": "^0.2.5",
58
+ "@lsby/ts-fp-data": "^0.2.7",
64
59
  "@lsby/ts-log": "^0.3.0",
65
- "@types/express": "^4.17.21",
66
- "express": "^4.19.2",
60
+ "@types/express": "^5.0.6",
61
+ "express": "^5.2.1",
67
62
  "zod": "3.24.2"
68
63
  },
69
- "packageManager": "pnpm@9.7.1+sha512.faf344af2d6ca65c4c5c8c2224ea77a81a5e8859cbc4e06b1511ddce2f0151512431dd19e6aff31f2c6a8f5f2aced9bd2273e1fed7dd4de1868984059d2c4247"
64
+ "packageManager": "pnpm@9.7.1"
70
65
  }
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,2 +0,0 @@
1
-
2
- export { }
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,2 +0,0 @@
1
-
2
- export { }