@litert/televoke 0.4.6 → 1.0.0-0

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 (418) hide show
  1. package/CHANGES.md +6 -0
  2. package/README.md +13 -8
  3. package/lib/client/Client.decl.d.ts +47 -0
  4. package/lib/client/Client.decl.d.ts.map +1 -0
  5. package/lib/client/Client.decl.js +18 -0
  6. package/lib/client/Client.decl.js.map +1 -0
  7. package/lib/client/JsonApiClient.impl.d.ts +28 -0
  8. package/lib/client/JsonApiClient.impl.d.ts.map +1 -0
  9. package/lib/client/JsonApiClient.impl.js +169 -0
  10. package/lib/client/JsonApiClient.impl.js.map +1 -0
  11. package/lib/client/LegacyHttpClient.impl.d.ts +62 -0
  12. package/lib/client/LegacyHttpClient.impl.d.ts.map +1 -0
  13. package/lib/client/LegacyHttpClient.impl.js +163 -0
  14. package/lib/client/LegacyHttpClient.impl.js.map +1 -0
  15. package/lib/client/index.d.ts +19 -0
  16. package/lib/client/index.d.ts.map +1 -0
  17. package/lib/client/index.js +35 -0
  18. package/lib/client/index.js.map +1 -0
  19. package/lib/index.d.ts +18 -20
  20. package/lib/index.d.ts.map +1 -1
  21. package/lib/index.js +19 -20
  22. package/lib/index.js.map +1 -1
  23. package/lib/server/LegacyServerChannel.impl.d.ts +38 -0
  24. package/lib/server/LegacyServerChannel.impl.d.ts.map +1 -0
  25. package/lib/server/LegacyServerChannel.impl.js +51 -0
  26. package/lib/server/LegacyServerChannel.impl.js.map +1 -0
  27. package/lib/server/Server.decl.d.ts +81 -0
  28. package/lib/server/Server.decl.d.ts.map +1 -0
  29. package/lib/server/Server.decl.js +18 -0
  30. package/lib/server/Server.decl.js.map +1 -0
  31. package/lib/server/Server.impl.d.ts +33 -0
  32. package/lib/server/Server.impl.d.ts.map +1 -0
  33. package/lib/server/Server.impl.js +58 -0
  34. package/lib/server/Server.impl.js.map +1 -0
  35. package/lib/server/ServerChannel.d.ts +20 -0
  36. package/lib/server/ServerChannel.d.ts.map +1 -0
  37. package/lib/server/ServerChannel.js +23 -0
  38. package/lib/server/ServerChannel.js.map +1 -0
  39. package/lib/server/SimpleJsonApiRouter.d.ts +28 -0
  40. package/lib/server/SimpleJsonApiRouter.d.ts.map +1 -0
  41. package/lib/server/SimpleJsonApiRouter.js +92 -0
  42. package/lib/server/SimpleJsonApiRouter.js.map +1 -0
  43. package/lib/server/index.d.ts +19 -0
  44. package/lib/server/index.d.ts.map +1 -0
  45. package/lib/server/index.js +35 -0
  46. package/lib/server/index.js.map +1 -0
  47. package/lib/shared/BinaryStream.d.ts +32 -0
  48. package/lib/shared/BinaryStream.d.ts.map +1 -0
  49. package/lib/shared/BinaryStream.js +93 -0
  50. package/lib/shared/BinaryStream.js.map +1 -0
  51. package/lib/shared/BinaryStreamManager.d.ts +52 -0
  52. package/lib/shared/BinaryStreamManager.d.ts.map +1 -0
  53. package/lib/shared/BinaryStreamManager.js +105 -0
  54. package/lib/shared/BinaryStreamManager.js.map +1 -0
  55. package/lib/shared/Channel.impl.d.ts +79 -0
  56. package/lib/shared/Channel.impl.d.ts.map +1 -0
  57. package/lib/shared/Channel.impl.js +433 -0
  58. package/lib/shared/Channel.impl.js.map +1 -0
  59. package/lib/shared/Constants.d.ts +32 -0
  60. package/lib/shared/Constants.d.ts.map +1 -0
  61. package/lib/shared/Constants.js +35 -0
  62. package/lib/shared/Constants.js.map +1 -0
  63. package/lib/shared/Encodings/index.d.ts +18 -0
  64. package/lib/shared/Encodings/index.d.ts.map +1 -0
  65. package/lib/shared/Encodings/index.js +21 -0
  66. package/lib/shared/Encodings/index.js.map +1 -0
  67. package/lib/shared/Encodings/v1/EncoderV1.d.ts +22 -0
  68. package/lib/shared/Encodings/v1/EncoderV1.d.ts.map +1 -0
  69. package/lib/shared/Encodings/v1/EncoderV1.js +47 -0
  70. package/lib/shared/Encodings/v1/EncoderV1.js.map +1 -0
  71. package/lib/shared/Encodings/v1/Protocol.v1.decls.d.ts +78 -0
  72. package/lib/shared/Encodings/v1/Protocol.v1.decls.d.ts.map +1 -0
  73. package/lib/shared/Encodings/v1/Protocol.v1.decls.js +53 -0
  74. package/lib/shared/Encodings/v1/Protocol.v1.decls.js.map +1 -0
  75. package/lib/shared/Encodings/v1/index.d.ts +18 -0
  76. package/lib/shared/Encodings/v1/index.d.ts.map +1 -0
  77. package/lib/shared/Encodings/v1/index.js +34 -0
  78. package/lib/shared/Encodings/v1/index.js.map +1 -0
  79. package/lib/shared/Encodings/v2/Constants.v2.d.ts +29 -0
  80. package/lib/shared/Encodings/v2/Constants.v2.d.ts.map +1 -0
  81. package/lib/shared/Encodings/v2/Constants.v2.js +34 -0
  82. package/lib/shared/Encodings/v2/Constants.v2.js.map +1 -0
  83. package/lib/shared/Encodings/v2/DecoderV2.d.ts +27 -0
  84. package/lib/shared/Encodings/v2/DecoderV2.d.ts.map +1 -0
  85. package/lib/shared/Encodings/v2/DecoderV2.js +279 -0
  86. package/lib/shared/Encodings/v2/DecoderV2.js.map +1 -0
  87. package/lib/shared/Encodings/v2/EncoderV2.d.ts +21 -0
  88. package/lib/shared/Encodings/v2/EncoderV2.d.ts.map +1 -0
  89. package/lib/shared/Encodings/v2/EncoderV2.js +176 -0
  90. package/lib/shared/Encodings/v2/EncoderV2.js.map +1 -0
  91. package/lib/shared/Encodings/v2/Encoding.v2.decl.d.ts +95 -0
  92. package/lib/shared/Encodings/v2/Encoding.v2.decl.d.ts.map +1 -0
  93. package/lib/shared/Encodings/v2/Encoding.v2.decl.js +18 -0
  94. package/lib/shared/Encodings/v2/Encoding.v2.decl.js.map +1 -0
  95. package/lib/shared/Encodings/v2/index.d.ts +20 -0
  96. package/lib/shared/Encodings/v2/index.d.ts.map +1 -0
  97. package/lib/shared/Encodings/v2/index.js +35 -0
  98. package/lib/shared/Encodings/v2/index.js.map +1 -0
  99. package/lib/shared/Errors.d.ts +60 -0
  100. package/lib/shared/Errors.d.ts.map +1 -0
  101. package/lib/shared/Errors.js +75 -0
  102. package/lib/shared/Errors.js.map +1 -0
  103. package/lib/shared/Shared.decl.d.ts +296 -0
  104. package/lib/shared/Shared.decl.d.ts.map +1 -0
  105. package/lib/shared/Shared.decl.js +18 -0
  106. package/lib/shared/Shared.decl.js.map +1 -0
  107. package/lib/shared/Utils.d.ts +25 -0
  108. package/lib/shared/Utils.d.ts.map +1 -0
  109. package/lib/shared/Utils.js +46 -0
  110. package/lib/shared/Utils.js.map +1 -0
  111. package/lib/shared/index.d.ts +23 -0
  112. package/lib/shared/index.d.ts.map +1 -0
  113. package/lib/shared/index.js +39 -0
  114. package/lib/shared/index.js.map +1 -0
  115. package/lib/transporters/Transporter.decl.d.ts +90 -0
  116. package/lib/transporters/Transporter.decl.d.ts.map +1 -0
  117. package/lib/transporters/Transporter.decl.js +18 -0
  118. package/lib/transporters/Transporter.decl.js.map +1 -0
  119. package/lib/transporters/http-listener/AbstractHttpListener.d.ts +32 -0
  120. package/lib/transporters/http-listener/AbstractHttpListener.d.ts.map +1 -0
  121. package/lib/transporters/http-listener/AbstractHttpListener.js +46 -0
  122. package/lib/transporters/http-listener/AbstractHttpListener.js.map +1 -0
  123. package/lib/transporters/http-listener/Http.Decl.d.ts +95 -0
  124. package/lib/transporters/http-listener/Http.Decl.d.ts.map +1 -0
  125. package/lib/transporters/http-listener/Http.Decl.js +52 -0
  126. package/lib/transporters/http-listener/Http.Decl.js.map +1 -0
  127. package/lib/transporters/http-listener/HttpListener.d.ts +18 -0
  128. package/lib/transporters/http-listener/HttpListener.d.ts.map +1 -0
  129. package/lib/transporters/http-listener/HttpListener.js +73 -0
  130. package/lib/transporters/http-listener/HttpListener.js.map +1 -0
  131. package/lib/transporters/http-listener/HttpUnixSocketListener.d.ts +18 -0
  132. package/lib/transporters/http-listener/HttpUnixSocketListener.d.ts.map +1 -0
  133. package/lib/transporters/http-listener/HttpUnixSocketListener.js +72 -0
  134. package/lib/transporters/http-listener/HttpUnixSocketListener.js.map +1 -0
  135. package/lib/transporters/http-listener/HttpsListener.d.ts +18 -0
  136. package/lib/transporters/http-listener/HttpsListener.d.ts.map +1 -0
  137. package/lib/transporters/http-listener/HttpsListener.js +73 -0
  138. package/lib/transporters/http-listener/HttpsListener.js.map +1 -0
  139. package/lib/transporters/http-listener/index.d.ts +20 -0
  140. package/lib/transporters/http-listener/index.d.ts.map +1 -0
  141. package/lib/transporters/http-listener/index.js +36 -0
  142. package/lib/transporters/http-listener/index.js.map +1 -0
  143. package/lib/transporters/index.d.ts +17 -0
  144. package/lib/transporters/index.d.ts.map +1 -0
  145. package/lib/transporters/index.js +18 -0
  146. package/lib/transporters/index.js.map +1 -0
  147. package/lib/transporters/legacy-http/LegacyHttp.Server.d.ts +24 -0
  148. package/lib/transporters/legacy-http/LegacyHttp.Server.d.ts.map +1 -0
  149. package/lib/transporters/legacy-http/LegacyHttp.Server.js +167 -0
  150. package/lib/transporters/legacy-http/LegacyHttp.Server.js.map +1 -0
  151. package/lib/transporters/legacy-http/LegacyHttp.Transporter.d.ts +28 -0
  152. package/lib/transporters/legacy-http/LegacyHttp.Transporter.d.ts.map +1 -0
  153. package/lib/transporters/legacy-http/LegacyHttp.Transporter.js +55 -0
  154. package/lib/transporters/legacy-http/LegacyHttp.Transporter.js.map +1 -0
  155. package/lib/transporters/legacy-http/index.d.ts +18 -0
  156. package/lib/transporters/legacy-http/index.d.ts.map +1 -0
  157. package/lib/transporters/legacy-http/index.js +34 -0
  158. package/lib/transporters/legacy-http/index.js.map +1 -0
  159. package/lib/transporters/lwdfx/LwDFX.Tcp.Client.d.ts +19 -0
  160. package/lib/transporters/lwdfx/LwDFX.Tcp.Client.d.ts.map +1 -0
  161. package/lib/transporters/lwdfx/LwDFX.Tcp.Client.js +33 -0
  162. package/lib/transporters/lwdfx/LwDFX.Tcp.Client.js.map +1 -0
  163. package/lib/transporters/lwdfx/LwDFX.Tcp.Server.d.ts +21 -0
  164. package/lib/transporters/lwdfx/LwDFX.Tcp.Server.d.ts.map +1 -0
  165. package/lib/transporters/lwdfx/LwDFX.Tcp.Server.js +64 -0
  166. package/lib/transporters/lwdfx/LwDFX.Tcp.Server.js.map +1 -0
  167. package/lib/transporters/lwdfx/LwDFX.Tls.Client.d.ts +19 -0
  168. package/lib/transporters/lwdfx/LwDFX.Tls.Client.d.ts.map +1 -0
  169. package/lib/transporters/lwdfx/LwDFX.Tls.Client.js +33 -0
  170. package/lib/transporters/lwdfx/LwDFX.Tls.Client.js.map +1 -0
  171. package/lib/transporters/lwdfx/LwDFX.Tls.Server.d.ts +21 -0
  172. package/lib/transporters/lwdfx/LwDFX.Tls.Server.d.ts.map +1 -0
  173. package/lib/transporters/lwdfx/LwDFX.Tls.Server.js +64 -0
  174. package/lib/transporters/lwdfx/LwDFX.Tls.Server.js.map +1 -0
  175. package/lib/transporters/lwdfx/LwDFX.Transporter.d.ts +34 -0
  176. package/lib/transporters/lwdfx/LwDFX.Transporter.d.ts.map +1 -0
  177. package/lib/transporters/lwdfx/LwDFX.Transporter.js +78 -0
  178. package/lib/transporters/lwdfx/LwDFX.Transporter.js.map +1 -0
  179. package/lib/transporters/lwdfx/LwDFX.UnixSocket.Client.d.ts +19 -0
  180. package/lib/transporters/lwdfx/LwDFX.UnixSocket.Client.d.ts.map +1 -0
  181. package/lib/transporters/lwdfx/LwDFX.UnixSocket.Client.js +33 -0
  182. package/lib/transporters/lwdfx/LwDFX.UnixSocket.Client.js.map +1 -0
  183. package/lib/transporters/lwdfx/LwDFX.UnixSocket.Server.d.ts +21 -0
  184. package/lib/transporters/lwdfx/LwDFX.UnixSocket.Server.d.ts.map +1 -0
  185. package/lib/transporters/lwdfx/LwDFX.UnixSocket.Server.js +64 -0
  186. package/lib/transporters/lwdfx/LwDFX.UnixSocket.Server.js.map +1 -0
  187. package/lib/transporters/lwdfx/LwDFX.decl.d.ts +18 -0
  188. package/lib/transporters/lwdfx/LwDFX.decl.d.ts.map +1 -0
  189. package/lib/transporters/lwdfx/LwDFX.decl.js +18 -0
  190. package/lib/transporters/lwdfx/LwDFX.decl.js.map +1 -0
  191. package/lib/transporters/lwdfx/index.d.ts +23 -0
  192. package/lib/transporters/lwdfx/index.d.ts.map +1 -0
  193. package/lib/transporters/lwdfx/index.js +39 -0
  194. package/lib/transporters/lwdfx/index.js.map +1 -0
  195. package/lib/transporters/memory/Memory.Impl.d.ts +43 -0
  196. package/lib/transporters/memory/Memory.Impl.d.ts.map +1 -0
  197. package/lib/transporters/memory/Memory.Impl.js +227 -0
  198. package/lib/transporters/memory/Memory.Impl.js.map +1 -0
  199. package/lib/transporters/memory/index.d.ts +17 -0
  200. package/lib/transporters/memory/index.d.ts.map +1 -0
  201. package/lib/transporters/memory/index.js +33 -0
  202. package/lib/transporters/memory/index.js.map +1 -0
  203. package/lib/transporters/websocket/WebSocket.Client.d.ts +20 -0
  204. package/lib/transporters/websocket/WebSocket.Client.d.ts.map +1 -0
  205. package/lib/transporters/websocket/WebSocket.Client.js +68 -0
  206. package/lib/transporters/websocket/WebSocket.Client.js.map +1 -0
  207. package/lib/transporters/websocket/WebSocket.Server.d.ts +25 -0
  208. package/lib/transporters/websocket/WebSocket.Server.d.ts.map +1 -0
  209. package/lib/transporters/websocket/WebSocket.Server.js +87 -0
  210. package/lib/transporters/websocket/WebSocket.Server.js.map +1 -0
  211. package/lib/transporters/websocket/WebSocket.Transporter.d.ts +34 -0
  212. package/lib/transporters/websocket/WebSocket.Transporter.d.ts.map +1 -0
  213. package/lib/transporters/websocket/WebSocket.Transporter.js +106 -0
  214. package/lib/transporters/websocket/WebSocket.Transporter.js.map +1 -0
  215. package/lib/transporters/websocket/WebSocket.decl.d.ts +19 -0
  216. package/lib/transporters/websocket/WebSocket.decl.d.ts.map +1 -0
  217. package/lib/transporters/websocket/WebSocket.decl.js +22 -0
  218. package/lib/transporters/websocket/WebSocket.decl.js.map +1 -0
  219. package/lib/transporters/websocket/index.d.ts +19 -0
  220. package/lib/transporters/websocket/index.d.ts.map +1 -0
  221. package/lib/transporters/websocket/index.js +35 -0
  222. package/lib/transporters/websocket/index.js.map +1 -0
  223. package/package.json +12 -12
  224. package/src/lib/client/Client.decl.ts +61 -0
  225. package/src/lib/client/JsonApiClient.impl.ts +258 -0
  226. package/src/lib/client/LegacyHttpClient.impl.ts +278 -0
  227. package/src/lib/client/index.ts +19 -0
  228. package/src/lib/index.ts +18 -20
  229. package/src/lib/server/LegacyServerChannel.impl.ts +71 -0
  230. package/src/lib/server/Server.decl.ts +109 -0
  231. package/src/lib/server/Server.impl.ts +90 -0
  232. package/src/lib/server/ServerChannel.ts +20 -0
  233. package/src/lib/server/SimpleJsonApiRouter.ts +135 -0
  234. package/src/lib/server/index.ts +19 -0
  235. package/src/lib/shared/BinaryStream.ts +131 -0
  236. package/src/lib/shared/BinaryStreamManager.ts +142 -0
  237. package/src/lib/shared/Channel.impl.ts +641 -0
  238. package/src/lib/shared/Constants.ts +35 -0
  239. package/src/lib/shared/Encodings/index.ts +18 -0
  240. package/src/lib/shared/Encodings/v1/EncoderV1.ts +66 -0
  241. package/src/lib/shared/Encodings/v1/Protocol.v1.decls.ts +96 -0
  242. package/src/lib/shared/Encodings/v1/index.ts +18 -0
  243. package/src/lib/shared/Encodings/v2/Constants.v2.ts +31 -0
  244. package/src/lib/shared/Encodings/v2/DecoderV2.ts +404 -0
  245. package/src/lib/shared/Encodings/v2/EncoderV2.ts +283 -0
  246. package/src/lib/shared/Encodings/v2/Encoding.v2.decl.ts +133 -0
  247. package/src/lib/shared/Encodings/v2/index.ts +20 -0
  248. package/src/lib/shared/Errors.ts +94 -0
  249. package/src/lib/shared/Shared.decl.ts +347 -0
  250. package/src/lib/shared/Utils.ts +51 -0
  251. package/src/lib/shared/index.ts +23 -0
  252. package/src/lib/transporters/Transporter.decl.ts +117 -0
  253. package/src/lib/transporters/http-listener/AbstractHttpListener.ts +57 -0
  254. package/src/lib/transporters/http-listener/Http.Decl.ts +141 -0
  255. package/src/lib/transporters/http-listener/HttpListener.ts +102 -0
  256. package/src/lib/transporters/http-listener/HttpUnixSocketListener.ts +97 -0
  257. package/src/lib/transporters/http-listener/HttpsListener.ts +102 -0
  258. package/src/lib/transporters/http-listener/index.ts +20 -0
  259. package/src/lib/transporters/index.ts +17 -0
  260. package/src/lib/transporters/legacy-http/LegacyHttp.Server.ts +262 -0
  261. package/src/lib/transporters/legacy-http/LegacyHttp.Transporter.ts +66 -0
  262. package/src/lib/transporters/legacy-http/index.ts +18 -0
  263. package/src/lib/transporters/lwdfx/LwDFX.Tcp.Client.ts +34 -0
  264. package/src/lib/transporters/lwdfx/LwDFX.Tcp.Server.ts +94 -0
  265. package/src/lib/transporters/lwdfx/LwDFX.Tls.Client.ts +34 -0
  266. package/src/lib/transporters/lwdfx/LwDFX.Tls.Server.ts +94 -0
  267. package/src/lib/transporters/lwdfx/LwDFX.Transporter.ts +100 -0
  268. package/src/lib/transporters/lwdfx/LwDFX.UnixSocket.Client.ts +34 -0
  269. package/src/lib/transporters/lwdfx/LwDFX.UnixSocket.Server.ts +94 -0
  270. package/src/lib/transporters/lwdfx/LwDFX.decl.ts +19 -0
  271. package/src/lib/transporters/lwdfx/index.ts +23 -0
  272. package/src/lib/transporters/memory/Memory.Impl.ts +363 -0
  273. package/src/lib/transporters/memory/index.ts +17 -0
  274. package/src/lib/transporters/websocket/WebSocket.Client.ts +76 -0
  275. package/src/lib/transporters/websocket/WebSocket.Server.ts +118 -0
  276. package/src/lib/transporters/websocket/WebSocket.Transporter.ts +132 -0
  277. package/src/lib/transporters/websocket/WebSocket.decl.ts +21 -0
  278. package/src/lib/transporters/websocket/index.ts +19 -0
  279. package/lib/Client/BuiltInRIDGenerator.d.ts +0 -4
  280. package/lib/Client/BuiltInRIDGenerator.d.ts.map +0 -1
  281. package/lib/Client/BuiltInRIDGenerator.js +0 -18
  282. package/lib/Client/BuiltInRIDGenerator.js.map +0 -1
  283. package/lib/Client/Common.d.ts +0 -47
  284. package/lib/Client/Common.d.ts.map +0 -1
  285. package/lib/Client/Common.js +0 -18
  286. package/lib/Client/Common.js.map +0 -1
  287. package/lib/Client/Errors.d.ts +0 -26
  288. package/lib/Client/Errors.d.ts.map +0 -1
  289. package/lib/Client/Errors.js +0 -80
  290. package/lib/Client/Errors.js.map +0 -1
  291. package/lib/Client/HttpClient.d.ts +0 -37
  292. package/lib/Client/HttpClient.d.ts.map +0 -1
  293. package/lib/Client/HttpClient.js +0 -148
  294. package/lib/Client/HttpClient.js.map +0 -1
  295. package/lib/Client/HttpsClient.d.ts +0 -40
  296. package/lib/Client/HttpsClient.d.ts.map +0 -1
  297. package/lib/Client/HttpsClient.js +0 -144
  298. package/lib/Client/HttpsClient.js.map +0 -1
  299. package/lib/Client/TCPClient.d.ts +0 -34
  300. package/lib/Client/TCPClient.d.ts.map +0 -1
  301. package/lib/Client/TCPClient.js +0 -271
  302. package/lib/Client/TCPClient.js.map +0 -1
  303. package/lib/Client/TLSClient.d.ts +0 -34
  304. package/lib/Client/TLSClient.d.ts.map +0 -1
  305. package/lib/Client/TLSClient.js +0 -265
  306. package/lib/Client/TLSClient.js.map +0 -1
  307. package/lib/Client/index.d.ts +0 -23
  308. package/lib/Client/index.d.ts.map +0 -1
  309. package/lib/Client/index.js +0 -39
  310. package/lib/Client/index.js.map +0 -1
  311. package/lib/Common/API.d.ts +0 -19
  312. package/lib/Common/API.d.ts.map +0 -1
  313. package/lib/Common/API.js +0 -18
  314. package/lib/Common/API.js.map +0 -1
  315. package/lib/Common/Encoding.d.ts +0 -32
  316. package/lib/Common/Encoding.d.ts.map +0 -1
  317. package/lib/Common/Encoding.js +0 -20
  318. package/lib/Common/Encoding.js.map +0 -1
  319. package/lib/Common/Request.d.ts +0 -23
  320. package/lib/Common/Request.d.ts.map +0 -1
  321. package/lib/Common/Request.js +0 -18
  322. package/lib/Common/Request.js.map +0 -1
  323. package/lib/Common/Response.d.ts +0 -60
  324. package/lib/Common/Response.d.ts.map +0 -1
  325. package/lib/Common/Response.js +0 -42
  326. package/lib/Common/Response.js.map +0 -1
  327. package/lib/Common/index.d.ts +0 -20
  328. package/lib/Common/index.d.ts.map +0 -1
  329. package/lib/Common/index.js +0 -36
  330. package/lib/Common/index.js.map +0 -1
  331. package/lib/Encoder/Decoder.d.ts +0 -18
  332. package/lib/Encoder/Decoder.d.ts.map +0 -1
  333. package/lib/Encoder/Decoder.js +0 -136
  334. package/lib/Encoder/Decoder.js.map +0 -1
  335. package/lib/Encoder/Encoder.d.ts +0 -18
  336. package/lib/Encoder/Encoder.d.ts.map +0 -1
  337. package/lib/Encoder/Encoder.js +0 -35
  338. package/lib/Encoder/Encoder.js.map +0 -1
  339. package/lib/Encoder/Errors.d.ts +0 -17
  340. package/lib/Encoder/Errors.d.ts.map +0 -1
  341. package/lib/Encoder/Errors.js +0 -26
  342. package/lib/Encoder/Errors.js.map +0 -1
  343. package/lib/Errors.d.ts +0 -20
  344. package/lib/Errors.d.ts.map +0 -1
  345. package/lib/Errors.js +0 -40
  346. package/lib/Errors.js.map +0 -1
  347. package/lib/Server/Common/Gateway.d.ts +0 -26
  348. package/lib/Server/Common/Gateway.d.ts.map +0 -1
  349. package/lib/Server/Common/Gateway.js +0 -18
  350. package/lib/Server/Common/Gateway.js.map +0 -1
  351. package/lib/Server/Common/Request.d.ts +0 -21
  352. package/lib/Server/Common/Request.d.ts.map +0 -1
  353. package/lib/Server/Common/Request.js +0 -18
  354. package/lib/Server/Common/Request.js.map +0 -1
  355. package/lib/Server/Common/Router.d.ts +0 -41
  356. package/lib/Server/Common/Router.d.ts.map +0 -1
  357. package/lib/Server/Common/Router.js +0 -18
  358. package/lib/Server/Common/Router.js.map +0 -1
  359. package/lib/Server/Common/Server.d.ts +0 -57
  360. package/lib/Server/Common/Server.d.ts.map +0 -1
  361. package/lib/Server/Common/Server.js +0 -18
  362. package/lib/Server/Common/Server.js.map +0 -1
  363. package/lib/Server/Common/index.d.ts +0 -20
  364. package/lib/Server/Common/index.d.ts.map +0 -1
  365. package/lib/Server/Common/index.js +0 -36
  366. package/lib/Server/Common/index.js.map +0 -1
  367. package/lib/Server/Errors.d.ts +0 -25
  368. package/lib/Server/Errors.d.ts.map +0 -1
  369. package/lib/Server/Errors.js +0 -74
  370. package/lib/Server/Errors.js.map +0 -1
  371. package/lib/Server/Gateways/Http.d.ts +0 -18
  372. package/lib/Server/Gateways/Http.d.ts.map +0 -1
  373. package/lib/Server/Gateways/Http.js +0 -144
  374. package/lib/Server/Gateways/Http.js.map +0 -1
  375. package/lib/Server/Gateways/TCP.d.ts +0 -23
  376. package/lib/Server/Gateways/TCP.d.ts.map +0 -1
  377. package/lib/Server/Gateways/TCP.js +0 -146
  378. package/lib/Server/Gateways/TCP.js.map +0 -1
  379. package/lib/Server/Server.d.ts +0 -18
  380. package/lib/Server/Server.d.ts.map +0 -1
  381. package/lib/Server/Server.js +0 -200
  382. package/lib/Server/Server.js.map +0 -1
  383. package/lib/Server/SimpleRouter.d.ts +0 -41
  384. package/lib/Server/SimpleRouter.d.ts.map +0 -1
  385. package/lib/Server/SimpleRouter.js +0 -54
  386. package/lib/Server/SimpleRouter.js.map +0 -1
  387. package/lib/Server/index.d.ts +0 -22
  388. package/lib/Server/index.d.ts.map +0 -1
  389. package/lib/Server/index.js +0 -38
  390. package/lib/Server/index.js.map +0 -1
  391. package/src/lib/Client/BuiltInRIDGenerator.ts +0 -21
  392. package/src/lib/Client/Common.ts +0 -63
  393. package/src/lib/Client/Errors.ts +0 -87
  394. package/src/lib/Client/HttpClient.ts +0 -232
  395. package/src/lib/Client/HttpsClient.ts +0 -238
  396. package/src/lib/Client/TCPClient.ts +0 -420
  397. package/src/lib/Client/TLSClient.ts +0 -422
  398. package/src/lib/Client/index.ts +0 -23
  399. package/src/lib/Common/API.ts +0 -20
  400. package/src/lib/Common/Encoding.ts +0 -42
  401. package/src/lib/Common/Request.ts +0 -28
  402. package/src/lib/Common/Response.ts +0 -67
  403. package/src/lib/Common/index.ts +0 -20
  404. package/src/lib/Encoder/Decoder.ts +0 -206
  405. package/src/lib/Encoder/Encoder.ts +0 -41
  406. package/src/lib/Encoder/Errors.ts +0 -24
  407. package/src/lib/Errors.ts +0 -40
  408. package/src/lib/Server/Common/Gateway.ts +0 -37
  409. package/src/lib/Server/Common/Request.ts +0 -24
  410. package/src/lib/Server/Common/Router.ts +0 -52
  411. package/src/lib/Server/Common/Server.ts +0 -68
  412. package/src/lib/Server/Common/index.ts +0 -20
  413. package/src/lib/Server/Errors.ts +0 -80
  414. package/src/lib/Server/Gateways/Http.ts +0 -203
  415. package/src/lib/Server/Gateways/TCP.ts +0 -221
  416. package/src/lib/Server/Server.ts +0 -268
  417. package/src/lib/Server/SimpleRouter.ts +0 -95
  418. package/src/lib/Server/index.ts +0 -22
