javonet-ruby-sdk 2.5.15 → 2.5.16

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 (312) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/javonet-ruby-sdk/Binaries/Jvm/JavonetJvmRuntime.jar +0 -0
  4. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetActivationService.so +0 -0
  5. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libUtils.so +0 -0
  6. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/version.txt +1 -1
  7. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetActivationService.so +0 -0
  8. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNodejs1816RuntimeNative.so +0 -0
  9. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libUtils.so +0 -0
  10. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/version.txt +1 -1
  11. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetActivationService.dylib +0 -0
  12. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejs1816RuntimeNative.dylib +0 -0
  13. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libUtils.dylib +0 -0
  14. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/version.txt +1 -1
  15. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetActivationService.dll +0 -0
  16. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetCppRuntimeNative.dll +0 -0
  17. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetGoRuntimeNative.dll +0 -0
  18. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetJvmRuntimeNative.dll +0 -0
  19. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetNetcoreRuntimeNative.dll +0 -0
  20. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetPhpRuntimeNative.dll +0 -0
  21. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetPythonRuntimeNative.dll +0 -0
  22. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetRuby278RuntimeNative.dll +0 -0
  23. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetRubyRuntimeNative.dll +0 -0
  24. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpClient.dll +0 -0
  25. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpTlsClient.dll +0 -0
  26. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/Utils.dll +0 -0
  27. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/version.txt +0 -0
  28. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetActivationService.dll +0 -0
  29. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetClrRuntimeNative.dll +0 -0
  30. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetCppRuntimeNative.dll +0 -0
  31. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetGoRuntimeNative.dll +0 -0
  32. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetJvmRuntimeNative.dll +0 -0
  33. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNetcoreRuntimeNative.dll +0 -0
  34. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejs1816RuntimeNative.dll +0 -0
  35. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejsRuntimeNative.dll +0 -0
  36. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPerlRuntimeNative.dll +0 -0
  37. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPhpRuntimeNative.dll +0 -0
  38. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPython2RuntimeNative.dll +0 -0
  39. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPythonRuntimeNative.dll +0 -0
  40. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRuby278RuntimeNative.dll +0 -0
  41. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRubyRuntimeNative.dll +0 -0
  42. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpClient.dll +0 -0
  43. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpTlsClient.dll +0 -0
  44. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/Utils.dll +0 -0
  45. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/version.txt +1 -1
  46. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetActivationService.dll +0 -0
  47. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetClrRuntimeNative.dll +0 -0
  48. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetCppRuntimeNative.dll +0 -0
  49. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetGoRuntimeNative.dll +0 -0
  50. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetJvmRuntimeNative.dll +0 -0
  51. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetNetcoreRuntimeNative.dll +0 -0
  52. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPhpRuntimeNative.dll +0 -0
  53. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPython2RuntimeNative.dll +0 -0
  54. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPythonRuntimeNative.dll +0 -0
  55. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpClient.dll +0 -0
  56. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpTlsClient.dll +0 -0
  57. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/Utils.dll +0 -0
  58. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/version.txt +1 -1
  59. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/delegatesCache/DelegatesCache.cjs +59 -0
  60. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/AbstractHandler.cjs +62 -0
  61. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/ArrayGetItemHandler.cjs +61 -0
  62. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/ArrayGetRankHandler.cjs +52 -0
  63. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/ArrayGetSizeHandler.cjs +52 -0
  64. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/ArrayHandler.cjs +41 -0
  65. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/ArraySetItemHandler.cjs +62 -0
  66. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/CastingHandler.cjs +34 -0
  67. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/ConvertTypeHandler.cjs +53 -0
  68. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/CreateClassInstanceHandler.cjs +62 -0
  69. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/DestructReferenceHandler.cjs +42 -0
  70. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/EnableNamespaceHandler.cjs +56 -0
  71. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/EnableTypeHandler.cjs +58 -0
  72. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/GetGlobalStaticFieldHandler.cjs +62 -0
  73. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/GetInstanceFieldHandler.cjs +61 -0
  74. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/GetInstanceMethodAsDelegateHandler.cjs +83 -0
  75. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/GetStaticFieldHandler.cjs +61 -0
  76. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/GetStaticMethodAsDelegateHandler.cjs +85 -0
  77. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/GetTypeHandler.cjs +87 -0
  78. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/Handler.cjs +136 -0
  79. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/InvokeDelegateHandler.cjs +53 -0
  80. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/InvokeGlobalFunctionHandler.cjs +62 -0
  81. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/InvokeInstanceMethodHandler.cjs +64 -0
  82. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/InvokeStaticMethodHandler.cjs +64 -0
  83. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/LoadLibraryHandler.cjs +71 -0
  84. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/PassDelegateHandler.cjs +164 -0
  85. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/ResolveReferenceHandler.cjs +41 -0
  86. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/SetGlobalStaticFieldHandler.cjs +63 -0
  87. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/SetInstanceFieldHandler.cjs +61 -0
  88. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/SetStaticFieldHandler.cjs +59 -0
  89. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/ValueHandler.cjs +37 -0
  90. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/interpreter/Interpreter.cjs +163 -0
  91. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/namespaceCache/NamespaceCache.cjs +61 -0
  92. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/protocol/CommandDeserializer.cjs +188 -0
  93. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/protocol/CommandSerializer.cjs +64 -0
  94. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/protocol/TypeDeserializer.cjs +91 -0
  95. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/protocol/TypeSerializer.cjs +153 -0
  96. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/receiver/Receiver.cjs +65 -0
  97. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/receiver/ReceiverNative.cjs +37 -0
  98. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/referenceCache/ReferencesCache.cjs +65 -0
  99. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/transmitter/Transmitter.cjs +44 -0
  100. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/transmitter/TransmitterWebsocket.cjs +55 -0
  101. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/transmitter/TransmitterWebsocketBrowser.cjs +59 -0
  102. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/transmitter/TransmitterWrapper.cjs +75 -0
  103. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/typeCache/TypeCache.cjs +61 -0
  104. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/webSocketClient/WebSocketClient.cjs +150 -0
  105. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/webSocketClient/WebSocketClientBrowser.cjs +153 -0
  106. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/ConfigRuntimeFactory.cjs +209 -0
  107. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/InvocationContext.cjs +495 -0
  108. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/Javonet.cjs +150 -0
  109. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/RuntimeContext.cjs +304 -0
  110. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/RuntimeFactory.cjs +98 -0
  111. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/tools/browser/ConfigSourceResolver.cjs +153 -0
  112. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/tools/browser/SdkExceptionHelper.cjs +37 -0
  113. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/tools/nodejs/JsonFileResolver.cjs +120 -0
  114. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/tools/nodejs/SdkExceptionHelper.cjs +100 -0
  115. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/delegatesCache/DelegatesCache.d.ts +21 -0
  116. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/AbstractHandler.d.ts +7 -0
  117. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/ArrayGetItemHandler.d.ts +5 -0
  118. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/ArrayGetRankHandler.d.ts +5 -0
  119. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/ArrayGetSizeHandler.d.ts +5 -0
  120. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/ArrayHandler.d.ts +4 -0
  121. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/ArraySetItemHandler.d.ts +5 -0
  122. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/CastingHandler.d.ts +3 -0
  123. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/ConvertTypeHandler.d.ts +22 -0
  124. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/CreateClassInstanceHandler.d.ts +5 -0
  125. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/DestructReferenceHandler.d.ts +4 -0
  126. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/EnableNamespaceHandler.d.ts +5 -0
  127. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/EnableTypeHandler.d.ts +5 -0
  128. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/GetGlobalStaticFieldHandler.d.ts +5 -0
  129. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/GetInstanceFieldHandler.d.ts +5 -0
  130. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/GetInstanceMethodAsDelegateHandler.d.ts +38 -0
  131. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/GetStaticFieldHandler.d.ts +5 -0
  132. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/GetStaticMethodAsDelegateHandler.d.ts +36 -0
  133. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/GetTypeHandler.d.ts +16 -0
  134. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/Handler.d.ts +27 -0
  135. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/InvokeDelegateHandler.d.ts +15 -0
  136. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/InvokeGlobalFunctionHandler.d.ts +5 -0
  137. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/InvokeInstanceMethodHandler.d.ts +5 -0
  138. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/InvokeStaticMethodHandler.d.ts +5 -0
  139. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/LoadLibraryHandler.d.ts +7 -0
  140. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/PassDelegateHandler.d.ts +104 -0
  141. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/ResolveReferenceHandler.d.ts +12 -0
  142. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/SetGlobalStaticFieldHandler.d.ts +4 -0
  143. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/SetInstanceFieldHandler.d.ts +5 -0
  144. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/SetStaticFieldHandler.d.ts +5 -0
  145. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/ValueHandler.d.ts +4 -0
  146. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/interpreter/Interpreter.d.ts +27 -0
  147. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/namespaceCache/NamespaceCache.d.ts +9 -0
  148. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/protocol/CommandDeserializer.d.ts +25 -0
  149. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/protocol/CommandSerializer.d.ts +4 -0
  150. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/protocol/TypeDeserializer.d.ts +15 -0
  151. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/protocol/TypeSerializer.d.ts +17 -0
  152. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/receiver/Receiver.d.ts +14 -0
  153. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/receiver/ReceiverNative.d.ts +4 -0
  154. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/referenceCache/ReferencesCache.d.ts +24 -0
  155. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/transmitter/Transmitter.d.ts +6 -0
  156. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/transmitter/TransmitterWebsocket.d.ts +21 -0
  157. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/transmitter/TransmitterWebsocketBrowser.d.ts +30 -0
  158. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/transmitter/TransmitterWrapper.d.ts +11 -0
  159. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/typeCache/TypeCache.d.ts +9 -0
  160. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/webSocketClient/WebSocketClient.d.ts +50 -0
  161. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/webSocketClient/WebSocketClientBrowser.d.ts +63 -0
  162. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{lib/sdk/ConfigRuntimeFactory.js → dist/types/sdk/ConfigRuntimeFactory.d.ts} +19 -101
  163. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/InvocationContext.d.ts +207 -0
  164. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{lib/sdk/Javonet.js → dist/types/sdk/Javonet.d.ts} +17 -59
  165. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/RuntimeContext.d.ts +103 -0
  166. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{lib/sdk/RuntimeFactory.js → dist/types/sdk/RuntimeFactory.d.ts} +12 -41
  167. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/tools/browser/ConfigSourceResolver.d.ts +46 -0
  168. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/tools/browser/SdkExceptionHelper.d.ts +7 -0
  169. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/tools/nodejs/JsonFileResolver.d.ts +13 -0
  170. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/tools/nodejs/SdkExceptionHelper.d.ts +6 -0
  171. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/Command.d.ts +42 -0
  172. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/CommandType.d.ts +44 -0
  173. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/ConnectionType.d.ts +5 -0
  174. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/CustomError.d.ts +3 -0
  175. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/ExceptionType.d.ts +10 -0
  176. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/Runtime.d.ts +24 -0
  177. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/RuntimeLogger.d.ts +5 -0
  178. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/RuntimeLoggerBrowser.d.ts +15 -0
  179. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/RuntimeName.d.ts +13 -0
  180. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/RuntimeNameHandler.d.ts +7 -0
  181. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/StringEncodingMode.d.ts +6 -0
  182. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/Type.d.ts +14 -0
  183. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/connectionData/IConnectionData.d.ts +5 -0
  184. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/connectionData/InMemoryConnectionData.d.ts +16 -0
  185. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/connectionData/WsConnectionData.d.ts +31 -0
  186. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/exception/ExceptionSerializer.d.ts +6 -0
  187. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/exception/ExceptionThrower.d.ts +4 -0
  188. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/guid/generateGuid.d.ts +1 -0
  189. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/nodejs/TypesConverter.d.ts +48 -0
  190. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/nodejs/connectionData/TcpConnectionData.d.ts +25 -0
  191. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/nodejs/uuid/REGEX.d.ts +1 -0
  192. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/nodejs/uuid/rng.d.ts +1 -0
  193. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/nodejs/uuid/stringify.d.ts +1 -0
  194. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/nodejs/uuid/v4.d.ts +1 -0
  195. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/nodejs/uuid/validate.d.ts +1 -0
  196. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/Command.cjs +87 -0
  197. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/CommandType.cjs +74 -0
  198. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/ConnectionType.cjs +35 -0
  199. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/CustomError.cjs +33 -0
  200. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/ExceptionType.cjs +40 -0
  201. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/Runtime.cjs +103 -0
  202. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/RuntimeLogger.cjs +63 -0
  203. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/RuntimeLoggerBrowser.cjs +58 -0
  204. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/RuntimeName.cjs +43 -0
  205. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/RuntimeNameHandler.cjs +62 -0
  206. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/StringEncodingMode.cjs +36 -0
  207. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/Type.cjs +44 -0
  208. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/connectionData/IConnectionData.cjs +38 -0
  209. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/connectionData/InMemoryConnectionData.cjs +52 -0
  210. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/connectionData/WsConnectionData.cjs +61 -0
  211. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/exception/ExceptionSerializer.cjs +82 -0
  212. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/exception/ExceptionThrower.cjs +111 -0
  213. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/guid/generateGuid.cjs +34 -0
  214. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/nodejs/TypesConverter.cjs +102 -0
  215. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/nodejs/connectionData/TcpConnectionData.cjs +111 -0
  216. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/nodejs/uuid/REGEX.cjs +28 -0
  217. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/nodejs/uuid/rng.cjs +47 -0
  218. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/nodejs/uuid/stringify.cjs +39 -0
  219. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/nodejs/uuid/v4.cjs +43 -0
  220. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/nodejs/uuid/validate.cjs +31 -0
  221. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Class/Load/XS/XS.so +0 -0
  222. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Data/UUID/UUID.so +0 -0
  223. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/FFI/Platypus/Platypus.so +0 -0
  224. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Moose/Moose.so +0 -0
  225. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/PPI/XS/XS.so +0 -0
  226. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Package/Stash/XS/XS.so +0 -0
  227. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Params/Util/Util.so +0 -0
  228. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Want/Want.so +0 -0
  229. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/share/dist/FFI-Platypus/lib/libplfill.so +0 -0
  230. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod +90 -90
  231. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Data/UUID/UUID.xs.dll +0 -0
  232. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/PPI/XS/XS.xs.dll +0 -0
  233. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Scalar/Util/Numeric/Numeric.xs.dll +0 -0
  234. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Want/Want.xs.dll +0 -0
  235. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/autobox/autobox.xs.dll +0 -0
  236. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/perllocal.pod +26 -26
  237. data/lib/javonet-ruby-sdk/Binaries/version.txt +1 -1
  238. metadata +164 -79
  239. data/lib/javonet-ruby-sdk/Binaries/Nodejs/index.js +0 -66
  240. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/delegatesCache/DelegatesCache.js +0 -35
  241. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/AbstractHandler.js +0 -41
  242. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/ArrayGetItemHandler.js +0 -38
  243. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/ArrayGetRankHandler.js +0 -28
  244. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/ArrayGetSizeHandler.js +0 -29
  245. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/ArrayHandler.js +0 -18
  246. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/ArraySetItemHandler.js +0 -43
  247. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/CastingHandler.js +0 -10
  248. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/ConvertTypeHandler.js +0 -38
  249. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/CreateClassInstanceHandler.js +0 -36
  250. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/DestructReferenceHandler.js +0 -19
  251. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/EnableNamespaceHandler.js +0 -34
  252. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/EnableTypeHandler.js +0 -35
  253. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/GetGlobalStaticFieldHandler.js +0 -37
  254. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/GetInstanceFieldHandler.js +0 -35
  255. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/GetInstanceMethodAsDelegateHandler.js +0 -73
  256. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/GetStaticFieldHandler.js +0 -36
  257. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/GetStaticMethodAsDelegateHandler.js +0 -74
  258. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/GetTypeHandler.js +0 -63
  259. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/Handler.js +0 -98
  260. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/InvokeDelegateHandler.js +0 -36
  261. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/InvokeGlobalFunctionHandler.js +0 -39
  262. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/InvokeInstanceMethodHandler.js +0 -38
  263. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/InvokeStaticMethodHandler.js +0 -38
  264. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/LoadLibraryHandler.js +0 -48
  265. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/PassDelegateHandler.js +0 -157
  266. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/ResolveReferenceHandler.js +0 -13
  267. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/SetGlobalStaticFieldHandler.js +0 -38
  268. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/SetInstanceFieldHandler.js +0 -35
  269. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/SetStaticFieldHandler.js +0 -33
  270. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/ValueHandler.js +0 -13
  271. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/interpreter/Interpreter.js +0 -142
  272. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/namespaceCache/NamespaceCache.js +0 -39
  273. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/protocol/CommandDeserializer.js +0 -181
  274. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/protocol/CommandSerializer.js +0 -50
  275. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/protocol/TypeDeserializer.js +0 -83
  276. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/protocol/TypeSerializer.js +0 -143
  277. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/receiver/Receiver.js +0 -32
  278. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/receiver/ReceiverNative.js +0 -13
  279. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/referenceCache/ReferencesCache.js +0 -30
  280. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/transmitter/Transmitter.js +0 -21
  281. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/transmitter/TransmitterWebsocket.js +0 -33
  282. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/transmitter/TransmitterWrapper.js +0 -47
  283. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/typeCache/TypeCache.js +0 -39
  284. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/webSocketClient/WebSocketClient.js +0 -136
  285. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/declarations.d.ts +0 -64
  286. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/InvocationContext.js +0 -485
  287. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/RuntimeContext.js +0 -300
  288. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/tools/JsonFileResolver.js +0 -101
  289. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/tools/SdkExceptionHelper.js +0 -79
  290. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/Command.js +0 -69
  291. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/CommandType.js +0 -47
  292. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/ConnectionType.js +0 -8
  293. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/CustomError.js +0 -8
  294. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/ExceptionType.js +0 -13
  295. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/RuntimeLogger.js +0 -30
  296. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/RuntimeName.js +0 -16
  297. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/RuntimeNameHandler.js +0 -38
  298. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/StringEncodingMode.js +0 -9
  299. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/Type.js +0 -17
  300. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/TypesConverter.js +0 -91
  301. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/connectionData/IConnectionData.js +0 -15
  302. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/connectionData/InMemoryConnectionData.js +0 -35
  303. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/connectionData/TcpConnectionData.js +0 -77
  304. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/connectionData/WsConnectionData.js +0 -50
  305. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/exception/ExceptionSerializer.js +0 -64
  306. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/exception/ExceptionThrower.js +0 -95
  307. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/guid/generateGuid.js +0 -9
  308. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/uuid/REGEX.js +0 -2
  309. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/uuid/rng.js +0 -12
  310. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/uuid/stringify.js +0 -51
  311. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/uuid/v4.js +0 -27
  312. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/uuid/validate.js +0 -6
