@tencentcloud/sdk-mcp 1.2.5 → 1.2.7

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 (370) hide show
  1. package/package.json +1 -1
  2. package/resource/doc/chatuikit/faq/common/server_error_code.md +74 -0
  3. package/resource/doc/chatuikit/faq/{freq_qa.md → native_sdk/faq.md} +2 -1
  4. package/resource/doc/chatuikit/faq/web_sdk/error_code.md +47 -0
  5. package/resource/doc/chatuikit/faq/web_sdk/faq.md +115 -0
  6. package/resource/doc/chatuikit/flutter/faq.md +117 -0
  7. package/resource/doc/chatuikit/iOS/faq.md +117 -0
  8. package/resource/doc/chatuikit/react/faq.md +26 -0
  9. package/resource/doc/chatuikit/vue/faq.md +35 -0
  10. package/resource/doc/livekit/faq/common/error_code.md +89 -0
  11. package/resource/doc/roomkit/common/error_code.md +67 -0
  12. package/resource/doc/rtcengine/faq/common/userSig.md +309 -0
  13. package/resource/doc/rtcengine/faq/{web.md → web/web.md} +2 -2
  14. package/resource/doc/rtcengine/faq/web_sdk/.gitkeep +0 -0
  15. package/resource/doc/rtcengine/web/{how_to_integrated_web_rtc_engine.md → how_to_integrated_web_sdk.md} +7 -2
  16. package/resource/doc/rtcengine/web/{how_to_run_web_rtc_engine_demo.md → how_to_run_web_sdk_demo.md} +1 -1
  17. package/resource/doc/tuicallkit/android/faq.md +1000 -0
  18. package/resource/doc/tuicallkit/faq/common/error_code.md +47 -0
  19. package/resource/doc/tuicallkit/flutter/faq.md +981 -0
  20. package/resource/doc/tuicallkit/{faq → iOS}/faq.md +0 -72
  21. package/resource/doc/tuicallkit/react/faq.md +986 -0
  22. package/resource/doc/tuicallkit/vue/faq.md +986 -0
  23. package/tools/call/get-native-call-integration.js +4 -10
  24. package/tools/call/get-native-call-integration.js.map +1 -1
  25. package/tools/call/get-web-call-api.js +4 -7
  26. package/tools/call/get-web-call-api.js.map +1 -1
  27. package/tools/call/get-web-call-integration.js +4 -9
  28. package/tools/call/get-web-call-integration.js.map +1 -1
  29. package/tools/chat/get-native-chat-integration.js +4 -8
  30. package/tools/chat/get-native-chat-integration.js.map +1 -1
  31. package/tools/chat/get-web-chat-component-detail.js +5 -10
  32. package/tools/chat/get-web-chat-component-detail.js.map +1 -1
  33. package/tools/chat/get-web-chat-integration.js +4 -12
  34. package/tools/chat/get-web-chat-integration.js.map +1 -1
  35. package/tools/chat/get-web-chat-uikit-init.js +5 -6
  36. package/tools/chat/get-web-chat-uikit-init.js.map +1 -1
  37. package/tools/chat/get-web-chat-window-integration.js +4 -12
  38. package/tools/chat/get-web-chat-window-integration.js.map +1 -1
  39. package/tools/chat/{create-group.js → get-web-create-group-doc.js} +5 -6
  40. package/tools/chat/get-web-create-group-doc.js.map +1 -0
  41. package/tools/common/get-faq.js +93 -0
  42. package/tools/common/get-faq.js.map +1 -0
  43. package/tools/common/get-usersig.js +9 -18
  44. package/tools/common/get-usersig.js.map +1 -1
  45. package/tools/common/present-framework-choice.js +3 -10
  46. package/tools/common/present-framework-choice.js.map +1 -1
  47. package/tools/common/record-prompt.js +5 -12
  48. package/tools/common/record-prompt.js.map +1 -1
  49. package/tools/common/record-result.js +7 -11
  50. package/tools/common/record-result.js.map +1 -1
  51. package/tools/definitions/get_faq_def.js +28 -0
  52. package/tools/definitions/get_faq_def.js.map +1 -0
  53. package/tools/definitions/get_native_call_uikit_integration_def.js +21 -0
  54. package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -0
  55. package/tools/definitions/get_native_chat_uikit_integration_def.js +21 -0
  56. package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -0
  57. package/tools/definitions/get_usersig_def.js +34 -0
  58. package/tools/definitions/get_usersig_def.js.map +1 -0
  59. package/tools/definitions/get_web_call_uikit_api_def.js +23 -0
  60. package/tools/definitions/get_web_call_uikit_api_def.js.map +1 -0
  61. package/tools/definitions/get_web_call_uikit_integration_def.js +20 -0
  62. package/tools/definitions/get_web_call_uikit_integration_def.js.map +1 -0
  63. package/tools/definitions/get_web_chat_uikit_component_detail_def.js +24 -0
  64. package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +1 -0
  65. package/tools/definitions/get_web_chat_uikit_init_def.js +23 -0
  66. package/tools/definitions/get_web_chat_uikit_init_def.js.map +1 -0
  67. package/tools/definitions/get_web_chat_uikit_integration_def.js +26 -0
  68. package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -0
  69. package/tools/definitions/get_web_chat_window_integration_def.js +26 -0
  70. package/tools/definitions/get_web_chat_window_integration_def.js.map +1 -0
  71. package/tools/definitions/get_web_create_group_doc_def.js +18 -0
  72. package/tools/definitions/get_web_create_group_doc_def.js.map +1 -0
  73. package/tools/definitions/get_web_live_state_detail_def.js +19 -0
  74. package/tools/definitions/get_web_live_state_detail_def.js.map +1 -0
  75. package/tools/definitions/get_web_live_uikit_component_detail_def.js +21 -0
  76. package/tools/definitions/get_web_live_uikit_component_detail_def.js.map +1 -0
  77. package/tools/definitions/get_web_room_state_detail_def.js +19 -0
  78. package/tools/definitions/get_web_room_state_detail_def.js.map +1 -0
  79. package/tools/definitions/present_framework_choice_def.js +24 -0
  80. package/tools/definitions/present_framework_choice_def.js.map +1 -0
  81. package/tools/definitions/record_prompt_def.js +22 -0
  82. package/tools/definitions/record_prompt_def.js.map +1 -0
  83. package/tools/definitions/record_result_def.js +22 -0
  84. package/tools/definitions/record_result_def.js.map +1 -0
  85. package/tools/index.js +13 -11
  86. package/tools/index.js.map +1 -1
  87. package/tools/live/get-web-live-component-detail.js +5 -7
  88. package/tools/live/get-web-live-component-detail.js.map +1 -1
  89. package/tools/live/get-web-live-state-detail.js +5 -7
  90. package/tools/live/get-web-live-state-detail.js.map +1 -1
  91. package/tools/room/get-web-room-state-detail.js +5 -7
  92. package/tools/room/get-web-room-state-detail.js.map +1 -1
  93. package/tools/rtcengine/get-rtcengine-web-sdk-integration.js +28 -0
  94. package/tools/rtcengine/get-rtcengine-web-sdk-integration.js.map +1 -0
  95. package/tools/rtcengine/get-trtc-sdk-faq.js +32 -0
  96. package/tools/rtcengine/get-trtc-sdk-faq.js.map +1 -0
  97. package/tools/rtcengine/get-trtc-web-sdk-api.js +28 -0
  98. package/tools/rtcengine/get-trtc-web-sdk-api.js.map +1 -0
  99. package/tools/rtcengine/get-trtc-web-sdk-faq.js +2 -3
  100. package/tools/rtcengine/get-trtc-web-sdk-faq.js.map +1 -1
  101. package/tools/rtcengine/get-trtc-web-sdk-integration.js +29 -0
  102. package/tools/rtcengine/get-trtc-web-sdk-integration.js.map +1 -0
  103. package/utils/report-cls-client.js +1 -1
  104. package/utils/report-es-client.js +1 -1
  105. package/libs/@tencent/aegis-node-sdk/CHANGELOG.md +0 -8
  106. package/libs/@tencent/aegis-node-sdk/LICENSE +0 -21
  107. package/libs/@tencent/aegis-node-sdk/README.md +0 -562
  108. package/libs/@tencent/aegis-node-sdk/lib/aegis.min.js +0 -1
  109. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/constant/config.d.ts +0 -14
  110. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/constant/global.d.ts +0 -1
  111. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/constant/index.d.ts +0 -9
  112. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/constant/report-ignore.d.ts +0 -2
  113. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/core.d.ts +0 -85
  114. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/afterRequestHooks.d.ts +0 -3
  115. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/beforeRequestHooks.d.ts +0 -9
  116. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/modifyRequestHooks.d.ts +0 -3
  117. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/index.d.ts +0 -9
  118. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/interface/config.d.ts +0 -62
  119. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/interface/env.d.ts +0 -11
  120. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/interface/index.d.ts +0 -4
  121. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/interface/log.d.ts +0 -130
  122. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/interface/send.d.ts +0 -34
  123. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/format.d.ts +0 -2
  124. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/index.d.ts +0 -18
  125. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/length-limit.d.ts +0 -8
  126. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/pv.d.ts +0 -8
  127. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/remove-payload.d.ts +0 -2
  128. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/repeat-limit.d.ts +0 -4
  129. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/report.d.ts +0 -10
  130. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/sample.d.ts +0 -3
  131. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/throttle.d.ts +0 -3
  132. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/index.d.ts +0 -34
  133. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/jwt.d.ts +0 -12
  134. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/ot-js.d.ts +0 -14
  135. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/uuid.d.ts +0 -2
  136. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/whitelist.d.ts +0 -12
  137. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/write-before.d.ts +0 -3
  138. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/plugin.d.ts +0 -33
  139. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/util/destroy.d.ts +0 -2
  140. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/util/event-emitter.d.ts +0 -18
  141. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/util/index.d.ts +0 -60
  142. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/index.d.ts +0 -15
  143. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/interface/selector.d.ts +0 -5
  144. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/pipes/batch-report-pipe.d.ts +0 -6
  145. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_base.d.ts +0 -18
  146. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_http.d.ts +0 -12
  147. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/ip_selector.d.ts +0 -10
  148. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/polaris_selector.d.ts +0 -20
  149. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/selector_base.d.ts +0 -27
  150. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/util/eval_require.d.ts +0 -2
  151. package/libs/@tencent/aegis-node-sdk/package.json +0 -19
  152. package/libs/@tencent/polaris/README.md +0 -407
  153. package/libs/@tencent/polaris/dist/consumer/health.d.ts +0 -126
  154. package/libs/@tencent/polaris/dist/consumer/health.js +0 -283
  155. package/libs/@tencent/polaris/dist/consumer/health.js.map +0 -1
  156. package/libs/@tencent/polaris/dist/consumer/index.d.ts +0 -120
  157. package/libs/@tencent/polaris/dist/consumer/index.js +0 -348
  158. package/libs/@tencent/polaris/dist/consumer/index.js.map +0 -1
  159. package/libs/@tencent/polaris/dist/consumer/monitor.d.ts +0 -145
  160. package/libs/@tencent/polaris/dist/consumer/monitor.js +0 -343
  161. package/libs/@tencent/polaris/dist/consumer/monitor.js.map +0 -1
  162. package/libs/@tencent/polaris/dist/consumer/selector.d.ts +0 -73
  163. package/libs/@tencent/polaris/dist/consumer/selector.js +0 -316
  164. package/libs/@tencent/polaris/dist/consumer/selector.js.map +0 -1
  165. package/libs/@tencent/polaris/dist/errors.d.ts +0 -373
  166. package/libs/@tencent/polaris/dist/errors.js +0 -154
  167. package/libs/@tencent/polaris/dist/errors.js.map +0 -1
  168. package/libs/@tencent/polaris/dist/global.d.ts +0 -16
  169. package/libs/@tencent/polaris/dist/global.js +0 -18
  170. package/libs/@tencent/polaris/dist/global.js.map +0 -1
  171. package/libs/@tencent/polaris/dist/index.d.ts +0 -62
  172. package/libs/@tencent/polaris/dist/index.js +0 -145
  173. package/libs/@tencent/polaris/dist/index.js.map +0 -1
  174. package/libs/@tencent/polaris/dist/instance.d.ts +0 -109
  175. package/libs/@tencent/polaris/dist/instance.js +0 -38
  176. package/libs/@tencent/polaris/dist/instance.js.map +0 -1
  177. package/libs/@tencent/polaris/dist/limiter/bucket.d.ts +0 -51
  178. package/libs/@tencent/polaris/dist/limiter/bucket.js +0 -152
  179. package/libs/@tencent/polaris/dist/limiter/bucket.js.map +0 -1
  180. package/libs/@tencent/polaris/dist/limiter/index.d.ts +0 -73
  181. package/libs/@tencent/polaris/dist/limiter/index.js +0 -149
  182. package/libs/@tencent/polaris/dist/limiter/index.js.map +0 -1
  183. package/libs/@tencent/polaris/dist/limiter/ratelimit.d.ts +0 -27
  184. package/libs/@tencent/polaris/dist/limiter/ratelimit.js +0 -134
  185. package/libs/@tencent/polaris/dist/limiter/ratelimit.js.map +0 -1
  186. package/libs/@tencent/polaris/dist/limiter/ratelimiter/base.d.ts +0 -17
  187. package/libs/@tencent/polaris/dist/limiter/ratelimiter/base.js +0 -15
  188. package/libs/@tencent/polaris/dist/limiter/ratelimiter/base.js.map +0 -1
  189. package/libs/@tencent/polaris/dist/limiter/ratelimiter/global.d.ts +0 -59
  190. package/libs/@tencent/polaris/dist/limiter/ratelimiter/global.js +0 -397
  191. package/libs/@tencent/polaris/dist/limiter/ratelimiter/global.js.map +0 -1
  192. package/libs/@tencent/polaris/dist/limiter/ratelimiter/index.d.ts +0 -3
  193. package/libs/@tencent/polaris/dist/limiter/ratelimiter/index.js +0 -19
  194. package/libs/@tencent/polaris/dist/limiter/ratelimiter/index.js.map +0 -1
  195. package/libs/@tencent/polaris/dist/limiter/ratelimiter/local.d.ts +0 -17
  196. package/libs/@tencent/polaris/dist/limiter/ratelimiter/local.js +0 -52
  197. package/libs/@tencent/polaris/dist/limiter/ratelimiter/local.js.map +0 -1
  198. package/libs/@tencent/polaris/dist/location.d.ts +0 -48
  199. package/libs/@tencent/polaris/dist/location.js +0 -67
  200. package/libs/@tencent/polaris/dist/location.js.map +0 -1
  201. package/libs/@tencent/polaris/dist/logging.d.ts +0 -106
  202. package/libs/@tencent/polaris/dist/logging.js +0 -130
  203. package/libs/@tencent/polaris/dist/logging.js.map +0 -1
  204. package/libs/@tencent/polaris/dist/metadata.d.ts +0 -78
  205. package/libs/@tencent/polaris/dist/metadata.js +0 -119
  206. package/libs/@tencent/polaris/dist/metadata.js.map +0 -1
  207. package/libs/@tencent/polaris/dist/plugins/breaker/polaris.d.ts +0 -47
  208. package/libs/@tencent/polaris/dist/plugins/breaker/polaris.js +0 -162
  209. package/libs/@tencent/polaris/dist/plugins/breaker/polaris.js.map +0 -1
  210. package/libs/@tencent/polaris/dist/plugins/lb/base.d.ts +0 -24
  211. package/libs/@tencent/polaris/dist/plugins/lb/base.js +0 -32
  212. package/libs/@tencent/polaris/dist/plugins/lb/base.js.map +0 -1
  213. package/libs/@tencent/polaris/dist/plugins/lb/edf.d.ts +0 -24
  214. package/libs/@tencent/polaris/dist/plugins/lb/edf.js +0 -77
  215. package/libs/@tencent/polaris/dist/plugins/lb/edf.js.map +0 -1
  216. package/libs/@tencent/polaris/dist/plugins/lb/hashring.d.ts +0 -24
  217. package/libs/@tencent/polaris/dist/plugins/lb/hashring.js +0 -53
  218. package/libs/@tencent/polaris/dist/plugins/lb/hashring.js.map +0 -1
  219. package/libs/@tencent/polaris/dist/plugins/lb/sticky.d.ts +0 -31
  220. package/libs/@tencent/polaris/dist/plugins/lb/sticky.js +0 -88
  221. package/libs/@tencent/polaris/dist/plugins/lb/sticky.js.map +0 -1
  222. package/libs/@tencent/polaris/dist/plugins/lb/swrr.d.ts +0 -25
  223. package/libs/@tencent/polaris/dist/plugins/lb/swrr.js +0 -72
  224. package/libs/@tencent/polaris/dist/plugins/lb/swrr.js.map +0 -1
  225. package/libs/@tencent/polaris/dist/plugins/lb/wr.d.ts +0 -17
  226. package/libs/@tencent/polaris/dist/plugins/lb/wr.js +0 -50
  227. package/libs/@tencent/polaris/dist/plugins/lb/wr.js.map +0 -1
  228. package/libs/@tencent/polaris/dist/plugins/lb/wrr.d.ts +0 -19
  229. package/libs/@tencent/polaris/dist/plugins/lb/wrr.js +0 -81
  230. package/libs/@tencent/polaris/dist/plugins/lb/wrr.js.map +0 -1
  231. package/libs/@tencent/polaris/dist/plugins/logging/console.d.ts +0 -10
  232. package/libs/@tencent/polaris/dist/plugins/logging/console.js +0 -38
  233. package/libs/@tencent/polaris/dist/plugins/logging/console.js.map +0 -1
  234. package/libs/@tencent/polaris/dist/plugins/naming/local-server/index.d.ts +0 -32
  235. package/libs/@tencent/polaris/dist/plugins/naming/local-server/index.js +0 -88
  236. package/libs/@tencent/polaris/dist/plugins/naming/local-server/index.js.map +0 -1
  237. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.d.ts +0 -124
  238. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.js +0 -398
  239. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.js.map +0 -1
  240. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.d.ts +0 -27
  241. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.js +0 -287
  242. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.js.map +0 -1
  243. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.d.ts +0 -15
  244. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.js +0 -43
  245. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.js.map +0 -1
  246. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.d.ts +0 -28
  247. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js +0 -249
  248. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js.map +0 -1
  249. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.d.ts +0 -19
  250. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js +0 -222
  251. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js.map +0 -1
  252. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.d.ts +0 -26
  253. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js +0 -99
  254. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js.map +0 -1
  255. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.d.ts +0 -60
  256. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js +0 -259
  257. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js.map +0 -1
  258. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/discover.proto +0 -24
  259. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/monitor.proto +0 -18
  260. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/ratelimit.proto +0 -12
  261. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.d.ts +0 -39
  262. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.js +0 -115
  263. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.js.map +0 -1
  264. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/api.proto +0 -24
  265. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/client.proto +0 -22
  266. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/model.proto +0 -28
  267. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/ratelimit.proto +0 -80
  268. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/request.proto +0 -18
  269. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/response.proto +0 -65
  270. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/routing.proto +0 -66
  271. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/service.proto +0 -95
  272. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/types.d.ts +0 -1568
  273. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/index.d.ts +0 -36
  274. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/index.js +0 -51
  275. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/index.js.map +0 -1
  276. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/api.proto +0 -18
  277. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/circuitbreak.proto +0 -67
  278. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/request.proto +0 -82
  279. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/response.proto +0 -11
  280. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkcache.proto +0 -46
  281. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkconfiguration.proto +0 -16
  282. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdktoken.proto +0 -10
  283. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/types.d.ts +0 -1102
  284. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/pool.d.ts +0 -29
  285. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/pool.js +0 -77
  286. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/pool.js.map +0 -1
  287. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/api.proto +0 -12
  288. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/ratelimit.proto +0 -28
  289. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/types.d.ts +0 -395
  290. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/rules.d.ts +0 -13
  291. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/rules.js +0 -116
  292. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/rules.js.map +0 -1
  293. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/types.d.ts +0 -67
  294. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/types.js +0 -67
  295. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/types.js.map +0 -1
  296. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/utils.d.ts +0 -99
  297. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/utils.js +0 -217
  298. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/utils.js.map +0 -1
  299. package/libs/@tencent/polaris/dist/plugins/registry/memory.d.ts +0 -10
  300. package/libs/@tencent/polaris/dist/plugins/registry/memory.js +0 -50
  301. package/libs/@tencent/polaris/dist/plugins/registry/memory.js.map +0 -1
  302. package/libs/@tencent/polaris/dist/plugins/router/polaris/nearby.d.ts +0 -51
  303. package/libs/@tencent/polaris/dist/plugins/router/polaris/nearby.js +0 -145
  304. package/libs/@tencent/polaris/dist/plugins/router/polaris/nearby.js.map +0 -1
  305. package/libs/@tencent/polaris/dist/plugins/router/polaris/rule.d.ts +0 -11
  306. package/libs/@tencent/polaris/dist/plugins/router/polaris/rule.js +0 -174
  307. package/libs/@tencent/polaris/dist/plugins/router/polaris/rule.js.map +0 -1
  308. package/libs/@tencent/polaris/dist/plugins/router/trpc/canary.d.ts +0 -25
  309. package/libs/@tencent/polaris/dist/plugins/router/trpc/canary.js +0 -36
  310. package/libs/@tencent/polaris/dist/plugins/router/trpc/canary.js.map +0 -1
  311. package/libs/@tencent/polaris/dist/plugins/router/trpc/env.d.ts +0 -10
  312. package/libs/@tencent/polaris/dist/plugins/router/trpc/env.js +0 -34
  313. package/libs/@tencent/polaris/dist/plugins/router/trpc/env.js.map +0 -1
  314. package/libs/@tencent/polaris/dist/plugins/router/trpc/set.d.ts +0 -56
  315. package/libs/@tencent/polaris/dist/plugins/router/trpc/set.js +0 -106
  316. package/libs/@tencent/polaris/dist/plugins/router/trpc/set.js.map +0 -1
  317. package/libs/@tencent/polaris/dist/plugins/shaping/unirate.d.ts +0 -31
  318. package/libs/@tencent/polaris/dist/plugins/shaping/unirate.js +0 -124
  319. package/libs/@tencent/polaris/dist/plugins/shaping/unirate.js.map +0 -1
  320. package/libs/@tencent/polaris/dist/plugins/shaping/warmup.d.ts +0 -61
  321. package/libs/@tencent/polaris/dist/plugins/shaping/warmup.js +0 -171
  322. package/libs/@tencent/polaris/dist/plugins/shaping/warmup.js.map +0 -1
  323. package/libs/@tencent/polaris/dist/plugins/weight/polaris.d.ts +0 -23
  324. package/libs/@tencent/polaris/dist/plugins/weight/polaris.js +0 -159
  325. package/libs/@tencent/polaris/dist/plugins/weight/polaris.js.map +0 -1
  326. package/libs/@tencent/polaris/dist/plugins.d.ts +0 -619
  327. package/libs/@tencent/polaris/dist/plugins.js +0 -91
  328. package/libs/@tencent/polaris/dist/plugins.js.map +0 -1
  329. package/libs/@tencent/polaris/dist/polaris.d.ts +0 -33
  330. package/libs/@tencent/polaris/dist/polaris.js +0 -59
  331. package/libs/@tencent/polaris/dist/polaris.js.map +0 -1
  332. package/libs/@tencent/polaris/dist/provider/index.d.ts +0 -102
  333. package/libs/@tencent/polaris/dist/provider/index.js +0 -168
  334. package/libs/@tencent/polaris/dist/provider/index.js.map +0 -1
  335. package/libs/@tencent/polaris/dist/registry.d.ts +0 -174
  336. package/libs/@tencent/polaris/dist/registry.js +0 -660
  337. package/libs/@tencent/polaris/dist/registry.js.map +0 -1
  338. package/libs/@tencent/polaris/dist/rules.d.ts +0 -163
  339. package/libs/@tencent/polaris/dist/rules.js +0 -24
  340. package/libs/@tencent/polaris/dist/rules.js.map +0 -1
  341. package/libs/@tencent/polaris/dist/scripts/postinstall.d.ts +0 -1
  342. package/libs/@tencent/polaris/dist/scripts/postinstall.js +0 -71
  343. package/libs/@tencent/polaris/dist/scripts/postinstall.js.map +0 -1
  344. package/libs/@tencent/polaris/dist/service.d.ts +0 -18
  345. package/libs/@tencent/polaris/dist/service.js +0 -3
  346. package/libs/@tencent/polaris/dist/service.js.map +0 -1
  347. package/libs/@tencent/polaris/dist/skeleton.d.ts +0 -87
  348. package/libs/@tencent/polaris/dist/skeleton.js +0 -282
  349. package/libs/@tencent/polaris/dist/skeleton.js.map +0 -1
  350. package/libs/@tencent/polaris/dist/utils.d.ts +0 -36
  351. package/libs/@tencent/polaris/dist/utils.js +0 -74
  352. package/libs/@tencent/polaris/dist/utils.js.map +0 -1
  353. package/libs/@tencent/polaris/dist/weak.d.ts +0 -11
  354. package/libs/@tencent/polaris/dist/weak.js +0 -44
  355. package/libs/@tencent/polaris/dist/weak.js.map +0 -1
  356. package/libs/@tencent/polaris/package.json +0 -114
  357. package/resource/doc/chatuikit/faq/web_qa.md +0 -118
  358. package/tools/call/get-call-faq.js +0 -29
  359. package/tools/call/get-call-faq.js.map +0 -1
  360. package/tools/chat/create-group.js.map +0 -1
  361. package/tools/chat/get-chat-faq.js +0 -29
  362. package/tools/chat/get-chat-faq.js.map +0 -1
  363. package/tools/rtcengine/get-rtcengine-web-sdk-integration-guide.js +0 -34
  364. package/tools/rtcengine/get-rtcengine-web-sdk-integration-guide.js.map +0 -1
  365. package/tools/rtcengine/get-trtc-web-sdk-integration-guide.js +0 -35
  366. package/tools/rtcengine/get-trtc-web-sdk-integration-guide.js.map +0 -1
  367. /package/resource/doc/chatuikit/{faq/sdk_qa.md → android/faq.md} +0 -0
  368. /package/{libs/@tencent/aegis-node-sdk/lib/packages/core/src/polyfill.d.ts → resource/doc/livekit/vue/faq.md} +0 -0
  369. /package/resource/doc/{chatuikit/faq/vue_qa.md → roomkit/vue/faq.md} +0 -0
  370. /package/resource/doc/rtcengine/web/{api_RTCEngine.md → api.md} +0 -0
