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
@@ -1,485 +0,0 @@
1
- const DelegatesCache = require('../core/delegatesCache/DelegatesCache')
2
- const Interpreter = require('../core/interpreter/Interpreter')
3
- const Command = require('../utils/Command')
4
- const CommandType = require('../utils/CommandType')
5
- const ConnectionType = require('../utils/ConnectionType')
6
- const ExceptionThrower = require('../utils/exception/ExceptionThrower')
7
- const RuntimeName = require('../utils/RuntimeName')
8
-
9
- /**
10
- * InvocationContext is a class that represents a context for invoking commands.
11
- * It implements several interfaces for different types of interactions.
12
- * This class is used to construct chains of invocations, representing expressions of interaction that have not yet been executed.
13
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/invocation-context)
14
- * @class
15
- */
16
- class InvocationContext {
17
- #runtimeName
18
- #connectionData
19
- #currentCommand
20
- #responseCommand
21
- #interpreter
22
- // eslint-disable-next-line no-unused-private-class-members
23
- #isExecuted
24
- #resultValue
25
-
26
- constructor(runtimeName, connectionData, command, isExecuted = false) {
27
- this.#runtimeName = runtimeName
28
- this.#connectionData = connectionData
29
- this.#currentCommand = command
30
- this.#responseCommand = null
31
- this.#isExecuted = isExecuted
32
- this.#interpreter = null
33
- this.#resultValue = null
34
- }
35
-
36
- #createInstanceContext(localCommand) {
37
- if (this.#connectionData.connectionType === ConnectionType.WEB_SOCKET) {
38
- return new InvocationWsContext(
39
- this.#runtimeName,
40
- this.#connectionData,
41
- this.#buildCommand(localCommand)
42
- )
43
- }
44
- return new InvocationContext(
45
- this.#runtimeName,
46
- this.#connectionData,
47
- this.#buildCommand(localCommand)
48
- )
49
- }
50
-
51
- get_current_command() {
52
- return this.#currentCommand
53
- }
54
-
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
-
66
- [Symbol.iterator] = function () {
67
- if (this.#currentCommand.commandType !== CommandType.Reference) {
68
- throw new Error('Object is not iterable')
69
- }
70
- let position = -1
71
- let arraySize = this.getSize().execute().getValue()
72
-
73
- return {
74
- next: () => ({
75
- value: this.getIndex(++position),
76
- done: position >= arraySize,
77
- }),
78
- }
79
- }
80
-
81
- /**
82
- * Executes the current command.
83
- * 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.
84
- * The non-materialized context wraps either single command or chain of recursively nested commands.
85
- * Commands are becoming nested through each invocation of methods on Invocation Context.
86
- * Each invocation triggers the creation of new Invocation Context instance wrapping the current command with new parent command valid for invoked method.
87
- * 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.
88
- * @returns {InvocationContext} the InvocationContext after executing the command.
89
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/execute-method)
90
- * @method
91
- */
92
- execute() {
93
- this.#interpreter = new Interpreter()
94
- this.#responseCommand = this.#interpreter.execute(this.#currentCommand, this.#connectionData)
95
- if (this.#responseCommand === undefined) {
96
- throw new Error('responseCommand is undefined in Invocation Context execute method')
97
- }
98
- if (this.#responseCommand.commandType === CommandType.Exception) {
99
- throw ExceptionThrower.throwException(this.#responseCommand)
100
- }
101
-
102
- if (this.#responseCommand.commandType === CommandType.CreateClassInstance) {
103
- this.#currentCommand = this.#responseCommand
104
- this.#isExecuted = true
105
- return this
106
- }
107
-
108
- return new InvocationContext(this.#runtimeName, this.#connectionData, this.#responseCommand, true)
109
- }
110
-
111
- /**
112
- * Invokes a static method on the target runtime.
113
- * @param {string} methodName - The name of the method to invoke.
114
- * @param {...any} args - Method arguments.
115
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to invoke the static method.
116
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/calling-methods/invoking-static-method)
117
- * @method
118
- */
119
- invokeStaticMethod(methodName, ...args) {
120
- let localCommand = new Command(this.#runtimeName, CommandType.InvokeStaticMethod, [
121
- methodName,
122
- ...args,
123
- ])
124
- return this.#createInstanceContext(localCommand)
125
- }
126
-
127
- /**
128
- * Retrieves the value of a static field from the target runtime.
129
- * @param {string} fieldName - The name of the field to get.
130
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the static field.
131
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/fields-and-properties/getting-and-setting-values-for-static-fields-and-properties)
132
- * @method
133
- */
134
- getStaticField(fieldName) {
135
- let localCommand = new Command(this.#runtimeName, CommandType.GetStaticField, [fieldName])
136
- return this.#createInstanceContext(localCommand)
137
- }
138
-
139
- /**
140
- * Sets the value of a static field in the target runtime.
141
- * @param {string} fieldName - The name of the field to set.
142
- * @param {any} value - The new value of the field.
143
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to set the static field.
144
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/fields-and-properties/getting-and-setting-values-for-static-fields-and-properties)
145
- * @method
146
- */
147
- setStaticField(fieldName, value) {
148
- let localCommand = new Command(this.#runtimeName, CommandType.SetStaticField, [fieldName, value])
149
- return this.#createInstanceContext(localCommand)
150
- }
151
-
152
- /**
153
- * Creates a new instance of a class in the target runtime.
154
- * @param {...any} args - The arguments to pass to the class constructor
155
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to create the instance.
156
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/calling-methods/creating-instance-and-calling-instance-methods)
157
- * @method
158
- */
159
- createInstance(...args) {
160
- let localCommand = new Command(this.#runtimeName, CommandType.CreateClassInstance, args)
161
- return this.#createInstanceContext(localCommand)
162
- }
163
-
164
- /**
165
- * Retrieves the value of an instance field from the target runtime.
166
- * @param {string} fieldName - The name of the field to get.
167
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the instance field.
168
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/fields-and-properties/getting-and-setting-values-for-instance-fields-and-properties)
169
- * @method
170
- */
171
- getInstanceField(fieldName) {
172
- let localCommand = new Command(this.#runtimeName, CommandType.GetInstanceField, [fieldName])
173
- return this.#createInstanceContext(localCommand)
174
- }
175
-
176
- /**
177
- * Sets the value of an instance field in the target runtime.
178
- * @param {string} fieldName - The name of the field to set.
179
- * @param {any} value - The new value of the field.
180
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to set the instance field.
181
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/fields-and-properties/getting-and-setting-values-for-instance-fields-and-properties)
182
- * @method
183
- */
184
- setInstanceField(fieldName, value) {
185
- let localCommand = new Command(this.#runtimeName, CommandType.SetInstanceField, [fieldName, value])
186
- return this.#createInstanceContext(localCommand)
187
- }
188
-
189
- /**
190
- * Invokes an instance method on the target runtime.
191
- * @param {string} methodName - The name of the method to invoke.
192
- * @param {...any} args - Method arguments.
193
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to invoke the instance method.
194
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/calling-methods/invoking-instance-method)
195
- * @method
196
- */
197
- invokeInstanceMethod(methodName, ...args) {
198
- let localCommand = new Command(this.#runtimeName, CommandType.InvokeInstanceMethod, [
199
- methodName,
200
- ...args,
201
- ])
202
- return this.#createInstanceContext(localCommand)
203
- }
204
-
205
- /**
206
- * Retrieves the value at a specific index in an array from the target runtime.
207
- * @param {...any} indexes - the arguments to pass to the array getter. The first argument should be the index.
208
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the index.
209
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/arrays-and-collections/one-dimensional-arrays)
210
- * @method
211
- */
212
- getIndex(...indexes) {
213
- let localCommand = new Command(this.#runtimeName, CommandType.ArrayGetItem, indexes)
214
- return this.#createInstanceContext(localCommand)
215
- }
216
-
217
- /**
218
- * Sets the value at a specific index in an array in the target runtime.
219
- * @param {number[]} indexes - The index to set the value at.
220
- * @param {any} value - The value to set at the index.
221
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to set the index.
222
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/arrays-and-collections/one-dimensional-arrays)
223
- * @method
224
- */
225
- setIndex(indexes, value) {
226
- let localCommand = new Command(this.#runtimeName, CommandType.ArraySetItem, [indexes, value])
227
- return this.#createInstanceContext(localCommand)
228
- }
229
-
230
- /**
231
- * Retrieves the size of an array from the target runtime.
232
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the size.
233
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/arrays-and-collections/one-dimensional-arrays)
234
- * @method
235
- */
236
- getSize() {
237
- let localCommand = new Command(this.#runtimeName, CommandType.ArrayGetSize, [])
238
- return this.#createInstanceContext(localCommand)
239
- }
240
-
241
- /**
242
- * Retrieves the rank of an array from the target runtime.
243
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the rank.
244
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/arrays-and-collections/one-dimensional-arrays)
245
- * @method
246
- */
247
- getRank() {
248
- let localCommand = new Command(this.#runtimeName, CommandType.ArrayGetRank, [])
249
- return this.#createInstanceContext(localCommand)
250
- }
251
-
252
- /**
253
- * Invokes a generic static method on the target runtime.
254
- * @param {string} methodName - The name of the method to invoke.
255
- * @param {...any} args - Method arguments.
256
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to invoke the generic static method.
257
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/generics/calling-generic-static-method)
258
- * @method
259
- */
260
- invokeGenericStaticMethod(methodName, ...args) {
261
- let localCommand = new Command(this.#runtimeName, CommandType.InvokeGenericStaticMethod, [
262
- methodName,
263
- ...args,
264
- ])
265
- return this.#createInstanceContext(localCommand)
266
- }
267
-
268
- /**
269
- * Invokes a generic method on the target runtime.
270
- * @param {string} methodName - The name of the method to invoke.
271
- * @param {...any} args - Method arguments.
272
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to invoke the generic method.
273
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/generics/calling-generic-instance-method)
274
- * @method
275
- */
276
- invokeGenericMethod(methodName, ...args) {
277
- let localCommand = new Command(this.#runtimeName, CommandType.InvokeGenericMethod, [
278
- methodName,
279
- ...args,
280
- ])
281
- return this.#createInstanceContext(localCommand)
282
- }
283
-
284
- /**
285
- * Retrieves the name of an enum from the target runtime.
286
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the enum name.
287
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/enums/using-enum-type)
288
- * @method
289
- */
290
- getEnumName() {
291
- let localCommand = new Command(this.#runtimeName, CommandType.GetEnumName, [])
292
- return this.#createInstanceContext(localCommand)
293
- }
294
-
295
- /**
296
- * Retrieves the value of an enum from the target runtime.
297
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the enum value.
298
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/enums/using-enum-type)
299
- * @method
300
- */
301
- getEnumValue() {
302
- let localCommand = new Command(this.#runtimeName, CommandType.GetEnumValue, [])
303
- return this.#createInstanceContext(localCommand)
304
- }
305
-
306
- /**
307
- * Retrieves the value of a reference from the target runtime.
308
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the ref value.
309
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/methods-arguments/passing-arguments-by-reference-with-ref-keyword)
310
- * @method
311
- */
312
- getRefValue() {
313
- let localCommand = new Command(this.#runtimeName, CommandType.GetRefValue, [])
314
- return this.#createInstanceContext(localCommand)
315
- }
316
-
317
- /**
318
- * Creates a null object of a specific type on the target runtime.
319
- *
320
- * @returns {InvocationContext} An InvocationContext instance with the command to create a null object.
321
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/null-handling/create-null-object)
322
- * @method
323
- */
324
- createNull() {
325
- let localCommand = new Command(this.#runtimeName, CommandType.CreateNull, [])
326
- return this.#createInstanceContext(localCommand)
327
- }
328
-
329
- /**
330
- * Creates a null object of a specific type on the target runtime.
331
- * @param {string} methodName - The name of the method to invoke.
332
- * @param {...any} args - Method arguments.
333
- * @returns {InvocationContext} An InvocationContext instance with the command to create a null object.
334
- * TODO: connect documentation page url
335
- * @see [Javonet Guides](https://www.javonet.com/guides/)
336
- * @method
337
- */
338
- getStaticMethodAsDelegate(methodName, ...args) {
339
- const localCommand = new Command(this.#runtimeName, CommandType.GetStaticMethodAsDelegate, [
340
- methodName,
341
- ...args,
342
- ])
343
- return this.#createInstanceContext(localCommand)
344
- }
345
-
346
- /**
347
- * Creates a null object of a specific type on the target runtime.
348
- * @param {string} methodName - The name of the method to invoke.
349
- * @param {...any} args - Method arguments.
350
- * @returns {InvocationContext} An InvocationContext instance with the command to create a null object.
351
- * TODO: connect documentation page url
352
- * @see [Javonet Guides](https://www.javonet.com/guides/)
353
- * @method
354
- */
355
- getInstanceMethodAsDelegate(methodName, ...args) {
356
- const localCommand = new Command(this.#runtimeName, CommandType.GetInstanceMethodAsDelegate, [
357
- methodName,
358
- ...args,
359
- ])
360
- return this.#createInstanceContext(localCommand)
361
- }
362
-
363
- /**
364
- * Retrieves an array from the target runtime.
365
- * @returns {InvocationContext} A new InvocationContext instance that wraps the command to retrieve the array.
366
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/arrays-and-collections/retrieve-array)
367
- * @method
368
- */
369
- retrieveArray() {
370
- let localCommand = new Command(this.#runtimeName, CommandType.RetrieveArray, [])
371
- let localInvCtx = new InvocationContext(
372
- this.#runtimeName,
373
- this.#connectionData,
374
- this.#buildCommand(localCommand)
375
- )
376
- localInvCtx.execute()
377
- return localInvCtx.#responseCommand.payload
378
- }
379
-
380
- /**
381
- * Returns the primitive value from the target runtime. This could be any primitive type in JavaScript,
382
- * such as int, boolean, byte, char, long, double, float, etc.
383
- * @returns {Command} The value of the current command.
384
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/execute-method)
385
- * @method
386
- */
387
-
388
- getValue() {
389
- this.#resultValue = this.#currentCommand.payload[0]
390
- return this.#resultValue
391
- }
392
-
393
- #buildCommand = function (command) {
394
- for (let i = 0; i < command.payload.length; i++) {
395
- command.payload[i] = this.#encapsulatePayloadItem(command.payload[i])
396
- }
397
- return command.prependArgToPayload(this.#currentCommand)
398
- }
399
-
400
- #encapsulatePayloadItem = function (payloadItem) {
401
- // eslint-disable-next-line valid-typeof
402
- if (typeof payloadItem === 'Command' || payloadItem instanceof Command) {
403
- for (let i = 0; i < payloadItem.payload.length; i++) {
404
- payloadItem.payload[i] = this.#encapsulatePayloadItem(payloadItem.payload[i])
405
- }
406
- return payloadItem
407
- // eslint-disable-next-line valid-typeof
408
- } else if (typeof payloadItem === 'InvocationContext' || payloadItem instanceof InvocationContext) {
409
- return payloadItem.get_current_command()
410
- } else if (payloadItem instanceof Array) {
411
- const copiedArray = payloadItem.map((item) => this.#encapsulatePayloadItem(item))
412
- return new Command(this.runtimeName, CommandType.Array, copiedArray)
413
- } else if (typeof payloadItem === 'function') {
414
- let newArray = new Array(payloadItem.length + 1)
415
- for (let i = 0; i < newArray.length; i++) {
416
- newArray[i] = typeof Object
417
- }
418
- const args = [DelegatesCache.addDelegate(payloadItem), RuntimeName.Nodejs].push(...newArray)
419
- return new Command(this.#runtimeName, CommandType.PassDelegate, args)
420
- } else {
421
- return new Command(this.runtimeName, CommandType.Value, [payloadItem])
422
- }
423
- }
424
- }
425
-
426
- class InvocationWsContext extends InvocationContext {
427
- #runtimeName
428
- #connectionData
429
- #currentCommand
430
- #responseCommand
431
- #interpreter
432
- // eslint-disable-next-line no-unused-private-class-members
433
- #isExecuted
434
- // eslint-disable-next-line no-unused-private-class-members
435
- #resultValue
436
-
437
- constructor(runtimeName, connectionData, command, isExecuted = false) {
438
- super(runtimeName, connectionData, command, isExecuted)
439
-
440
- this.#runtimeName = runtimeName
441
- this.#connectionData = connectionData
442
- this.#currentCommand = command
443
- this.#responseCommand = null
444
- this.#isExecuted = isExecuted
445
- this.#interpreter = null
446
- this.#resultValue = null
447
- }
448
-
449
- /**
450
- * Executes the current command.
451
- * 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.
452
- * The non-materialized context wraps either single command or chain of recursively nested commands.
453
- * Commands are becoming nested through each invocation of methods on Invocation Context.
454
- * Each invocation triggers the creation of new Invocation Context instance wrapping the current command with new parent command valid for invoked method.
455
- * 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.
456
- * @returns {InvocationContext} the InvocationContext after executing the command.
457
- * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/execute-method)
458
- * @method
459
- */
460
- async execute() {
461
- this.#interpreter = new Interpreter()
462
- this.#responseCommand = await this.#interpreter.executeAsync(
463
- this.#currentCommand,
464
- this.#connectionData
465
- )
466
-
467
- if (this.#responseCommand === undefined) {
468
- throw new Error('responseCommand is undefined in Invocation Context execute method')
469
- }
470
-
471
- if (this.#responseCommand.commandType === CommandType.Exception) {
472
- throw ExceptionThrower.throwException(this.#responseCommand)
473
- }
474
-
475
- if (this.#responseCommand.commandType === CommandType.CreateClassInstance) {
476
- this.#currentCommand = this.#responseCommand
477
- this.#isExecuted = true
478
- return this
479
- }
480
-
481
- return new InvocationWsContext(this.#runtimeName, this.#connectionData, this.#responseCommand, true)
482
- }
483
- }
484
-
485
- module.exports = { InvocationContext, InvocationWsContext }