@@ -0,0 +1,495 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __typeError = (msg) => {
7
+ throw TypeError(msg);
8
+ };
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __export = (target, all) => {
11
+ for (var name in all)
12
+ __defProp(target, name, { get: all[name], enumerable: true });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
24
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
25
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
26
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
27
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
28
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
29
+ var InvocationContext_exports = {};
30
+ __export(InvocationContext_exports, {
31
+ InvocationContext: () => InvocationContext,
32
+ InvocationWsContext: () => InvocationWsContext
33
+ });
34
+ module.exports = __toCommonJS(InvocationContext_exports);
35
+ var import_DelegatesCache = require("../core/delegatesCache/DelegatesCache.cjs");
36
+ var import_Interpreter = require("../core/interpreter/Interpreter.cjs");
37
+ var import_Command = require("../utils/Command.cjs");
38
+ var import_CommandType = require("../utils/CommandType.cjs");
39
+ var import_ConnectionType = require("../utils/ConnectionType.cjs");
40
+ var import_ExceptionThrower = require("../utils/exception/ExceptionThrower.cjs");
41
+ var import_RuntimeName = require("../utils/RuntimeName.cjs");
42
+ var _a, _runtimeName, _connectionData, _currentCommand, _responseCommand, _interpreter, _isExecuted, _resultValue, _InvocationContext_instances, createInstanceContext_fn, _buildCommand, _encapsulatePayloadItem, _runtimeName2, _connectionData2, _currentCommand2, _responseCommand2, _interpreter2, _isExecuted2, _resultValue2;
43
+ _a = Symbol.iterator;
44
+ const _InvocationContext = class _InvocationContext {
45
+ constructor(runtimeName, connectionData, command, isExecuted = false) {
46
+ __privateAdd(this, _InvocationContext_instances);
47
+ __privateAdd(this, _runtimeName);
48
+ __privateAdd(this, _connectionData);
49
+ __privateAdd(this, _currentCommand);
50
+ __privateAdd(this, _responseCommand);
51
+ __privateAdd(this, _interpreter);
52
+ // eslint-disable-next-line no-unused-private-class-members
53
+ __privateAdd(this, _isExecuted);
54
+ __privateAdd(this, _resultValue);
55
+ //destructor() {
56
+ // if (this.#currentCommand.commandType === CommandType.Reference) {
57
+ // this.#currentCommand = new Command(
58
+ // this.#runtimeName,
59
+ // CommandType.DestructReference,
60
+ // this.#currentCommand.payload
61
+ // );
62
+ // this.execute();
63
+ // }
64
+ //}
65
+ __publicField(this, _a, function() {
66
+ if (__privateGet(this, _currentCommand).commandType !== import_CommandType.CommandType.Reference) {
67
+ throw new Error("Object is not iterable");
68
+ }
69
+ let position = -1;
70
+ let arraySize = this.getSize().execute().getValue();
71
+ return {
72
+ next: () => ({
73
+ value: this.getIndex(++position),
74
+ done: position >= arraySize
75
+ })
76
+ };
77
+ });
78
+ __privateAdd(this, _buildCommand, function(command) {
79
+ for (let i = 0; i < command.payload.length; i++) {
80
+ command.payload[i] = __privateGet(this, _encapsulatePayloadItem).call(this, command.payload[i]);
81
+ }
82
+ return command.prependArgToPayload(__privateGet(this, _currentCommand));
83
+ });
84
+ __privateAdd(this, _encapsulatePayloadItem, function(payloadItem) {
85
+ if (payloadItem instanceof import_Command.Command) {
86
+ for (let i = 0; i < payloadItem.payload.length; i++) {
87
+ payloadItem.payload[i] = __privateGet(this, _encapsulatePayloadItem).call(this, payloadItem.payload[i]);
88
+ }
89
+ return payloadItem;
90
+ } else if (payloadItem instanceof _InvocationContext) {
91
+ return payloadItem.get_current_command();
92
+ } else if (payloadItem instanceof Array) {
93
+ const copiedArray = payloadItem.map((item) => __privateGet(this, _encapsulatePayloadItem).call(this, item));
94
+ return new import_Command.Command(this.runtimeName, import_CommandType.CommandType.Array, copiedArray);
95
+ } else if (typeof payloadItem === "function") {
96
+ let newArray = new Array(payloadItem.length + 1);
97
+ for (let i = 0; i < newArray.length; i++) {
98
+ newArray[i] = typeof Object;
99
+ }
100
+ const args = [import_DelegatesCache.delegatesCacheInstance.addDelegate(payloadItem), import_RuntimeName.RuntimeName.Nodejs].push(
101
+ ...newArray
102
+ );
103
+ return new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.PassDelegate, args);
104
+ } else {
105
+ return new import_Command.Command(this.runtimeName, import_CommandType.CommandType.Value, [payloadItem]);
106
+ }
107
+ });
108
+ __privateSet(this, _runtimeName, runtimeName);
109
+ __privateSet(this, _connectionData, connectionData);
110
+ __privateSet(this, _currentCommand, command);
111
+ __privateSet(this, _responseCommand, null);
112
+ __privateSet(this, _isExecuted, isExecuted);
113
+ __privateSet(this, _interpreter, null);
114
+ __privateSet(this, _resultValue, null);
115
+ }
116
+ get_current_command() {
117
+ return __privateGet(this, _currentCommand);
118
+ }
119
+ /**
120
+ * Executes the current command.
121
+ * Because invocation context is building the intent of executing particular expression on target environment, we call the initial state of invocation context as non-materialized.
122
+ * The non-materialized context wraps either single command or chain of recursively nested commands.
123
+ * Commands are becoming nested through each invocation of methods on Invocation Context.
124
+ * Each invocation triggers the creation of new Invocation Context instance wrapping the current command with new parent command valid for invoked method.
125
+ * Developer can decide on any moment of the materialization for the context taking full control of the chunks of the expression being transferred and processed on target runtime.
126
+ * @returns {InvocationContext} the InvocationContext after executing the command.
127
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/execute-method)
128
+ * @method
129
+ */
130
+ execute() {
131
+ __privateSet(this, _interpreter, new import_Interpreter.Interpreter());
132
+ __privateSet(this, _responseCommand, __privateGet(this, _interpreter).execute(__privateGet(this, _currentCommand), __privateGet(this, _connectionData)));
133
+ if (__privateGet(this, _responseCommand) === void 0) {
134
+ throw new Error("responseCommand is undefined in Invocation Context execute method");
135
+ }
136
+ if (__privateGet(this, _responseCommand).commandType === import_CommandType.CommandType.Exception) {
137
+ throw import_ExceptionThrower.ExceptionThrower.throwException(__privateGet(this, _responseCommand));
138
+ }
139
+ if (__privateGet(this, _responseCommand).commandType === import_CommandType.CommandType.CreateClassInstance) {
140
+ __privateSet(this, _currentCommand, __privateGet(this, _responseCommand));
141
+ __privateSet(this, _isExecuted, true);
142
+ return this;
143
+ }
144
+ return new _InvocationContext(__privateGet(this, _runtimeName), __privateGet(this, _connectionData), __privateGet(this, _responseCommand), true);
145
+ }
146
+ /**
147
+ * Invokes a static method on the target runtime.
148
+ * @param {string} methodName - The name of the method to invoke.
149
+ * @param {...any} args - Method arguments.
150
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to invoke the static method.
151
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/calling-methods/invoking-static-method)
152
+ * @method
153
+ */
154
+ invokeStaticMethod(methodName, ...args) {
155
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.InvokeStaticMethod, [
156
+ methodName,
157
+ ...args
158
+ ]);
159
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
160
+ }
161
+ /**
162
+ * Retrieves the value of a static field from the target runtime.
163
+ * @param {string} fieldName - The name of the field to get.
164
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the static field.
165
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/fields-and-properties/getting-and-setting-values-for-static-fields-and-properties)
166
+ * @method
167
+ */
168
+ getStaticField(fieldName) {
169
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.GetStaticField, [fieldName]);
170
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
171
+ }
172
+ /**
173
+ * Sets the value of a static field in the target runtime.
174
+ * @param {string} fieldName - The name of the field to set.
175
+ * @param {any} value - The new value of the field.
176
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to set the static field.
177
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/fields-and-properties/getting-and-setting-values-for-static-fields-and-properties)
178
+ * @method
179
+ */
180
+ setStaticField(fieldName, value) {
181
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.SetStaticField, [fieldName, value]);
182
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
183
+ }
184
+ /**
185
+ * Creates a new instance of a class in the target runtime.
186
+ * @param {...any} args - The arguments to pass to the class constructor
187
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to create the instance.
188
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/calling-methods/creating-instance-and-calling-instance-methods)
189
+ * @method
190
+ */
191
+ createInstance(...args) {
192
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.CreateClassInstance, args);
193
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
194
+ }
195
+ /**
196
+ * Retrieves the value of an instance field from the target runtime.
197
+ * @param {string} fieldName - The name of the field to get.
198
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the instance field.
199
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/fields-and-properties/getting-and-setting-values-for-instance-fields-and-properties)
200
+ * @method
201
+ */
202
+ getInstanceField(fieldName) {
203
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.GetInstanceField, [fieldName]);
204
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
205
+ }
206
+ /**
207
+ * Sets the value of an instance field in the target runtime.
208
+ * @param {string} fieldName - The name of the field to set.
209
+ * @param {any} value - The new value of the field.
210
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to set the instance field.
211
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/fields-and-properties/getting-and-setting-values-for-instance-fields-and-properties)
212
+ * @method
213
+ */
214
+ setInstanceField(fieldName, value) {
215
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.SetInstanceField, [fieldName, value]);
216
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
217
+ }
218
+ /**
219
+ * Invokes an instance method on the target runtime.
220
+ * @param {string} methodName - The name of the method to invoke.
221
+ * @param {...any} args - Method arguments.
222
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to invoke the instance method.
223
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/calling-methods/invoking-instance-method)
224
+ * @method
225
+ */
226
+ invokeInstanceMethod(methodName, ...args) {
227
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.InvokeInstanceMethod, [
228
+ methodName,
229
+ ...args
230
+ ]);
231
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
232
+ }
233
+ /**
234
+ * Retrieves the value at a specific index in an array from the target runtime.
235
+ * @param {...any} indexes - the arguments to pass to the array getter. The first argument should be the index.
236
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the index.
237
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/arrays-and-collections/one-dimensional-arrays)
238
+ * @method
239
+ */
240
+ getIndex(...indexes) {
241
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.ArrayGetItem, indexes);
242
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
243
+ }
244
+ /**
245
+ * Sets the value at a specific index in an array in the target runtime.
246
+ * @param {number[]} indexes - The index to set the value at.
247
+ * @param {any} value - The value to set at the index.
248
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to set the index.
249
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/arrays-and-collections/one-dimensional-arrays)
250
+ * @method
251
+ */
252
+ setIndex(indexes, value) {
253
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.ArraySetItem, [indexes, value]);
254
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
255
+ }
256
+ /**
257
+ * Retrieves the size of an array from the target runtime.
258
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the size.
259
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/arrays-and-collections/one-dimensional-arrays)
260
+ * @method
261
+ */
262
+ getSize() {
263
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.ArrayGetSize, []);
264
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
265
+ }
266
+ /**
267
+ * Retrieves the rank of an array from the target runtime.
268
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the rank.
269
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/arrays-and-collections/one-dimensional-arrays)
270
+ * @method
271
+ */
272
+ getRank() {
273
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.ArrayGetRank, []);
274
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
275
+ }
276
+ /**
277
+ * Invokes a generic static method on the target runtime.
278
+ * @param {string} methodName - The name of the method to invoke.
279
+ * @param {...any} args - Method arguments.
280
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to invoke the generic static method.
281
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/generics/calling-generic-static-method)
282
+ * @method
283
+ */
284
+ invokeGenericStaticMethod(methodName, ...args) {
285
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.InvokeGenericStaticMethod, [
286
+ methodName,
287
+ ...args
288
+ ]);
289
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
290
+ }
291
+ /**
292
+ * Invokes a generic method on the target runtime.
293
+ * @param {string} methodName - The name of the method to invoke.
294
+ * @param {...any} args - Method arguments.
295
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to invoke the generic method.
296
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/generics/calling-generic-instance-method)
297
+ * @method
298
+ */
299
+ invokeGenericMethod(methodName, ...args) {
300
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.InvokeGenericMethod, [
301
+ methodName,
302
+ ...args
303
+ ]);
304
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
305
+ }
306
+ /**
307
+ * Retrieves the name of an enum from the target runtime.
308
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the enum name.
309
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/enums/using-enum-type)
310
+ * @method
311
+ */
312
+ getEnumName() {
313
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.GetEnumName, []);
314
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
315
+ }
316
+ /**
317
+ * Retrieves the value of an enum from the target runtime.
318
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the enum value.
319
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/enums/using-enum-type)
320
+ * @method
321
+ */
322
+ getEnumValue() {
323
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.GetEnumValue, []);
324
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
325
+ }
326
+ /**
327
+ * Retrieves the value of a reference from the target runtime.
328
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the ref value.
329
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/methods-arguments/passing-arguments-by-reference-with-ref-keyword)
330
+ * @method
331
+ */
332
+ getRefValue() {
333
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.GetRefValue, []);
334
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
335
+ }
336
+ /**
337
+ * Creates a null object of a specific type on the target runtime.
338
+ *
339
+ * @returns {InvocationContext} An InvocationContext instance with the command to create a null object.
340
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/null-handling/create-null-object)
341
+ * @method
342
+ */
343
+ createNull() {
344
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.CreateNull, []);
345
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
346
+ }
347
+ /**
348
+ * Creates a null object of a specific type on the target runtime.
349
+ * @param {string} methodName - The name of the method to invoke.
350
+ * @param {...any} args - Method arguments.
351
+ * @returns {InvocationContext} An InvocationContext instance with the command to create a null object.
352
+ * TODO: connect documentation page url
353
+ * @see [Javonet Guides](https://www.javonet.com/guides/)
354
+ * @method
355
+ */
356
+ getStaticMethodAsDelegate(methodName, ...args) {
357
+ const localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.GetStaticMethodAsDelegate, [
358
+ methodName,
359
+ ...args
360
+ ]);
361
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
362
+ }
363
+ /**
364
+ * Creates a null object of a specific type on the target runtime.
365
+ * @param {string} methodName - The name of the method to invoke.
366
+ * @param {...any} args - Method arguments.
367
+ * @returns {InvocationContext} An InvocationContext instance with the command to create a null object.
368
+ * TODO: connect documentation page url
369
+ * @see [Javonet Guides](https://www.javonet.com/guides/)
370
+ * @method
371
+ */
372
+ getInstanceMethodAsDelegate(methodName, ...args) {
373
+ const localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.GetInstanceMethodAsDelegate, [
374
+ methodName,
375
+ ...args
376
+ ]);
377
+ return __privateMethod(this, _InvocationContext_instances, createInstanceContext_fn).call(this, localCommand);
378
+ }
379
+ /**
380
+ * Retrieves an array from the target runtime.
381
+ * @returns {InvocationContext} A new InvocationContext instance that wraps the command to retrieve the array.
382
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/arrays-and-collections/retrieve-array)
383
+ * @method
384
+ */
385
+ retrieveArray() {
386
+ let localCommand = new import_Command.Command(__privateGet(this, _runtimeName), import_CommandType.CommandType.RetrieveArray, []);
387
+ let localInvCtx = new _InvocationContext(
388
+ __privateGet(this, _runtimeName),
389
+ __privateGet(this, _connectionData),
390
+ __privateGet(this, _buildCommand).call(this, localCommand)
391
+ );
392
+ localInvCtx.execute();
393
+ return __privateGet(localInvCtx, _responseCommand).payload;
394
+ }
395
+ /**
396
+ * Returns the primitive value from the target runtime. This could be any primitive type in JavaScript,
397
+ * such as int, boolean, byte, char, long, double, float, etc.
398
+ * @returns {Command} The value of the current command.
399
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/execute-method)
400
+ * @method
401
+ */
402
+ getValue() {
403
+ __privateSet(this, _resultValue, __privateGet(this, _currentCommand).payload[0]);
404
+ return __privateGet(this, _resultValue);
405
+ }
406
+ };
407
+ _runtimeName = new WeakMap();
408
+ _connectionData = new WeakMap();
409
+ _currentCommand = new WeakMap();
410
+ _responseCommand = new WeakMap();
411
+ _interpreter = new WeakMap();
412
+ _isExecuted = new WeakMap();
413
+ _resultValue = new WeakMap();
414
+ _InvocationContext_instances = new WeakSet();
415
+ createInstanceContext_fn = function(localCommand) {
416
+ if (__privateGet(this, _connectionData).connectionType === import_ConnectionType.ConnectionType.WEB_SOCKET) {
417
+ return new InvocationWsContext(
418
+ __privateGet(this, _runtimeName),
419
+ __privateGet(this, _connectionData),
420
+ __privateGet(this, _buildCommand).call(this, localCommand)
421
+ );
422
+ }
423
+ return new _InvocationContext(
424
+ __privateGet(this, _runtimeName),
425
+ __privateGet(this, _connectionData),
426
+ __privateGet(this, _buildCommand).call(this, localCommand)
427
+ );
428
+ };
429
+ _buildCommand = new WeakMap();
430
+ _encapsulatePayloadItem = new WeakMap();
431
+ let InvocationContext = _InvocationContext;
432
+ const _InvocationWsContext = class _InvocationWsContext extends InvocationContext {
433
+ constructor(runtimeName, connectionData, command, isExecuted = false) {
434
+ super(runtimeName, connectionData, command, isExecuted);
435
+ __privateAdd(this, _runtimeName2);
436
+ __privateAdd(this, _connectionData2);
437
+ __privateAdd(this, _currentCommand2);
438
+ __privateAdd(this, _responseCommand2);
439
+ __privateAdd(this, _interpreter2);
440
+ // eslint-disable-next-line no-unused-private-class-members
441
+ __privateAdd(this, _isExecuted2);
442
+ // eslint-disable-next-line no-unused-private-class-members
443
+ __privateAdd(this, _resultValue2);
444
+ __privateSet(this, _runtimeName2, runtimeName);
445
+ __privateSet(this, _connectionData2, connectionData);
446
+ __privateSet(this, _currentCommand2, command);
447
+ __privateSet(this, _responseCommand2, null);
448
+ __privateSet(this, _isExecuted2, isExecuted);
449
+ __privateSet(this, _interpreter2, null);
450
+ __privateSet(this, _resultValue2, null);
451
+ }
452
+ /**
453
+ * Executes the current command.
454
+ * Because invocation context is building the intent of executing particular expression on target environment, we call the initial state of invocation context as non-materialized.
455
+ * The non-materialized context wraps either single command or chain of recursively nested commands.
456
+ * Commands are becoming nested through each invocation of methods on Invocation Context.
457
+ * Each invocation triggers the creation of new Invocation Context instance wrapping the current command with new parent command valid for invoked method.
458
+ * Developer can decide on any moment of the materialization for the context taking full control of the chunks of the expression being transferred and processed on target runtime.
459
+ * @returns {InvocationContext} the InvocationContext after executing the command.
460
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/execute-method)
461
+ * @method
462
+ */
463
+ async execute() {
464
+ __privateSet(this, _interpreter2, new import_Interpreter.Interpreter());
465
+ __privateSet(this, _responseCommand2, await __privateGet(this, _interpreter2).executeAsync(
466
+ __privateGet(this, _currentCommand2),
467
+ __privateGet(this, _connectionData2)
468
+ ));
469
+ if (__privateGet(this, _responseCommand2) === void 0) {
470
+ throw new Error("responseCommand is undefined in Invocation Context execute method");
471
+ }
472
+ if (__privateGet(this, _responseCommand2).commandType === import_CommandType.CommandType.Exception) {
473
+ throw import_ExceptionThrower.ExceptionThrower.throwException(__privateGet(this, _responseCommand2));
474
+ }
475
+ if (__privateGet(this, _responseCommand2).commandType === import_CommandType.CommandType.CreateClassInstance) {
476
+ __privateSet(this, _currentCommand2, __privateGet(this, _responseCommand2));
477
+ __privateSet(this, _isExecuted2, true);
478
+ return this;
479
+ }
480
+ return new _InvocationWsContext(__privateGet(this, _runtimeName2), __privateGet(this, _connectionData2), __privateGet(this, _responseCommand2), true);
481
+ }
482
+ };
483
+ _runtimeName2 = new WeakMap();
484
+ _connectionData2 = new WeakMap();
485
+ _currentCommand2 = new WeakMap();
486
+ _responseCommand2 = new WeakMap();
487
+ _interpreter2 = new WeakMap();
488
+ _isExecuted2 = new WeakMap();
489
+ _resultValue2 = new WeakMap();
490
+ let InvocationWsContext = _InvocationWsContext;
491
+ // Annotate the CommonJS export names for ESM import in node:
492
+ 0 && (module.exports = {
493
+ InvocationContext,
494
+ InvocationWsContext
495
+ });
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var Javonet_exports = {};
20
+ __export(Javonet_exports, {
21
+ CommandDeserializer: () => import_CommandDeserializer.CommandDeserializer,
22
+ CommandSerializer: () => import_CommandSerializer.CommandSerializer,
23
+ Javonet: () => Javonet,
24
+ TcpConnectionData: () => import_TcpConnectionData.TcpConnectionData,
25
+ WsConnectionData: () => import_WsConnectionData.WsConnectionData
26
+ });
27
+ module.exports = __toCommonJS(Javonet_exports);
28
+ var import_ConfigRuntimeFactory = require("./ConfigRuntimeFactory.cjs");
29
+ var import_RuntimeFactory = require("./RuntimeFactory.cjs");
30
+ var import_InMemoryConnectionData = require("../utils/connectionData/InMemoryConnectionData.cjs");
31
+ var import_Runtime = require("../utils/Runtime.cjs");
32
+ var import_CommandSerializer = require("../core/protocol/CommandSerializer.cjs");
33
+ var import_CommandDeserializer = require("../core/protocol/CommandDeserializer.cjs");
34
+ var import_RuntimeLogger = require("../utils/RuntimeLogger.cjs");
35
+ var import_TcpConnectionData = require("../utils/nodejs/connectionData/TcpConnectionData.cjs");
36
+ var import_WsConnectionData = require("../utils/connectionData/WsConnectionData.cjs");
37
+ const import_meta = {};
38
+ const requireDynamic = (0, import_Runtime.getRequire)(import_meta.url);
39
+ let _Transmitter = null;
40
+ if ((0, import_Runtime.isNodejsRuntime)()) {
41
+ try {
42
+ const { Transmitter } = require("../core/transmitter/Transmitter.cjs");
43
+ _Transmitter = Transmitter;
44
+ } catch (error) {
45
+ throw error;
46
+ }
47
+ }
48
+ class Javonet {
49
+ /**
50
+ * Initializes Javonet using an in-memory channel on the same machine.
51
+ * @returns {RuntimeFactory} A RuntimeFactory instance configured for an in-memory connection.
52
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/in-memory-channel)
53
+ */
54
+ static inMemory() {
55
+ return new import_RuntimeFactory.RuntimeFactory(new import_InMemoryConnectionData.InMemoryConnectionData());
56
+ }
57
+ /**
58
+ * Initializes Javonet with a TCP connection to a remote machine.
59
+ * @param {TcpConnectionData} tcpConnectionData - The tcp connection data of the remote machine.
60
+ * @returns {RuntimeFactory} A RuntimeFactory instance configured for a TCP connection.
61
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/tcp-channel)
62
+ */
63
+ static tcp(tcpConnectionData) {
64
+ return new import_RuntimeFactory.RuntimeFactory(tcpConnectionData);
65
+ }
66
+ /**
67
+ * Initializes Javonet with a WebSocket connection to a remote machine.
68
+ * @param {WsConnectionData} wsConnectionData - The WebSocket connection data of the remote machine.
69
+ * @returns {RuntimeFactory} A RuntimeFactory instance configured for a WebSocket connection.
70
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/websocket-channel)
71
+ */
72
+ static webSocket(wsConnectionData) {
73
+ return new import_RuntimeFactory.RuntimeFactory(wsConnectionData);
74
+ }
75
+ /**
76
+ * Initializes Javonet with a custom configuration file taken from external source.
77
+ * Currentyl supported: Configuration file in JSON format
78
+ * @param config - Path to a configuration file.
79
+ * @returns {ConfigRuntimeFactory} A ConfigRuntimeFactory instance with configuration data.
80
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/configure-channel)
81
+ */
82
+ static withConfig(config) {
83
+ return new import_ConfigRuntimeFactory.ConfigRuntimeFactory(config, _Transmitter);
84
+ }
85
+ /**
86
+ * Activates Javonet with the provided license key.
87
+ * @param {string} licenseKey - The license key to activate Javonet.
88
+ * @returns {number} The activation status code.
89
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/getting-started/activating-javonet)
90
+ */
91
+ static activate(licenseKey) {
92
+ if ((0, import_Runtime.isNodejsRuntime)()) {
93
+ return _Transmitter?.activate(licenseKey);
94
+ } else {
95
+ throw new Error("Javonet.activate is allowed only to run in nodejs runtime");
96
+ }
97
+ }
98
+ static getRuntimeInfo() {
99
+ if ((0, import_Runtime.isNodejsRuntime)()) {
100
+ return import_RuntimeLogger.RuntimeLogger.getRuntimeInfo();
101
+ } else {
102
+ throw new Error("Javonet.getRuntimeInfo is allowed only to run in nodejs runtime");
103
+ }
104
+ }
105
+ /**
106
+ * Sets the configuration source for the Javonet SDK.
107
+ *
108
+ * @param {string} configSource - The configuration source.
109
+ */
110
+ static setConfigSource(configSource) {
111
+ if ((0, import_Runtime.isNodejsRuntime)()) {
112
+ return _Transmitter?.setConfigSource(configSource);
113
+ } else {
114
+ throw new Error("Javonet.setConfigSource is allowed only to run in nodejs runtime");
115
+ }
116
+ }
117
+ /**
118
+ * Sets the working directory for the Javonet SDK.
119
+ *
120
+ * @param {string} path - The working directory.
121
+ */
122
+ static setJavonetWorkingDirectory(path) {
123
+ try {
124
+ if ((0, import_Runtime.isNodejsRuntime)()) {
125
+ const { mkdirSync } = requireDynamic("fs");
126
+ path = path.replace(/\\/g, "/");
127
+ if (!path.endsWith("/")) {
128
+ path += "/";
129
+ }
130
+ mkdirSync(path, { recursive: true, mode: 448 });
131
+ _Transmitter?.setJavonetWorkingDirectory(path);
132
+ } else {
133
+ throw new Error("Javonet.setJavonetWorkingDirectory is allowed only to run in nodejs runtime");
134
+ }
135
+ } catch (error) {
136
+ if (error.code === "MODULE_NOT_FOUND") {
137
+ throw new Error("fs module not found. Please install it using npm install fs");
138
+ }
139
+ throw error;
140
+ }
141
+ }
142
+ }
143
+ // Annotate the CommonJS export names for ESM import in node:
144
+ 0 && (module.exports = {
145
+ CommandDeserializer,
146
+ CommandSerializer,
147
+ Javonet,
148
+ TcpConnectionData,
149
+ WsConnectionData
150
+ });