@@ -1,282 +0,0 @@
1
- "use strict";
2
- var _a, _b, _c;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.SkeletonClass = exports.kGlobal = exports.kMaybeAlreadyDisposed = exports.kDisposed = exports.emitMaxInstancesExceededWarning = exports.isStatReporterPlugin = exports.ResultType = exports.kAPIReport = exports.kAPICollector = exports.kCollector = exports.kLogger = void 0;
5
- const errors_1 = require("./errors");
6
- const global_1 = require("./global");
7
- const logging_1 = require("./logging");
8
- const plugins_1 = require("./plugins");
9
- const utils_1 = require("./utils");
10
- exports.kLogger = Symbol("kLogger");
11
- const kInitializePlugin = Symbol("kInitializePlugin");
12
- // #region collector
13
- exports.kCollector = Symbol("kCollector");
14
- exports.kAPICollector = Symbol("kAPICollector");
15
- exports.kAPIReport = Symbol("kAPIReport");
16
- const kReportTimer = Symbol("kReportTimer");
17
- const kNeedAPICollector = Symbol("kNeedAPICollector");
18
- var ResultType;
19
- (function (ResultType) {
20
- /** 未知 */
21
- ResultType[ResultType["Unknown"] = 0] = "Unknown";
22
- /** 用户调用成功 */
23
- ResultType[ResultType["Success"] = 1] = "Success";
24
- /** 由于用户的原因,如参数错误导致的调用错误 */
25
- ResultType[ResultType["UserFail"] = 2] = "UserFail";
26
- /** 由于系统原因(SDK 或者 Server)导致用户调用失败 */
27
- ResultType[ResultType["SystemFail"] = 3] = "SystemFail";
28
- })(ResultType = exports.ResultType || (exports.ResultType = {}));
29
- const kSep = "|";
30
- const classifyCost = (cost) => {
31
- if (cost < 50) {
32
- return "[0ms,50ms)";
33
- }
34
- if (cost >= 50 && cost < 100) {
35
- return "[50ms,100ms)";
36
- }
37
- if (cost >= 100 && cost < 150) {
38
- return "[100ms,150ms)";
39
- }
40
- if (cost >= 150 && cost < 200) {
41
- return "[150ms,200ms)";
42
- }
43
- return "[200ms,)";
44
- };
45
- // #endregion
46
- // #region config
47
- const pickConfig = (plugins, result = Object.create(null)) => {
48
- Object.values(plugins).forEach((plugin) => {
49
- var _d;
50
- if (plugin === undefined) {
51
- if (plugin === plugins[plugins_1.PluginType.CircuitBreaker]) {
52
- return;
53
- }
54
- (0, utils_1.UNREACHABLE)();
55
- }
56
- if (Array.isArray(plugin)) {
57
- return pickConfig(plugin, result);
58
- }
59
- const config = (_d = plugin.getConfig) === null || _d === void 0 ? void 0 : _d.call(plugin);
60
- if (config !== undefined) {
61
- result[plugin.name] = config;
62
- }
63
- });
64
- return result;
65
- };
66
- // #endregion
67
- exports.isStatReporterPlugin = ((plugin) => (plugin.type & plugins_1.PluginType.StatReporter) !== 0);
68
- const emitMaxInstancesExceededWarning = (type, count) => {
69
- /**
70
- * 由于 `process.emitWarning` 实现中判断了传入的 `err instanceof Error`,
71
- * 而在某些场景下(如 Mock 时) `Error` 对象会被用户代码修改(替换),
72
- * 而 Node.js 所判断的对象(表达式右值)为原始 `Error` 对象(不受用户代码影响),
73
- * 导致调用时抛出 [ERR_INVALID_ARG_TYPE] 异常,
74
- * 故在这里使用 `PrimordialsError`,也就是 Node.js 原始 `Error` 对象。
75
- */
76
- const warning = new errors_1.PrimordialsError("Possible multiple useless instantiations detected. "
77
- + `Current ${type} is instantiated ${count} times. `
78
- + "Call setMaxInstances(n) to increase limit, "
79
- + "or explicit call dispose() to release instance.");
80
- warning.name = "MaxInstancesExceededWarning";
81
- warning.type = type;
82
- warning.count = count;
83
- process.emitWarning(warning);
84
- };
85
- exports.emitMaxInstancesExceededWarning = emitMaxInstancesExceededWarning;
86
- const isUserFail = (code) => code === errors_1.ErrorCodes.InvalidArgument
87
- || code === errors_1.ErrorCodes.InvalidConfig
88
- || code === errors_1.ErrorCodes.ServiceNotFound
89
- || code === errors_1.ErrorCodes.StateError
90
- || code === errors_1.ErrorCodes.ServerError /** 非 `ServerException` 均属于用户异常 */;
91
- // #region dispose
92
- exports.kDisposed = Symbol("kDisposed");
93
- exports.kMaybeAlreadyDisposed = Symbol("kMaybeAlreadyDisposed");
94
- const performDispose = (plugin) => {
95
- if (!plugin.isDisposed) {
96
- plugin.dispose();
97
- }
98
- };
99
- const disposePlugin = (plugin, sync) => {
100
- if (typeof plugin.dispose === "function") {
101
- if (sync) {
102
- performDispose(plugin);
103
- }
104
- else {
105
- process.nextTick(performDispose, plugin);
106
- }
107
- }
108
- };
109
- // #endregion
110
- exports.kGlobal = Symbol("kGlobal");
111
- /**
112
- * API 骨架类,用于 `Consumer` | `Provider` | `Limiter`
113
- */
114
- class SkeletonClass {
115
- constructor(plugins, options, logger) {
116
- this[_a] = false;
117
- this[_b] = Object.create(null);
118
- this[_c] = false;
119
- this.plugins = plugins;
120
- this[exports.kLogger] = logger !== null && logger !== void 0 ? logger : new logging_1.DefaultLogger(this.plugins[plugins_1.PluginType.TraceLogging], options);
121
- this[exports.kGlobal] = (0, global_1.createGlobalOptions)(options);
122
- this[kInitializePlugin]();
123
- let config;
124
- this.plugins[plugins_1.PluginType.StatReporter].forEach((reporter) => {
125
- var _d;
126
- (_d = reporter.systemConfig) === null || _d === void 0 ? void 0 : _d.call(reporter, config !== null && config !== void 0 ? config : (config = {
127
- system: options,
128
- plugins: pickConfig(Object.values(this.plugins))
129
- })).catch(err => this[exports.kDisposed] || this[exports.kLogger].error(`[${reporter.name}] [systemConfig]`, err));
130
- this[kNeedAPICollector] || (this[kNeedAPICollector] = typeof reporter.apiStatistics === "function");
131
- });
132
- }
133
- // #region dispose
134
- [(_a = exports.kDisposed, _b = exports.kCollector, _c = kNeedAPICollector, exports.kMaybeAlreadyDisposed)]() {
135
- if (this[exports.kDisposed]) {
136
- throw new errors_1.StateError("Already disposed");
137
- }
138
- }
139
- /**
140
- * @description
141
- * dispose order:
142
- * ... [plugins] ... -> TraceLogging
143
- *
144
- * @param sync 是否同步释放
145
- */
146
- dispose(sync) {
147
- if (this[exports.kDisposed]) {
148
- return;
149
- }
150
- this[exports.kDisposed] = true;
151
- const logging = this.plugins[plugins_1.PluginType.TraceLogging];
152
- const plugins = Object.values(this.plugins);
153
- const { length } = plugins;
154
- for (let i = 0; i <= length; i += 1) {
155
- const val = i === length ? logging : plugins[i];
156
- if (i !== length && val === logging) {
157
- continue;
158
- }
159
- if (Array.isArray(val)) {
160
- val.forEach((plugin) => disposePlugin(plugin, sync));
161
- }
162
- else {
163
- disposePlugin(val, sync);
164
- }
165
- }
166
- }
167
- // #endregion
168
- // #region logger & trace
169
- setVerbosity(verbosity) {
170
- this[exports.kLogger].setVerbosity(verbosity);
171
- }
172
- enableTracing() {
173
- this[exports.kLogger].enableTracing();
174
- }
175
- disableTracing() {
176
- this[exports.kLogger].disableTracing();
177
- }
178
- // #endregion
179
- [kInitializePlugin]() {
180
- const { globalVariables, enableReporter } = this[exports.kGlobal];
181
- if (!enableReporter) {
182
- const pluginSet = new Set();
183
- Object.entries(this.plugins).forEach(([key, val]) => {
184
- if (key !== `${plugins_1.PluginType.StatReporter}`) {
185
- if (Array.isArray(val)) {
186
- val.forEach(plugin => pluginSet.add(plugin));
187
- }
188
- else {
189
- pluginSet.add(val);
190
- }
191
- }
192
- });
193
- this.plugins[plugins_1.PluginType.StatReporter].forEach(
194
- /**
195
- * 由于 `StatReporter` 插件可能与其它插件(如:`NamingService`)实现在一个对象内,
196
- * 故需要判断对象的全局唯一性,再调用 dispose 方法
197
- */
198
- plugin => !pluginSet.has(plugin) && disposePlugin(plugin, false));
199
- this.plugins[plugins_1.PluginType.StatReporter] = [];
200
- }
201
- const logging = this.plugins[plugins_1.PluginType.TraceLogging];
202
- const logger = this[exports.kLogger];
203
- Object.values(this.plugins).forEach((val) => {
204
- var _d, _e;
205
- // fix TypeScript 4.3.2 bug
206
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
207
- if (val) {
208
- if (Array.isArray(val)) {
209
- if (val !== logging) {
210
- val.forEach((plugin) => {
211
- var _d, _e;
212
- (_d = plugin.setLogger) === null || _d === void 0 ? void 0 : _d.call(plugin, logger);
213
- (_e = plugin.setVariables) === null || _e === void 0 ? void 0 : _e.call(plugin, globalVariables);
214
- });
215
- }
216
- }
217
- else {
218
- (_d = val.setLogger) === null || _d === void 0 ? void 0 : _d.call(val, logger);
219
- (_e = val.setVariables) === null || _e === void 0 ? void 0 : _e.call(val, globalVariables);
220
- }
221
- }
222
- });
223
- }
224
- // #region API
225
- [exports.kAPICollector](api, cost, err) {
226
- if (!this[kNeedAPICollector]) {
227
- return;
228
- }
229
- let code = "0";
230
- if (typeof err !== "undefined") {
231
- if ((0, errors_1.isPolarisError)(err)) {
232
- code = err[errors_1.kErrorCode];
233
- }
234
- else {
235
- code = errors_1.ErrorCodes.InternalError;
236
- }
237
- }
238
- const key = api + kSep + classifyCost(cost) + kSep + code;
239
- const collector = this[exports.kCollector];
240
- if (collector[key] === undefined) {
241
- collector[key] = 1;
242
- }
243
- else {
244
- collector[key] += 1;
245
- }
246
- if (this[kReportTimer] === undefined) {
247
- this[kReportTimer] = setTimeout(() => {
248
- this[exports.kAPIReport]();
249
- this[kReportTimer] = undefined;
250
- }, 1 * utils_1.kMinutes).unref(); /** 上报的指标值单位为每分钟 */
251
- }
252
- }
253
- [exports.kAPIReport]() {
254
- const collector = this[exports.kCollector];
255
- this[exports.kCollector] = Object.create(null);
256
- Object.keys(collector).forEach((key) => {
257
- const [api, delay, code] = key.split(kSep);
258
- const statKey = {
259
- api,
260
- delay,
261
- code,
262
- result: ResultType.Unknown
263
- };
264
- if (code === "0") {
265
- statKey.result = ResultType.Success;
266
- }
267
- else if (isUserFail(code)) {
268
- statKey.result = ResultType.UserFail;
269
- }
270
- else {
271
- statKey.result = ResultType.SystemFail;
272
- }
273
- const statValue = collector[key];
274
- this.plugins[plugins_1.PluginType.StatReporter].forEach((reporter) => {
275
- var _d;
276
- (_d = reporter.apiStatistics) === null || _d === void 0 ? void 0 : _d.call(reporter, statKey, statValue).catch(err => this[exports.kDisposed] || this[exports.kLogger].error(`[${reporter.name}] [apiStatistics]`, err));
277
- });
278
- });
279
- }
280
- }
281
- exports.SkeletonClass = SkeletonClass;
282
- //# sourceMappingURL=skeleton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skeleton.js","sourceRoot":"","sources":["../src/skeleton.ts"],"names":[],"mappings":";;;;AAAA,qCAAgG;AAChG,qCAA8D;AAC9D,uCAAgE;AAChE,uCAA+E;AAC/E,mCAA6D;AAEhD,QAAA,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AACzC,MAAM,iBAAiB,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAEtD,oBAAoB;AACP,QAAA,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAClC,QAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AACxC,QAAA,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAC/C,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAC5C,MAAM,iBAAiB,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAEtD,IAAY,UASX;AATD,WAAY,UAAU;IACpB,SAAS;IACT,iDAAW,CAAA;IACX,aAAa;IACb,iDAAW,CAAA;IACX,2BAA2B;IAC3B,mDAAY,CAAA;IACZ,oCAAoC;IACpC,uDAAc,CAAA;AAChB,CAAC,EATW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QASrB;AAuCD,MAAM,IAAI,GAAG,GAAG,CAAC;AAEjB,MAAM,YAAY,GAAG,CAAC,IAAY,EAAU,EAAE;IAC5C,IAAI,IAAI,GAAG,EAAE,EAAE;QACb,OAAO,YAAY,CAAC;KACrB;IACD,IAAI,IAAI,IAAI,EAAE,IAAI,IAAI,GAAG,GAAG,EAAE;QAC5B,OA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AAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,iBAAS,CAAC,IAAI,IAAI,CAAC,eAAO,CAAC,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,IAAI,mBAAmB,EAAE,GAAG,CAAC,CAAC,CAAC;YAC/I,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CAEF;AAxLD,sCAwLC"}
@@ -1,36 +0,0 @@
1
- export declare const kModuleVersion: string;
2
- export declare const kModuleName: string;
3
- export declare const kNanos = 1000;
4
- export declare const kMillisecond = 1;
5
- export declare const kSeconds: number;
6
- export declare const kMinutes: number;
7
- export declare const kHours: number;
8
- export declare const kDays: number;
9
- /**
10
- * 求最大公约数
11
- * @param values 数值
12
- */
13
- export declare function GreatestCommonDivisor(...values: number[]): number;
14
- /**
15
- * 判断开关是否开启
16
- * @param it 开关字符串
17
- */
18
- export declare function on(it?: string): boolean;
19
- /**
20
- * UNREACHABLE CODE
21
- */
22
- export declare function UNREACHABLE(): never;
23
- /**
24
- * UNIMPLEMENTED
25
- */
26
- export declare function UNIMPLEMENTED(): never;
27
- export declare type PartialSubset<T, U extends keyof T = never> = {
28
- [P in keyof T]: P extends U ? Partial<T[P]> : T[P];
29
- };
30
- export declare type RequireKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
31
- export declare type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
32
- export declare type RemoveNever<T> = Pick<T, {
33
- [K in keyof T]: T[K] extends never ? never : K;
34
- }[keyof T]>;
35
- export declare type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
36
- export declare type PromiseConstructorParameters = Parameters<ConstructorParameters<typeof Promise>[0]>;
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UNIMPLEMENTED = exports.UNREACHABLE = exports.on = exports.GreatestCommonDivisor = exports.kDays = exports.kHours = exports.kMinutes = exports.kSeconds = exports.kMillisecond = exports.kNanos = exports.kModuleName = exports.kModuleVersion = void 0;
4
- const errors_1 = require("./errors");
5
- // #region Module Info
6
- /* eslint-disable @typescript-eslint/naming-convention */
7
- /*
8
- * note:
9
- * 由于这里引用了 `src` 外文件,导致在构建时输出目录不正确
10
- * 所以这里使用 require(...) 来代替 import ...
11
- */
12
- const pkg = require("../package.json"); // eslint-disable-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
13
- exports.kModuleVersion = pkg.version;
14
- exports.kModuleName = pkg.name;
15
- /* eslint-enable @typescript-eslint/naming-convention */
16
- // #endregion
17
- // #region Time Constant
18
- /* eslint-disable @typescript-eslint/naming-convention */
19
- exports.kNanos = 1000;
20
- exports.kMillisecond = 1;
21
- exports.kSeconds = 1000 * exports.kMillisecond;
22
- exports.kMinutes = 60 * exports.kSeconds;
23
- exports.kHours = 60 * exports.kMinutes;
24
- exports.kDays = 24 * exports.kHours;
25
- /* eslint-enable @typescript-eslint/naming-convention */
26
- // #endregion
27
- // #region Functions
28
- /**
29
- * 求最大公约数
30
- * @param values 数值
31
- */
32
- function GreatestCommonDivisor(...values) {
33
- const len = values.length;
34
- while (values.some(value => value !== values[0])) {
35
- values.sort((a, b) => b - a);
36
- for (let i = 0; i < len - 1; i++) {
37
- const remains = values[i] % values[i + 1];
38
- if (remains === 0) {
39
- values[i] = values[i + 1];
40
- }
41
- else {
42
- values[i] = remains;
43
- }
44
- }
45
- }
46
- return values[0] || NaN;
47
- }
48
- exports.GreatestCommonDivisor = GreatestCommonDivisor;
49
- /**
50
- * 判断开关是否开启
51
- * @param it 开关字符串
52
- */
53
- function on(it) {
54
- return !!it && it !== "0" && it !== "false" && it !== "off";
55
- }
56
- exports.on = on;
57
- // #endregion
58
- // #region Assert Method
59
- /**
60
- * UNREACHABLE CODE
61
- */
62
- function UNREACHABLE() {
63
- throw new errors_1.FatalError("UNREACHABLE CODE", UNREACHABLE);
64
- }
65
- exports.UNREACHABLE = UNREACHABLE;
66
- /**
67
- * UNIMPLEMENTED
68
- */
69
- function UNIMPLEMENTED() {
70
- throw new errors_1.FatalError("UNIMPLEMENTED", UNIMPLEMENTED);
71
- }
72
- exports.UNIMPLEMENTED = UNIMPLEMENTED;
73
- // #endregion
74
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AAEtC,sBAAsB;AACtB,yDAAyD;AACzD;;;;GAIG;AACH,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAA4B,CAAC,CAAC,gGAAgG;AAEtJ,QAAA,cAAc,GAAG,GAAG,CAAC,OAAiB,CAAC;AACvC,QAAA,WAAW,GAAG,GAAG,CAAC,IAAc,CAAC;AAC9C,wDAAwD;AACxD,aAAa;AAEb,wBAAwB;AACxB,yDAAyD;AAC5C,QAAA,MAAM,GAAG,IAAK,CAAC;AACf,QAAA,YAAY,GAAG,CAAC,CAAC;AACjB,QAAA,QAAQ,GAAG,IAAK,GAAG,oBAAY,CAAC;AAChC,QAAA,QAAQ,GAAG,EAAE,GAAG,gBAAQ,CAAC;AACzB,QAAA,MAAM,GAAG,EAAE,GAAG,gBAAQ,CAAC;AACvB,QAAA,KAAK,GAAG,EAAE,GAAG,cAAM,CAAC;AACjC,wDAAwD;AACxD,aAAa;AAEb,oBAAoB;AACpB;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,GAAG,MAAgB;IACvD,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;IAC1B,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;QAChD,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YAChC,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YAC1C,IAAI,OAAO,KAAK,CAAC,EAAE;gBACjB,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;aAC3B;iBAAM;gBACL,MAAM,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;aACrB;SACF;KACF;IAED,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;AAC1B,CAAC;AAfD,sDAeC;AAED;;;GAGG;AACH,SAAgB,EAAE,CAAC,EAAW;IAC5B,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,OAAO,IAAI,EAAE,KAAK,KAAK,CAAC;AAC9D,CAAC;AAFD,gBAEC;AACD,aAAa;AAEb,wBAAwB;AACxB;;GAEG;AACH,SAAgB,WAAW;IACzB,MAAM,IAAI,mBAAU,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC;AACxD,CAAC;AAFD,kCAEC;AAED;;GAEG;AACH,SAAgB,aAAa;IAC3B,MAAM,IAAI,mBAAU,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;AACvD,CAAC;AAFD,sCAEC;AAkBD,aAAa"}
@@ -1,11 +0,0 @@
1
- export interface WeakReference<T> {
2
- equal(value: T): boolean;
3
- find(values: T[]): T | undefined;
4
- reset(target: T): WeakReference<T>;
5
- }
6
- declare type WeakReferenceConstructor = new <T extends object>(target: T) => WeakReference<T>;
7
- /**
8
- * `WeakReference` 提供 Weak 类型容器,用于兼容不支持 `WeakRef` 环境
9
- */
10
- export declare const WeakReference: WeakReferenceConstructor;
11
- export {};
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WeakReference = void 0;
4
- /**
5
- * `WeakReference` 提供 Weak 类型容器,用于兼容不支持 `WeakRef` 环境
6
- */
7
- exports.WeakReference = (typeof WeakRef === "function")
8
- ? class {
9
- constructor(target) {
10
- this.ref = new WeakRef(target);
11
- }
12
- reset(target) {
13
- this.ref = new WeakRef(target);
14
- return this;
15
- }
16
- equal(value) {
17
- return this.ref.deref() === value;
18
- }
19
- find(values) {
20
- const target = this.ref.deref();
21
- if (target === undefined) {
22
- return undefined;
23
- }
24
- return values.includes(target) ? target : undefined;
25
- }
26
- }
27
- : class {
28
- constructor(target) {
29
- this.ref = new WeakSet();
30
- this.ref.add(target);
31
- }
32
- reset(target) {
33
- this.ref.add(target);
34
- return this;
35
- }
36
- equal(value) {
37
- return this.ref.has(value);
38
- }
39
- find(values) {
40
- return values.find(value => this.ref.has(value));
41
- }
42
- };
43
- // #endregion
44
- //# sourceMappingURL=weak.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"weak.js","sourceRoot":"","sources":["../src/weak.ts"],"names":[],"mappings":";;;AAmBA;;GAEG;AACU,QAAA,aAAa,GAA6B,CAAC,OAAO,OAAO,KAAK,UAAU,CAAC;IACpF,CAAC,CAAC;QAGA,YAAY,MAAS;YACnB,IAAI,CAAC,GAAG,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;QACjC,CAAC;QAED,KAAK,CAAC,MAAS;YACb,IAAI,CAAC,GAAG,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;YAC/B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,KAAK,CAAC,KAAQ;YACZ,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,CAAC;QACpC,CAAC;QAED,IAAI,CAAC,MAAW;YACd,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;YAChC,IAAI,MAAM,KAAK,SAAS,EAAE;gBACxB,OAAO,SAAS,CAAC;aAClB;YACD,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;QACtD,CAAC;KACF;IACD,CAAC,CAAC;QAGA,YAAY,MAAS;YAFJ,QAAG,GAAe,IAAI,OAAO,EAAE,CAAC;YAG/C,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;QAED,KAAK,CAAC,MAAS;YACb,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACrB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,KAAK,CAAC,KAAQ;YACZ,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,MAAW;YACd,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;QACnD,CAAC;KACF,CAAC;AACJ,aAAa"}
@@ -1,114 +0,0 @@
1
- {
2
- "name": "@tencent/polaris",
3
- "version": "0.4.5",
4
- "description": "Polaris(北极星)名字服务 SDK",
5
- "author": "superzheng <superzheng@tencent.com>",
6
- "license": "MIT",
7
- "main": "dist/index.js",
8
- "types": "dist/index.d.ts",
9
- "files": [
10
- "dist"
11
- ],
12
- "repository": {
13
- "type": "git",
14
- "url": "http://git.woa.com/polaris/polaris-nodejs.git"
15
- },
16
- "funding": "wxwork://message?username=superzheng",
17
- "bugs": "https://git.woa.com/polaris/polaris-nodejs/issues",
18
- "homepage": "https://git.woa.com/polaris/polaris-nodejs",
19
- "keywords": [
20
- "polaris"
21
- ],
22
- "scripts": {
23
- "build": "npm run lint && npm run clean && npm run build:src && npm run build:scripts && npm run pb:ts && npm run pb:dist:base && npm run pb:dist:grpc",
24
- "build:src": "tsc -p tsconfig.json",
25
- "build:scripts": "tsc -p tsconfig.scripts.json",
26
- "coverage": "cross-env NODE_ENV=test nyc ava",
27
- "clean": "shx rm -rf .nyc-output coverage dist",
28
- "lint": "eslint --max-warnings=0 \"@(src|test|tools)/**/*.@(js|ts)\"",
29
- "check": "npm run build",
30
- "test": "cross-env NODE_ENV=test ava",
31
- "pb:ts": "ts-node ./tools/pb2ts.ts src/plugins/naming/polaris-server/discover-pb src/plugins/naming/polaris-server/monitor-pb src/plugins/naming/polaris-server/ratelimit-pb",
32
- "pb:dist:base": "shx cp -r src/plugins/naming/polaris-server/discover-pb src/plugins/naming/polaris-server/monitor-pb src/plugins/naming/polaris-server/ratelimit-pb dist/plugins/naming/polaris-server/",
33
- "pb:dist:grpc": "shx cp -r src/plugins/naming/polaris-server/connector/grpc/pb dist/plugins/naming/polaris-server/connector/grpc/pb",
34
- "lines": "bash -c \"find . -name \\*.ts | grep -v -E tools\\|test\\|node_modules\\|.d.ts | xargs cat | wc -l\"",
35
- "postinstall": "node -e \"try{require('./dist/scripts/postinstall')}catch(e){}\""
36
- },
37
- "devDependencies": {
38
- "@commitlint/cli": "^16.1.0",
39
- "@commitlint/config-conventional": "^16.0.0",
40
- "@hjkcai/eslint-config-halo": "^8.6.3",
41
- "@types/debug": "^4.1.5",
42
- "@types/node": "^17.0.10",
43
- "@types/semver": "^7.3.9",
44
- "@types/sinon": "^10.0.6",
45
- "@types/uuid": "^8.3.4",
46
- "ava": "^4.0.1",
47
- "cross-env": "^7.0.3",
48
- "eslint": "^8.7.0",
49
- "husky": "^7.0.4",
50
- "nyc": "^15.1.0",
51
- "shx": "^0.3.4",
52
- "sinon": "^12.0.1",
53
- "tmp-promise": "^3.0.3",
54
- "ts-node": "^10.4.0",
55
- "typescript": "^4.4.5"
56
- },
57
- "husky": {
58
- "hooks": {
59
- "commit-msg": "commitlint -e .git/COMMIT_EDITMSG",
60
- "pre-push": "npm run check"
61
- }
62
- },
63
- "nyc": {
64
- "extension": [
65
- ".ts"
66
- ],
67
- "include": [
68
- "src/**/*.ts"
69
- ],
70
- "exclude": [
71
- "**/*.d.ts"
72
- ],
73
- "reporter": [
74
- "lcov",
75
- "text",
76
- "text-summary"
77
- ]
78
- },
79
- "ava": {
80
- "extensions": [
81
- "ts"
82
- ],
83
- "require": [
84
- "ts-node/register"
85
- ],
86
- "files": [
87
- "test/**/*.test.ts"
88
- ],
89
- "ignoredByWatcher": [
90
- "!src/**/*.ts"
91
- ]
92
- },
93
- "commitlint": {
94
- "extends": [
95
- "@commitlint/config-conventional"
96
- ],
97
- "rules": {
98
- "subject-case": [
99
- 0
100
- ]
101
- }
102
- },
103
- "dependencies": {
104
- "@grpc/grpc-js": "^1.5.1",
105
- "@grpc/proto-loader": "^0.6.6",
106
- "@types/hashring": "^3.2.1",
107
- "axios": "^0.25.0",
108
- "debug": "^4.3.1",
109
- "hashring": "^3.2.0",
110
- "protobufjs": "^6.11.2",
111
- "semver": "^7.3.5",
112
- "uuid": "^8.3.2"
113
- }
114
- }