package/lib/index.d.ts CHANGED
@@ -1,22 +1,20 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * https://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- export * from './Common';
17
- export * from './Encoder/Encoder';
18
- export * from './Encoder/Decoder';
19
- export * from './Server';
20
- export * from './Errors';
21
- export * from './Client';
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export * from './shared';
17
+ export * as Servers from './server';
18
+ export * as Clients from './client';
19
+ export * as Gateways from './transporters';
22
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;EAcE;AAEF,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,OAAO,MAAM,UAAU,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,UAAU,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC"}
package/lib/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * https://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
3
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
17
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
18
  if (k2 === undefined) k2 = k;
19
19
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -29,10 +29,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
29
29
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
30
30
  };
31
31
  Object.defineProperty(exports, "__esModule", { value: true });
32
- __exportStar(require("./Common"), exports);
33
- __exportStar(require("./Encoder/Encoder"), exports);
34
- __exportStar(require("./Encoder/Decoder"), exports);
35
- __exportStar(require("./Server"), exports);
36
- __exportStar(require("./Errors"), exports);
37
- __exportStar(require("./Client"), exports);
32
+ exports.Gateways = exports.Clients = exports.Servers = void 0;
33
+ __exportStar(require("./shared"), exports);
34
+ exports.Servers = require("./server");
35
+ exports.Clients = require("./client");
36
+ exports.Gateways = require("./transporters");
38
37
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,oDAAkC;AAClC,oDAAkC;AAClC,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;;;;;;;;;;;;;;;AAEF,2CAAyB;AACzB,sCAAoC;AACpC,sCAAoC;AACpC,6CAA2C"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /// <reference types="node" />
17
+ /// <reference types="node" />
18
+ import * as Shared from '../shared';
19
+ import { EventEmitter } from 'node:events';
20
+ import * as v2 from '../shared/Encodings/v2';
21
+ export type ILegacyApiResponseCallback = (body: v2.IDataChunkField | Shared.TelevokeError) => void;
22
+ export declare class TvLegacyServerChannelV1 extends EventEmitter implements Shared.IChannelBase<Shared.IDefaultEvents> {
23
+ readonly transporter: Shared.ITransporter;
24
+ get context(): Record<string, unknown>;
25
+ get ended(): boolean;
26
+ get finished(): boolean;
27
+ get writable(): boolean;
28
+ get id(): number;
29
+ get timeout(): number;
30
+ get streams(): Shared.IStreamManager;
31
+ constructor(transporter: Shared.ITransporter);
32
+ openBinaryStream(): Shared.IBinaryReadStream;
33
+ ping(): Promise<Buffer>;
34
+ sendBinaryChunk(): Promise<void>;
35
+ sendMessage(): Promise<void>;
36
+ close(): void;
37
+ }
38
+ //# sourceMappingURL=LegacyServerChannel.impl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegacyServerChannel.impl.d.ts","sourceRoot":"","sources":["../../src/lib/server/LegacyServerChannel.impl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE7C,MAAM,MAAM,0BAA0B,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,GAAG,MAAM,CAAC,aAAa,KAAK,IAAI,CAAC;AAInG,qBAAa,uBAAwB,SAAQ,YAAa,YAAW,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,cAAc,CAAC;aAiBvF,WAAW,EAAE,MAAM,CAAC,YAAY;IAfpD,IAAW,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAe;IAE5D,IAAW,KAAK,IAAI,OAAO,CAAkB;IAE7C,IAAW,QAAQ,IAAI,OAAO,CAAkB;IAEhD,IAAW,QAAQ,IAAI,OAAO,CAAkB;IAEhD,IAAW,EAAE,IAAI,MAAM,CAAc;IAErC,IAAW,OAAO,IAAI,MAAM,CAAmB;IAE/C,IAAW,OAAO,IAAI,MAAM,CAAC,cAAc,CAA0B;gBAGjD,WAAW,EAAE,MAAM,CAAC,YAAY;IAK7C,gBAAgB,IAAI,MAAM,CAAC,iBAAiB;IAK5C,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IAKvB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAKhC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAK5B,KAAK,IAAI,IAAI;CAIvB"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.TvLegacyServerChannelV1 = void 0;
19
+ const Shared = require("../shared");
20
+ const node_events_1 = require("node:events");
21
+ const streamManager = Shared.createDisabledStreamManagerFactory()(null);
22
+ class TvLegacyServerChannelV1 extends node_events_1.EventEmitter {
23
+ get context() { return {}; }
24
+ get ended() { return false; }
25
+ get finished() { return false; }
26
+ get writable() { return false; }
27
+ get id() { return 0; }
28
+ get timeout() { return 30000; }
29
+ get streams() { return streamManager; }
30
+ constructor(transporter) {
31
+ super();
32
+ this.transporter = transporter;
33
+ }
34
+ openBinaryStream() {
35
+ throw new Shared.errors.cmd_not_impl();
36
+ }
37
+ ping() {
38
+ return Promise.reject(new Shared.errors.cmd_not_impl());
39
+ }
40
+ sendBinaryChunk() {
41
+ return Promise.reject(new Shared.errors.cmd_not_impl());
42
+ }
43
+ sendMessage() {
44
+ return Promise.reject(new Shared.errors.cmd_not_impl());
45
+ }
46
+ close() {
47
+ return;
48
+ }
49
+ }
50
+ exports.TvLegacyServerChannelV1 = TvLegacyServerChannelV1;
51
+ //# sourceMappingURL=LegacyServerChannel.impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegacyServerChannel.impl.js","sourceRoot":"","sources":["../../src/lib/server/LegacyServerChannel.impl.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,oCAAoC;AACpC,6CAA2C;AAK3C,MAAM,aAAa,GAAG,MAAM,CAAC,kCAAkC,EAAE,CAAC,IAAW,CAAC,CAAC;AAE/E,MAAa,uBAAwB,SAAQ,0BAAY;IAErD,IAAW,OAAO,KAA8B,OAAO,EAAE,CAAC,CAAC,CAAC;IAE5D,IAAW,KAAK,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAE7C,IAAW,QAAQ,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAEhD,IAAW,QAAQ,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAEhD,IAAW,EAAE,KAAa,OAAO,CAAC,CAAC,CAAC,CAAC;IAErC,IAAW,OAAO,KAAa,OAAO,KAAM,CAAC,CAAC,CAAC;IAE/C,IAAW,OAAO,KAA4B,OAAO,aAAa,CAAC,CAAC,CAAC;IAErE,YACoB,WAAgC;QAEhD,KAAK,EAAE,CAAC;QAFQ,gBAAW,GAAX,WAAW,CAAqB;IAGpD,CAAC;IAEM,gBAAgB;QAEnB,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;IAC3C,CAAC;IAEM,IAAI;QAEP,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC5D,CAAC;IAEM,eAAe;QAElB,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC5D,CAAC;IAEM,WAAW;QAEd,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC5D,CAAC;IAEM,KAAK;QAER,OAAO;IACX,CAAC;CACJ;AA9CD,0DA8CC"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /// <reference types="node" />
17
+ import * as Shared from '../shared';
18
+ export interface IChannelEvents extends Shared.IDefaultEvents {
19
+ close(): void;
20
+ }
21
+ export interface IChannel extends Shared.IChannelBase<IChannelEvents> {
22
+ /**
23
+ * The channel id.
24
+ */
25
+ readonly id: number;
26
+ }
27
+ export interface IRequestContext {
28
+ /**
29
+ * The channel which the request comes from.
30
+ */
31
+ readonly channel: IChannel;
32
+ }
33
+ export type IRouteApiCallback = (response: string | Buffer | Array<string | Buffer> | Shared.TelevokeError) => void;
34
+ export type IRouteLegacyApiCallback = (response: unknown | Shared.TvErrorResponse | Shared.TelevokeError) => void;
35
+ export interface IRouter {
36
+ /**
37
+ * The encoding of the API request/response.
38
+ */
39
+ readonly encoding: string;
40
+ /**
41
+ * Process an API call.
42
+ *
43
+ * @param cb The callback function of processing result.
44
+ * @param name The API name.
45
+ * @param args The API arguments.
46
+ * @param context The request context.
47
+ */
48
+ processApi(cb: IRouteApiCallback, name: string, args: Buffer[], context: IRequestContext): void;
49
+ /**
50
+ * Process an API call from legacy client.
51
+ *
52
+ * @param cb The callback function of processing result.
53
+ * @param name The API name.
54
+ * @param args The API arguments.
55
+ * @param context The request context.
56
+ */
57
+ processLegacyApi(cb: IRouteLegacyApiCallback, name: string, args: unknown, context: IRequestContext): void;
58
+ }
59
+ export interface IServerEvents extends Shared.IDefaultEvents {
60
+ channel(channel: IChannel): void;
61
+ }
62
+ export interface IServer extends Shared.IEventListener<IServerEvents> {
63
+ readonly router: IRouter;
64
+ /**
65
+ * The timeout for waiting replies of each command sent to the remote endpoint, in milliseconds.
66
+ *
67
+ * @default 60000
68
+ */
69
+ timeout: number;
70
+ /**
71
+ * Get the channel object by Id.
72
+ *
73
+ * @param channelId The channel Id.
74
+ */
75
+ getChannel(channelId: string): IChannel | null;
76
+ /**
77
+ * Get the Id list of all alive channels.
78
+ */
79
+ getChannelIdList(): string[];
80
+ }
81
+ //# sourceMappingURL=Server.decl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Server.decl.d.ts","sourceRoot":"","sources":["../../src/lib/server/Server.decl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;EAcE;;AAEF,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AAEpC,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,cAAc;IAEzD,KAAK,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,QAAS,SAAQ,MAAM,CAAC,YAAY,CAAC,cAAc,CAAC;IAEjE;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CA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Fenying <fenying@litert.org>
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ //# sourceMappingURL=Server.decl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Server.decl.js","sourceRoot":"","sources":["../../src/lib/server/Server.decl.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /// <reference types="node" />
17
+ import type * as dS from './Server.decl';
18
+ import * as Shared from '../shared';
19
+ import type * as dT from '../transporters/Transporter.decl';
20
+ import { EventEmitter } from 'node:events';
21
+ export declare class TvServer extends EventEmitter implements dS.IServer, dT.IServer {
22
+ router: dS.IRouter;
23
+ private readonly _streamManagerFactory;
24
+ private readonly _channels;
25
+ timeout: number;
26
+ constructor(router: dS.IRouter, _streamManagerFactory?: Shared.IStreamManagerFactory);
27
+ setRouter(router: dS.IRouter): void;
28
+ registerChannel(transporter: dT.ITransporter): void;
29
+ processLegacyApi(callback: dT.ILegacyApiResponseCallback, name: string, args: unknown, transporter: Shared.ITransporter): void;
30
+ getChannel(id: string): dS.IChannel | null;
31
+ getChannelIdList(): string[];
32
+ }
33
+ //# sourceMappingURL=Server.impl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Server.impl.d.ts","sourceRoot":"","sources":["../../src/lib/server/Server.impl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;EAcE;;AAEF,OAAO,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAO3C,qBAAa,QAAS,SAAQ,YAAa,YAAW,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO;IAO7D,MAAM,EAAE,EAAE,CAAC,OAAO;IACzB,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IAN1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAmC;IAEtD,OAAO,SAAU;gBAGb,MAAM,EAAE,EAAE,CAAC,OAAO,EACR,qBAAqB,GAAE,MAAM,CAAC,qBAAiE;IAK7G,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,GAAG,IAAI;IAKnC,eAAe,CAAC,WAAW,EAAE,EAAE,CAAC,YAAY,GAAG,IAAI;IAqBnD,gBAAgB,CACnB,QAAQ,EAAE,EAAE,CAAC,0BAA0B,EACvC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,MAAM,CAAC,YAAY,GACjC,IAAI;IAUA,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC,QAAQ,GAAG,IAAI;IAK1C,gBAAgB,IAAI,MAAM,EAAE;CAItC"}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.TvServer = void 0;
19
+ const Shared = require("../shared");
20
+ const node_events_1 = require("node:events");
21
+ const ServerChannel_1 = require("./ServerChannel");
22
+ const LegacyServerChannel_impl_1 = require("./LegacyServerChannel.impl");
23
+ let nextChId = Date.now();
24
+ class TvServer extends node_events_1.EventEmitter {
25
+ constructor(router, _streamManagerFactory = Shared.createSharedStreamManagerFactory()) {
26
+ super();
27
+ this.router = router;
28
+ this._streamManagerFactory = _streamManagerFactory;
29
+ this._channels = {};
30
+ this.timeout = 60000;
31
+ }
32
+ setRouter(router) {
33
+ this.router = router;
34
+ }
35
+ registerChannel(transporter) {
36
+ const id = nextChId++;
37
+ this._channels[id] = new ServerChannel_1.TvServerChannelV2(id, transporter, this.timeout, this._streamManagerFactory);
38
+ this._channels[id]
39
+ .on('api_call', (cb, name, body) => {
40
+ this.router.processApi(cb, name, body, {
41
+ channel: this._channels[id],
42
+ });
43
+ })
44
+ .on('error', (err) => this.emit('error', err))
45
+ .on('close', () => { delete this._channels[id]; });
46
+ }
47
+ processLegacyApi(callback, name, args, transporter) {
48
+ this.router.processLegacyApi(callback, name, args, { 'channel': new LegacyServerChannel_impl_1.TvLegacyServerChannelV1(transporter) });
49
+ }
50
+ getChannel(id) {
51
+ return this._channels[id] ?? null;
52
+ }
53
+ getChannelIdList() {
54
+ return Object.keys(this._channels);
55
+ }
56
+ }
57
+ exports.TvServer = TvServer;
58
+ //# sourceMappingURL=Server.impl.js.map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EAAE,GAAG,EAAE,GAAG,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3D,CAAC;IAEM,gBAAgB,CACnB,QAAuC,EACvC,IAAY,EACZ,IAAa,EACb,WAAgC;QAGhC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CACxB,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,EAAE,SAAS,EAAE,IAAI,kDAAuB,CAAC,WAAW,CAAC,EAAE,CAC1D,CAAC;IACN,CAAC;IAEM,UAAU,CAAC,EAAU;QAExB,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC;IACtC,CAAC;IAEM,gBAAgB;QAEnB,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;CACJ;AA/DD,4BA+DC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type * as dS from './Server.decl';
17
+ import { AbstractTvChannelV2 } from '../shared/Channel.impl';
18
+ export declare class TvServerChannelV2 extends AbstractTvChannelV2 implements dS.IChannel {
19
+ }
20
+ //# sourceMappingURL=ServerChannel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServerChannel.d.ts","sourceRoot":"","sources":["../../src/lib/server/ServerChannel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;EAcE;AAEF,OAAO,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,qBAAa,iBAAkB,SAAQ,mBAAoB,YAAW,EAAE,CAAC,QAAQ;CAAG"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.TvServerChannelV2 = void 0;
19
+ const Channel_impl_1 = require("../shared/Channel.impl");
20
+ class TvServerChannelV2 extends Channel_impl_1.AbstractTvChannelV2 {
21
+ }
22
+ exports.TvServerChannelV2 = TvServerChannelV2;
23
+ //# sourceMappingURL=ServerChannel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServerChannel.js","sourceRoot":"","sources":["../../src/lib/server/ServerChannel.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAGF,yDAA6D;AAE7D,MAAa,iBAAkB,SAAQ,kCAAmB;CAA0B;AAApF,8CAAoF"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /// <reference types="node" />
17
+ import type * as dS from './Server.decl';
18
+ export type ISimpleJsonApiHandler = (ctx: dS.IRequestContext, ...args: any[]) => unknown;
19
+ export type ISimpleJsonMessageHandler = (ctx: dS.IRequestContext, msg: unknown) => unknown;
20
+ export declare class SimpleJsonApiRouter implements dS.IRouter {
21
+ get encoding(): string;
22
+ private readonly _apiHandlers;
23
+ registerApi(name: string, callback: ISimpleJsonApiHandler): this;
24
+ processApi(cb: dS.IRouteApiCallback, name: string, body: Buffer[], ctx: dS.IRequestContext): void;
25
+ private _processError;
26
+ processLegacyApi(cb: dS.IRouteLegacyApiCallback, name: string, args: unknown, ctx: dS.IRequestContext): void;
27
+ }
28
+ //# sourceMappingURL=SimpleJsonApiRouter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleJsonApiRouter.d.ts","sourceRoot":"","sources":["../../src/lib/server/SimpleJsonApiRouter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;EAcE;;AAEF,OAAO,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAIzC,MAAM,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,eAAe,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC;AAEzF,MAAM,MAAM,yBAAyB,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,eAAe,EAAE,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC;AAE3F,qBAAa,mBAAoB,YAAW,EAAE,CAAC,OAAO;IAElD,IAAW,QAAQ,IAAI,MAAM,CAG5B;IAED,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA6C;IAEnE,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,qBAAqB,GAAG,IAAI;IAOhE,UAAU,CAAC,EAAE,EAAE,EAAE,CAAC,iBAAiB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,eAAe,GAAG,IAAI;IA0CxG,OAAO,CAAC,aAAa;IAiBd,gBAAgB,CACnB,EAAE,EAAE,EAAE,CAAC,uBAAuB,EAC9B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,EACb,GAAG,EAAE,EAAE,CAAC,eAAe,GACxB,IAAI;CA8BV"}
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.SimpleJsonApiRouter = void 0;
19
+ const Shared = require("../shared");
20
+ const Utils_1 = require("../shared/Utils");
21
+ class SimpleJsonApiRouter {
22
+ constructor() {
23
+ this._apiHandlers = {};
24
+ }
25
+ get encoding() {
26
+ return 'json';
27
+ }
28
+ registerApi(name, callback) {
29
+ this._apiHandlers[name] = callback;
30
+ return this;
31
+ }
32
+ processApi(cb, name, body, ctx) {
33
+ if (!this._apiHandlers[name]) {
34
+ cb(new Shared.errors.api_not_found({ name }));
35
+ return;
36
+ }
37
+ let args;
38
+ try {
39
+ args = (0, Utils_1.buffer2json)(body);
40
+ }
41
+ catch (err) {
42
+ cb(new Shared.errors.invalid_packet({ reason: 'invalid_json' }, err));
43
+ }
44
+ try {
45
+ const result = Array.isArray(args) ?
46
+ this._apiHandlers[name](ctx, ...args) :
47
+ this._apiHandlers[name](ctx, args);
48
+ if (result instanceof Promise) {
49
+ result.then((data) => { cb(JSON.stringify(data)); }, (e) => { this._processError(cb, e); });
50
+ }
51
+ else {
52
+ cb(JSON.stringify(result ?? null));
53
+ }
54
+ }
55
+ catch (e) {
56
+ this._processError(cb, e);
57
+ }
58
+ }
59
+ _processError(cb, e) {
60
+ if (e instanceof Shared.TelevokeError) {
61
+ cb(e);
62
+ return;
63
+ }
64
+ if (e instanceof Shared.TvErrorResponse) {
65
+ cb(new Shared.errors.app_error(JSON.stringify(e.data)));
66
+ return;
67
+ }
68
+ cb(new Shared.errors.app_error('null'));
69
+ }
70
+ processLegacyApi(cb, name, args, ctx) {
71
+ if (!this._apiHandlers[name]) {
72
+ cb(new Shared.errors.api_not_found({ name }));
73
+ return;
74
+ }
75
+ try {
76
+ const result = Array.isArray(args) ?
77
+ this._apiHandlers[name](ctx, ...args) :
78
+ this._apiHandlers[name](ctx, args);
79
+ if (result instanceof Promise) {
80
+ result.then((data) => { cb(data); }, (e) => { this._processError(cb, e); });
81
+ }
82
+ else {
83
+ cb(result ?? null);
84
+ }
85
+ }
86
+ catch (e) {
87
+ this._processError(cb, e);
88
+ }
89
+ }
90
+ }
91
+ exports.SimpleJsonApiRouter = SimpleJsonApiRouter;
92
+ //# sourceMappingURL=SimpleJsonApiRouter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleJsonApiRouter.js","sourceRoot":"","sources":["../../src/lib/server/SimpleJsonApiRouter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAGF,oCAAoC;AACpC,2CAA8C;AAM9C,MAAa,mBAAmB;IAAhC;QAOqB,iBAAY,GAA0C,EAAE,CAAC;IAuG9E,CAAC;IA5GG,IAAW,QAAQ;QAEf,OAAO,MAAM,CAAC;IAClB,CAAC;IAIM,WAAW,CAAC,IAAY,EAAE,QAA+B;QAE5D,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;QAEnC,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AM,IAAI,IAAI,CAAC,CAAC;aACtB;SACJ;QACD,OAAO,CAAC,EAAE;YAEN,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;SAC7B;IACL,CAAC;CACJ;AA9GD,kDA8GC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export * from './Server.decl';
17
+ export * from './Server.impl';
18
+ export * from './SimpleJsonApiRouter';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/server/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;EAcE;AAEF,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC"}