javonet-ruby-sdk 2.5.7 → 2.5.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (371) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/javonet-ruby-sdk/Binaries/Clr/Javonet.Clr.Utils.dll +0 -0
  4. data/lib/javonet-ruby-sdk/Binaries/Clr/JavonetClrRuntime.dll +0 -0
  5. data/lib/javonet-ruby-sdk/Binaries/Jvm/JavonetJvmRuntime.jar +0 -0
  6. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/NetVersion90LatestPatch.runtimeconfig.json +10 -0
  7. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/NetVersionLatest.runtimeconfig.json +2 -2
  8. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetActivationService.so +0 -0
  9. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetCppRuntimeNative.so +0 -0
  10. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetGoRuntimeNative.so +0 -0
  11. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetJvmRuntimeNative.so +0 -0
  12. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetNetcoreRuntimeNative.so +0 -0
  13. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetPythonRuntimeNative.so +0 -0
  14. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetRuby278RuntimeNative.so +0 -0
  15. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetRubyRuntimeNative.so +0 -0
  16. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetTcpClient.so +0 -0
  17. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetTcpTlsClient.so +0 -0
  18. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libUtils.so +0 -0
  19. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/version.txt +1 -1
  20. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/NativeUtilsUnitTests.xml +30 -18
  21. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/NetVersion90LatestPatch.runtimeconfig.json +10 -0
  22. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/NetVersionLatest.runtimeconfig.json +2 -2
  23. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetActivationService.so +0 -0
  24. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetCppRuntimeNative.so +0 -0
  25. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetGoRuntimeNative.so +0 -0
  26. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetJvmRuntimeNative.so +0 -0
  27. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNetcoreRuntimeNative.so +0 -0
  28. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNodejs1816RuntimeNative.so +0 -0
  29. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNodejsRuntimeNative.so +0 -0
  30. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetPerlRuntimeNative.so +0 -0
  31. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetPythonRuntimeNative.so +0 -0
  32. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetRuby278RuntimeNative.so +0 -0
  33. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetRubyRuntimeNative.so +0 -0
  34. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetTcpClient.so +0 -0
  35. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetTcpTlsClient.so +0 -0
  36. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libUtils.so +0 -0
  37. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libJavonetActivationService.so +0 -0
  38. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libJavonetTcpTlsClient.so +0 -0
  39. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libUtils.so +0 -0
  40. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/version.txt +1 -1
  41. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/NetVersion90LatestPatch.runtimeconfig.json +10 -0
  42. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/NetVersionLatest.runtimeconfig.json +2 -2
  43. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetActivationService.dylib +0 -0
  44. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetCppRuntimeNative.dylib +0 -0
  45. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetGoRuntimeNative.dylib +0 -0
  46. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetJvmRuntimeNative.dylib +0 -0
  47. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNetcoreRuntimeNative.dylib +0 -0
  48. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejs1816RuntimeNative.dylib +0 -0
  49. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejsRuntimeNative.dylib +0 -0
  50. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetPerlRuntimeNative.dylib +0 -0
  51. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetPythonRuntimeNative.dylib +0 -0
  52. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetRuby278RuntimeNative.dylib +0 -0
  53. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetRubyRuntimeNative.dylib +0 -0
  54. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetTcpClient.dylib +0 -0
  55. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetTcpTlsClient.dylib +0 -0
  56. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libUtils.dylib +0 -0
  57. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libpython3.11.dylib +0 -0
  58. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/version.txt +1 -1
  59. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetActivationService.dll +0 -0
  60. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetCppRuntimeNative.dll +0 -0
  61. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetGoRuntimeNative.dll +0 -0
  62. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetJvmRuntimeNative.dll +0 -0
  63. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetNetcoreRuntimeNative.dll +0 -0
  64. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetPythonRuntimeNative.dll +0 -0
  65. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetRuby278RuntimeNative.dll +0 -0
  66. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetRubyRuntimeNative.dll +0 -0
  67. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpClient.dll +0 -0
  68. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpTlsClient.dll +0 -0
  69. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/NetVersion90LatestPatch.runtimeconfig.json +10 -0
  70. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/NetVersionLatest.runtimeconfig.json +2 -2
  71. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/Utils.dll +0 -0
  72. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/version.txt +0 -0
  73. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetActivationService.dll +0 -0
  74. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetClrRuntimeNative.dll +0 -0
  75. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetCppRuntimeNative.dll +0 -0
  76. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetGoRuntimeNative.dll +0 -0
  77. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetJvmRuntimeNative.dll +0 -0
  78. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNetcoreRuntimeNative.dll +0 -0
  79. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejs1816RuntimeNative.dll +0 -0
  80. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejsRuntimeNative.dll +0 -0
  81. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPerlRuntimeNative.dll +0 -0
  82. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPerlRuntimeNativeAuxiliary.dll +0 -0
  83. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPythonRuntimeNative.dll +0 -0
  84. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRuby278RuntimeNative.dll +0 -0
  85. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRubyRuntimeNative.dll +0 -0
  86. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpClient.dll +0 -0
  87. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpTlsClient.dll +0 -0
  88. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/NetVersion90LatestPatch.runtimeconfig.json +10 -0
  89. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/NetVersionLatest.runtimeconfig.json +2 -2
  90. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/Utils.dll +0 -0
  91. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/version.txt +1 -1
  92. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetActivationService.dll +0 -0
  93. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetClrRuntimeNative.dll +0 -0
  94. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetCppRuntimeNative.dll +0 -0
  95. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetGoRuntimeNative.dll +0 -0
  96. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetJvmRuntimeNative.dll +0 -0
  97. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetNetcoreRuntimeNative.dll +0 -0
  98. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPythonRuntimeNative.dll +0 -0
  99. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpClient.dll +0 -0
  100. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpTlsClient.dll +0 -0
  101. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/NetVersion90LatestPatch.runtimeconfig.json +10 -0
  102. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/NetVersionLatest.runtimeconfig.json +2 -2
  103. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/Utils.dll +0 -0
  104. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/version.txt +1 -1
  105. data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Core.dll +0 -0
  106. data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Utils.dll +0 -0
  107. data/lib/javonet-ruby-sdk/Binaries/Nodejs/index.js +64 -0
  108. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/generator/handler/AbstractGeneratorHandler.js +0 -1
  109. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/CreateInstanceGeneratorHandler.js +27 -0
  110. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/GeneratorHandler.js +38 -0
  111. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/GetInstanceFieldGeneratorHandler.js +26 -0
  112. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/GetStaticFieldGeneratorHandler.js +24 -0
  113. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/GetTypeGeneratorHandler.js +39 -0
  114. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/Handlers.js +58 -0
  115. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/InvokeInstanceMethodGeneratorHandler.js +33 -0
  116. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/InvokeStandaloneMethodGeneratorHandler.js +35 -0
  117. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/InvokeStaticMethodGeneratorHandler.js +35 -0
  118. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/SharedArgumentNameHandler.js +15 -0
  119. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/generator/handler/shared/SharedClassInstanceHandler.js +4 -5
  120. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/generator/handler/shared/SharedClassNameHandler.js +10 -12
  121. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/generator/handler/shared/SharedMethodNameHandler.js +9 -12
  122. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/SharedReturnTypeHandler.js +9 -0
  123. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedBodyHandler.js +18 -0
  124. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedCreateInstanceBodyHandler.js +29 -0
  125. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedGetInstanceFieldBodyHandler.js +21 -0
  126. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedGetStaticFieldBodyHandler.js +31 -0
  127. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedGetTypeBodyHandler.js +21 -0
  128. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedInvokeInstanceMethodBodyHandler.js +33 -0
  129. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedInvokeStandaloneMethodBodyHandler.js +39 -0
  130. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedInvokeStaticMethodBodyHandler.js +39 -0
  131. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/internal/CommonGenerator.js +39 -0
  132. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/internal/NodejsStringBuilder.js +17 -0
  133. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/generator/internal/SharedHandlerType.js +2 -2
  134. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/generator/utils/StringUtils.js +2 -2
  135. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/AbstractHandler.js +12 -12
  136. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/ArrayGetItemHandler.js +3 -4
  137. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/ArrayGetRankHandler.js +5 -7
  138. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/ArrayGetSizeHandler.js +3 -4
  139. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/ArrayHandler.js +2 -3
  140. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/ArraySetItemHandler.js +4 -5
  141. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/CastingHandler.js +3 -3
  142. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/CreateClassInstanceHandler.js +36 -0
  143. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/DestructReferenceHandler.js +3 -4
  144. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/EnableNamespaceHandler.js +8 -11
  145. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/EnableTypeHandler.js +8 -10
  146. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/GetGlobalStaticFieldHandler.js +37 -0
  147. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/GetInstanceFieldHandler.js +35 -0
  148. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/GetStaticFieldHandler.js +36 -0
  149. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/GetTypeHandler.js +63 -0
  150. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/Handler.js +12 -11
  151. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/InvokeGlobalMethodHandler.js +43 -0
  152. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/InvokeInstanceMethodHandler.js +38 -0
  153. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/InvokeStandaloneMethodHandler.js +56 -0
  154. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/InvokeStaticMethodHandler.js +38 -0
  155. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/LoadLibraryHandler.js +9 -2
  156. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/ResolveReferenceHandler.js +13 -0
  157. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/SetGlobalStaticFieldHandler.js +38 -0
  158. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/SetInstanceFieldHandler.js +35 -0
  159. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/SetStaticFieldHandler.js +33 -0
  160. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/ValueHandler.js +3 -5
  161. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/interpreter/Interpreter.js +142 -0
  162. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/namespaceCache/NamespaceCache.js +12 -12
  163. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/protocol/CommandDeserializer.js +43 -48
  164. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/protocol/CommandSerializer.js +4 -5
  165. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/protocol/TypeDeserializer.js +17 -15
  166. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/protocol/TypeSerializer.js +6 -7
  167. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/receiver/Receiver.js +32 -0
  168. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/receiver/ReceiverNative.js +3 -3
  169. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/referenceCache/ReferencesCache.js +4 -4
  170. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/transmitter/Transmitter.js +2 -3
  171. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/transmitter/TransmitterWebsocket.js +33 -0
  172. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/transmitter/TransmitterWrapper.js +34 -0
  173. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/typeCache/TypeCache.js +12 -12
  174. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/webSocketClient/WebSocketClient.js +131 -0
  175. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/declarations.d.ts +64 -0
  176. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/ConfigRuntimeFactory.js +145 -0
  177. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/InvocationContext.js +454 -0
  178. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/Javonet.js +89 -0
  179. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/RuntimeContext.js +266 -0
  180. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/RuntimeFactory.js +78 -0
  181. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/tools/JsonFileResolver.js +101 -0
  182. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/tools/SdkExceptionHelper.js +79 -0
  183. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/Command.js +69 -0
  184. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{utils → lib/utils}/CommandType.js +6 -2
  185. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/ConnectionType.js +8 -0
  186. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{utils → lib/utils}/ExceptionType.js +6 -3
  187. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/RuntimeLogger.js +30 -0
  188. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{utils → lib/utils}/RuntimeName.js +6 -3
  189. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/RuntimeNameHandler.js +34 -0
  190. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/StringEncodingMode.js +9 -0
  191. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{utils → lib/utils}/Type.js +5 -2
  192. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{utils → lib/utils}/connectionData/IConnectionData.js +4 -6
  193. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/connectionData/InMemoryConnectionData.js +35 -0
  194. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/connectionData/TcpConnectionData.js +77 -0
  195. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/connectionData/WsConnectionData.js +50 -0
  196. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{utils → lib/utils}/exception/ExceptionSerializer.js +24 -31
  197. data/lib/javonet-ruby-sdk/Binaries/Nodejs/{utils → lib/utils}/exception/ExceptionThrower.js +36 -30
  198. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/uuid/REGEX.js +2 -0
  199. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/uuid/rng.js +12 -0
  200. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/uuid/stringify.js +51 -0
  201. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/uuid/v4.js +27 -0
  202. data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/uuid/validate.js +6 -0
  203. 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
  204. 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
  205. 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
  206. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/List/Util/Util.so +0 -0
  207. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Moose/Moose.so +0 -0
  208. 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
  209. 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
  210. 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
  211. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Want/Want.so +0 -0
  212. 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
  213. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod +90 -90
  214. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Receiver/Receiver.pm +5 -6
  215. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Javonet.pm +10 -0
  216. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Sdk/Core/RuntimeLogger.pm +2 -2
  217. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Data/UUID/UUID.xs.dll +0 -0
  218. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/PPI/XS/XS.xs.dll +0 -0
  219. 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
  220. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Want/Want.xs.dll +0 -0
  221. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/autobox/autobox.xs.dll +0 -0
  222. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/perllocal.pod +19 -19
  223. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Receiver/Receiver.pm +5 -6
  224. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Javonet.pm +10 -0
  225. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Sdk/Core/RuntimeLogger.pm +2 -2
  226. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/__pycache__/__init__.cpython-312.pyc +0 -0
  227. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/delegateCache/__pycache__/DelegatesCache.cpython-312.pyc +0 -0
  228. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/delegateCache/__pycache__/__init__.cpython-312.pyc +0 -0
  229. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/generator/__pycache__/__init__.cpython-312.pyc +0 -0
  230. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/generator/internal/__pycache__/PythonStringBuilder.cpython-312.pyc +0 -0
  231. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/generator/internal/__pycache__/__init__.cpython-312.pyc +0 -0
  232. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/GetInstanceFieldHandler.py +1 -1
  233. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/GetTypeHandler.py +7 -4
  234. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractCommandHandler.cpython-312.pyc +0 -0
  235. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractHandler.cpython-312.pyc +0 -0
  236. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetItemHandler.cpython-312.pyc +0 -0
  237. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetRankHandler.cpython-312.pyc +0 -0
  238. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetSizeHandler.cpython-312.pyc +0 -0
  239. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayHandler.cpython-312.pyc +0 -0
  240. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArraySetItemHandler.cpython-312.pyc +0 -0
  241. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CastingHandler.cpython-312.pyc +0 -0
  242. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CreateClassInstanceHandler.cpython-312.pyc +0 -0
  243. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/DestructReferenceHandler.cpython-312.pyc +0 -0
  244. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableNamespaceHandler.cpython-312.pyc +0 -0
  245. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableTypeHandler.cpython-312.pyc +0 -0
  246. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumItemHandler.cpython-312.pyc +0 -0
  247. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumNameHandler.cpython-312.pyc +0 -0
  248. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumValueHandler.cpython-312.pyc +0 -0
  249. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetInstanceFieldHandler.cpython-312.pyc +0 -0
  250. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetInstanceMethodAsDelegateHandler.cpython-312.pyc +0 -0
  251. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetStaticFieldHandler.cpython-312.pyc +0 -0
  252. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetStaticMethodAsDelegateHandler.cpython-312.pyc +0 -0
  253. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetTypeHandler.cpython-312.pyc +0 -0
  254. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/Handler.cpython-312.pyc +0 -0
  255. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/HandlerDictionary.cpython-312.pyc +0 -0
  256. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeDelegateHandler.cpython-312.pyc +0 -0
  257. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeInstanceMethodHandler.cpython-312.pyc +0 -0
  258. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeStaticMethodHandler.cpython-312.pyc +0 -0
  259. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/LoadLibraryHandler.cpython-312.pyc +0 -0
  260. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/PassDelegateHandler.cpython-312.pyc +0 -0
  261. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ResolveInstanceHandler.cpython-312.pyc +0 -0
  262. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetInstanceFieldHandler.cpython-312.pyc +0 -0
  263. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetStaticFieldHandler.cpython-312.pyc +0 -0
  264. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ValueHandler.cpython-312.pyc +0 -0
  265. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/__init__.cpython-312.pyc +0 -0
  266. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/Interpreter.cpython-312.pyc +0 -0
  267. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/__init__.cpython-312.pyc +0 -0
  268. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/NamespaceCache.cpython-312.pyc +0 -0
  269. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/__init__.cpython-312.pyc +0 -0
  270. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandDeserializer.cpython-312.pyc +0 -0
  271. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandSerializer.cpython-312.pyc +0 -0
  272. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeDeserializer.cpython-312.pyc +0 -0
  273. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeSerializer.cpython-312.pyc +0 -0
  274. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/__init__.cpython-312.pyc +0 -0
  275. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/Receiver.py +3 -4
  276. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/Receiver.cpython-312.pyc +0 -0
  277. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/__init__.cpython-312.pyc +0 -0
  278. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/ReferencesCache.cpython-312.pyc +0 -0
  279. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/__init__.cpython-312.pyc +0 -0
  280. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/TypeCache.cpython-312.pyc +0 -0
  281. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/__init__.cpython-312.pyc +0 -0
  282. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/RuntimeLogger.py +1 -1
  283. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Command.cpython-312.pyc +0 -0
  284. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/CommandType.cpython-312.pyc +0 -0
  285. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ConnectionType.cpython-312.pyc +0 -0
  286. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ExceptionType.cpython-312.pyc +0 -0
  287. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/RuntimeLogger.cpython-312.pyc +0 -0
  288. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/RuntimeName.cpython-312.pyc +0 -0
  289. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/StringEncodingMode.cpython-312.pyc +0 -0
  290. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Type.cpython-312.pyc +0 -0
  291. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  292. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/IConnectionData.cpython-312.pyc +0 -0
  293. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/InMemoryConnectionData.cpython-312.pyc +0 -0
  294. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/__init__.cpython-312.pyc +0 -0
  295. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/ExceptionSerializer.cpython-312.pyc +0 -0
  296. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/__init__.cpython-312.pyc +0 -0
  297. data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/handler/get_instance_field_handler.rb +3 -3
  298. data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/handler/get_static_field_handler.rb +2 -2
  299. data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/handler/get_type_handler.rb +29 -18
  300. data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/handler/load_library_handler.rb +8 -0
  301. data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/handler/set_instance_field_handler.rb +7 -3
  302. data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/handler/set_static_field_handler.rb +2 -2
  303. data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/handler/get_instance_field_handler.rb +3 -3
  304. data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/handler/get_static_field_handler.rb +2 -2
  305. data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/handler/get_type_handler.rb +29 -18
  306. data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/handler/load_library_handler.rb +8 -0
  307. data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/handler/set_instance_field_handler.rb +7 -3
  308. data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/handler/set_static_field_handler.rb +2 -2
  309. data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/get_instance_field_handler.rb +3 -3
  310. data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/get_static_field_handler.rb +2 -2
  311. data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/get_type_handler.rb +29 -18
  312. data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/load_library_handler.rb +8 -0
  313. data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/set_instance_field_handler.rb +7 -3
  314. data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/set_static_field_handler.rb +2 -2
  315. data/lib/javonet-ruby-sdk/Binaries/version.txt +1 -1
  316. data/lib/javonet-ruby-sdk/core/handler/get_instance_field_handler.rb +3 -3
  317. data/lib/javonet-ruby-sdk/core/handler/get_static_field_handler.rb +2 -2
  318. data/lib/javonet-ruby-sdk/core/handler/get_type_handler.rb +29 -18
  319. data/lib/javonet-ruby-sdk/core/handler/load_library_handler.rb +8 -0
  320. data/lib/javonet-ruby-sdk/core/handler/set_instance_field_handler.rb +7 -3
  321. data/lib/javonet-ruby-sdk/core/handler/set_static_field_handler.rb +2 -2
  322. data/lib/javonet-ruby-sdk/sdk/javonet.rb +11 -1
  323. metadata +105 -85
  324. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/CreateInstanceGeneratorHandler.js +0 -17
  325. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/GeneratorHandler.js +0 -30
  326. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/GetInstanceFieldGeneratorHandler.js +0 -18
  327. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/GetStaticFieldGeneratorHandler.js +0 -17
  328. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/GetTypeGeneratorHandler.js +0 -26
  329. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/Handlers.js +0 -51
  330. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/InvokeInstanceMethodGeneratorHandler.js +0 -18
  331. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/InvokeStaticMethodGeneratorHandler.js +0 -20
  332. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/SharedArgumentNameHandler.js +0 -11
  333. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/SharedReturnTypeHandler.js +0 -10
  334. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/body/SharedBodyHandler.js +0 -14
  335. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/body/SharedCreateInstanceBodyHandler.js +0 -24
  336. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/body/SharedGetInstanceFieldBodyHandler.js +0 -19
  337. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/body/SharedGetStaticFieldBodyHandler.js +0 -27
  338. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/body/SharedGetTypeBodyHandler.js +0 -20
  339. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/body/SharedInvokeInstanceMethodBodyHandler.js +0 -27
  340. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/body/SharedInvokeStaticMethodBodyHandler.js +0 -31
  341. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/internal/CommonGenerator.js +0 -26
  342. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/internal/NodejsStringBuilder.js +0 -18
  343. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/CreateClassInstanceHandler.js +0 -38
  344. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/GetGlobalStaticFieldHandler.js +0 -39
  345. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/GetInstanceFieldHandler.js +0 -35
  346. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/GetStaticFieldHandler.js +0 -36
  347. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/GetTypeHandler.js +0 -47
  348. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/InvokeGlobalMethodHandler.js +0 -47
  349. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/InvokeInstanceMethodHandler.js +0 -40
  350. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/InvokeStaticMethodHandler.js +0 -40
  351. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/ResolveReferenceHandler.js +0 -14
  352. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/SetGlobalStaticFieldHandler.js +0 -44
  353. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/SetInstanceFieldHandler.js +0 -35
  354. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/SetStaticFieldHandler.js +0 -33
  355. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/interpreter/Interpreter.js +0 -65
  356. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/receiver/Receiver.js +0 -26
  357. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/transmitter/TransmitterWrapper.js +0 -28
  358. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/webSocketClient/WebSocketClient.js +0 -133
  359. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/Command.js +0 -66
  360. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/ConnectionType.js +0 -5
  361. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/RuntimeLogger.js +0 -27
  362. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/RuntimeNameHandler.js +0 -30
  363. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/StringEncodingMode.js +0 -6
  364. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/connectionData/InMemoryConnectionData.js +0 -28
  365. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/connectionData/TcpConnectionData.js +0 -69
  366. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/connectionData/WsConnectionData.js +0 -33
  367. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/uuid/REGEX.js +0 -1
  368. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/uuid/rng.js +0 -12
  369. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/uuid/stringify.js +0 -51
  370. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/uuid/v4.js +0 -27
  371. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/uuid/validate.js +0 -6
@@ -0,0 +1,266 @@
1
+ /* eslint-disable valid-typeof */
2
+ const Interpreter = require('../core/interpreter/Interpreter')
3
+ const Command = require('../utils/Command')
4
+ const CommandType = require('../utils/CommandType')
5
+ const { InvocationContext, InvocationWsContext } = require('./InvocationContext')
6
+ const ConnectionType = require('../utils/ConnectionType')
7
+ const ExceptionThrower = require('../utils/exception/ExceptionThrower')
8
+
9
+ /**
10
+ * Represents a single context which allows interaction with a selected technology.
11
+ * Refers to a single instance of the called runtime within a particular target OS process.
12
+ * This can be either the local currently running process (inMemory) or a particular remote process identified by the IP Address and PORT of the target Javonet instance.
13
+ * Multiple Runtime Contexts can be initialized within one process.
14
+ * Calling the same technology on inMemory communication channel will return the existing instance of runtime context.
15
+ * Calling the same technology on TCP channel but on different nodes will result in unique Runtime Contexts.
16
+ * Within the runtime context, any number of libraries can be loaded and any objects from the target technology can be interacted with, as they are aware of each other due to sharing the same memory space and same runtime instance.
17
+ * @see [Javonet Guides]{@link https://www.javonet.com/guides/v2/javascript/foundations/runtime-context}
18
+ * @class
19
+ */
20
+ class RuntimeContext {
21
+ static memoryRuntimeContexts = new Map()
22
+ static networkRuntimeContexts = new Map()
23
+ static webSocketRuntimeContexts = new Map()
24
+ #currentCommand
25
+ #responseCommand
26
+ #interpreter
27
+ // eslint-disable-next-line no-unused-private-class-members
28
+ #generatorHandler
29
+
30
+ constructor(runtimeName, connectionData) {
31
+ this.runtimeName = runtimeName
32
+ this.connectionData = connectionData
33
+ this.#currentCommand = null
34
+ this.#responseCommand = null
35
+ this.#interpreter = new Interpreter()
36
+ this.#generatorHandler = RuntimeContext.getGeneratorHandler()
37
+ }
38
+
39
+ static getGeneratorHandler() {
40
+ try {
41
+ const GeneratorHandler = require(require.resolve('../core/generator/handler/GeneratorHandler'))
42
+ if (GeneratorHandler) {
43
+ return new GeneratorHandler()
44
+ }
45
+ // eslint-disable-next-line no-unused-vars
46
+ } catch (error) {
47
+ // TODO: handle evnvs switch
48
+ }
49
+ }
50
+
51
+ static getInstance(runtimeName, connectionData) {
52
+ switch (connectionData.connectionType) {
53
+ case ConnectionType.IN_MEMORY:
54
+ if (runtimeName in RuntimeContext.memoryRuntimeContexts) {
55
+ let runtimeCtx = RuntimeContext.memoryRuntimeContexts[runtimeName]
56
+ runtimeCtx.currentCommand = null
57
+ return runtimeCtx
58
+ } else {
59
+ let runtimeCtx = new RuntimeContext(runtimeName, connectionData)
60
+ RuntimeContext.memoryRuntimeContexts[runtimeName] = runtimeCtx
61
+ return runtimeCtx
62
+ }
63
+ case ConnectionType.TCP: {
64
+ let key1 = runtimeName + JSON.stringify(connectionData)
65
+ if (key1 in RuntimeContext.networkRuntimeContexts) {
66
+ let runtimeCtx = RuntimeContext.networkRuntimeContexts[key1]
67
+ runtimeCtx.currentCommand = null
68
+ return runtimeCtx
69
+ } else {
70
+ let runtimeCtx = new RuntimeContext(runtimeName, connectionData)
71
+ RuntimeContext.networkRuntimeContexts[key1] = runtimeCtx
72
+ return runtimeCtx
73
+ }
74
+ }
75
+ case ConnectionType.WEB_SOCKET: {
76
+ let key2 = runtimeName + JSON.stringify(connectionData)
77
+ if (key2 in RuntimeContext.webSocketRuntimeContexts) {
78
+ let runtimeCtx = RuntimeContext.webSocketRuntimeContexts[key2]
79
+ runtimeCtx.currentCommand = null
80
+ return runtimeCtx
81
+ } else {
82
+ let runtimeCtx = new RuntimeContext(runtimeName, connectionData)
83
+ RuntimeContext.webSocketRuntimeContexts[key2] = runtimeCtx
84
+ return runtimeCtx
85
+ }
86
+ }
87
+ default:
88
+ throw new Error('Invalid connection type')
89
+ }
90
+ }
91
+
92
+ /**
93
+ * Executes the current command. The initial state of RuntimeContext is non-materialized,
94
+ * wrapping either a single command or a chain of recursively nested commands.
95
+ * Commands become nested through each invocation of methods on RuntimeContext.
96
+ * Each invocation triggers the creation of a new RuntimeContext instance wrapping the current command with a new parent command.
97
+ * The developer can decide at any moment of the materialization for the context, taking full control of the chunks of the expression being transferred and processed on the target runtime.
98
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/execute-method)
99
+ * @method
100
+ */
101
+ execute() {
102
+ this.#responseCommand = this.#interpreter.execute(this.#currentCommand, this.connectionData)
103
+ this.#currentCommand = null
104
+ if (this.#responseCommand.commandType === CommandType.Exception) {
105
+ throw ExceptionThrower.throwException(this.#responseCommand)
106
+ }
107
+ }
108
+
109
+ /**
110
+ * Adds a reference to a library. Javonet allows you to reference and use modules or packages written in various languages.
111
+ * This method allows you to use any library from all supported technologies. The necessary libraries need to be referenced.
112
+ * The argument is a relative or full path to the library. If the library has dependencies on other libraries, the latter needs to be added first.
113
+ * After referencing the library, any objects stored in this package can be used. Use static classes, create instances, call methods, use fields and properties, and much more.
114
+ * @param {string} libraryPath - The relative or full path to the library.
115
+ * @returns {RuntimeContext} RuntimeContext instance.
116
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/getting-started/adding-references-to-libraries)
117
+ * @method
118
+ */
119
+ loadLibrary(libraryPath) {
120
+ let localCommand = new Command(this.runtimeName, CommandType.LoadLibrary, [libraryPath])
121
+ this.#currentCommand = this.#buildCommand(localCommand)
122
+ this.execute()
123
+ return this
124
+ }
125
+
126
+ /**
127
+ * Retrieves a reference to a specific type. The type can be a class, interface or enum. The type can be retrieved from any referenced library.
128
+ * @param {string} typeName - The full name of the type.
129
+ * @param {...any} args - The arguments to be passed, if needed
130
+ * @returns {InvocationContext} InvocationContext instance, that wraps the command to get the type.
131
+ * @method
132
+ */
133
+ getType(typeName, ...args) {
134
+ let localCommand = new Command(this.runtimeName, CommandType.GetType, [typeName, ...args])
135
+ this.#currentCommand = null
136
+ if (this.connectionData.connectionType === ConnectionType.WEB_SOCKET) {
137
+ return new InvocationWsContext(
138
+ this.runtimeName,
139
+ this.connectionData,
140
+ this.#buildCommand(localCommand)
141
+ )
142
+ }
143
+ return new InvocationContext(this.runtimeName, this.connectionData, this.#buildCommand(localCommand))
144
+ }
145
+
146
+ /**
147
+ * Casts the provided value to a specific type. This method is used when invoking methods that require specific types of arguments.
148
+ * The arguments include the target type and the value to be cast. The target type must be retrieved from the called runtime using the getType method.
149
+ * After casting the value, it can be used as an argument when invoking methods.
150
+ * @param {...any} args - The target type and the value to be cast.
151
+ * @returns {InvocationContext} InvocationContext instance that wraps the command to cast the value.
152
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/casting/casting)
153
+ * @method
154
+ */
155
+ cast(...args) {
156
+ let localCommand = new Command(this.runtimeName, CommandType.Cast, args)
157
+ this.#currentCommand = null
158
+ if (this.connectionData.connectionType === ConnectionType.WEB_SOCKET) {
159
+ return new InvocationWsContext(
160
+ this.runtimeName,
161
+ this.connectionData,
162
+ this.#buildCommand(localCommand)
163
+ )
164
+ }
165
+ return new InvocationContext(this.runtimeName, this.connectionData, this.#buildCommand(localCommand))
166
+ }
167
+
168
+ /**
169
+ * Retrieves a specific item from an enum type. This method is used when working with enums from the called runtime.
170
+ * The arguments include the enum type and the name of the item. The enum type must be retrieved from the called runtime using the getType method.
171
+ * After retrieving the item, it can be used as an argument when invoking methods or for other operations.
172
+ * @param {...any} args - The enum type and the name of the item.
173
+ * @returns {InvocationContext} InvocationContext instance that wraps the command to get the enum item.
174
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/enums/using-enum-type)
175
+ * @method
176
+ */
177
+ getEnumItem(...args) {
178
+ let localCommand = new Command(this.runtimeName, CommandType.GetEnumItem, args)
179
+ this.#currentCommand = null
180
+ if (this.connectionData.connectionType === ConnectionType.WEB_SOCKET) {
181
+ return new InvocationWsContext(
182
+ this.runtimeName,
183
+ this.connectionData,
184
+ this.#buildCommand(localCommand)
185
+ )
186
+ }
187
+ return new InvocationContext(this.runtimeName, this.connectionData, this.#buildCommand(localCommand))
188
+ }
189
+
190
+ /**
191
+ * Creates a reference type argument that can be passed to a method with a ref parameter modifier. This method is used when working with methods from the called runtime that require arguments to be passed by reference.
192
+ * The arguments include the value and optionally the type of the reference. The type must be retrieved from the called runtime using the getType method.
193
+ * After creating the reference, it can be used as an argument when invoking methods.
194
+ * @param {...any} args - The value and optionally the type of the reference.
195
+ * @returns {InvocationContext} InvocationContext instance that wraps the command to create a reference as ref.
196
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/methods-arguments/passing-arguments-by-reference-with-ref-keyword)
197
+ * @method
198
+ */
199
+ asRef(...args) {
200
+ let localCommand = new Command(this.runtimeName, CommandType.AsRef, args)
201
+ this.#currentCommand = null
202
+ if (this.connectionData.connectionType === ConnectionType.WEB_SOCKET) {
203
+ return new InvocationWsContext(
204
+ this.runtimeName,
205
+ this.connectionData,
206
+ this.#buildCommand(localCommand)
207
+ )
208
+ }
209
+ return new InvocationContext(this.runtimeName, this.connectionData, this.#buildCommand(localCommand))
210
+ }
211
+
212
+ /**
213
+ * Creates a reference type argument that can be passed to a method with an out parameter modifier. This method is used when working with methods from the called runtime that require arguments to be passed by reference.
214
+ * The arguments include the value and optionally the type of the reference. The type must be retrieved from the called runtime using the getType method.
215
+ * After creating the reference, it can be used as an argument when invoking methods.
216
+ * @param {...any} args - The value and optionally the type of the reference.
217
+ * @returns {InvocationContext} InvocationContext instance that wraps the command to create a reference as out.
218
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/methods-arguments/passing-arguments-by-reference-with-out-keyword |Passing Arguments by Reference with out Keyword Guide)
219
+ * @method
220
+ */
221
+ asOut(...args) {
222
+ let localCommand = new Command(this.runtimeName, CommandType.AsOut, args)
223
+ this.#currentCommand = null
224
+ if (this.connectionData.connectionType === ConnectionType.WEB_SOCKET) {
225
+ return new InvocationWsContext(
226
+ this.runtimeName,
227
+ this.connectionData,
228
+ this.#buildCommand(localCommand)
229
+ )
230
+ }
231
+ return new InvocationContext(this.runtimeName, this.connectionData, this.#buildCommand(localCommand))
232
+ }
233
+
234
+ #buildCommand = function (command) {
235
+ for (let i = 0; i < command.payload.length; i++) {
236
+ command.payload[i] = this.#encapsulatePayloadItem(command.payload[i])
237
+ }
238
+ return command.prependArgToPayload(this.#currentCommand)
239
+ }
240
+
241
+ #encapsulatePayloadItem = function (payloadItem) {
242
+ if (typeof payloadItem === 'Command' || payloadItem instanceof Command) {
243
+ for (let i = 0; i < payloadItem.payload.length; i++) {
244
+ payloadItem.payload[i] = this.#encapsulatePayloadItem(payloadItem.payload[i])
245
+ }
246
+ return payloadItem
247
+ } else if (typeof payloadItem === 'InvocationContext' || payloadItem instanceof InvocationContext) {
248
+ return payloadItem.get_current_command()
249
+ } else if (payloadItem instanceof Array) {
250
+ for (let i = 0; i < payloadItem.length; i++) {
251
+ payloadItem[i] = this.#encapsulatePayloadItem(payloadItem[i])
252
+ }
253
+ return new Command(this.runtimeName, CommandType.Array, payloadItem)
254
+ } else {
255
+ return new Command(this.runtimeName, CommandType.Value, [payloadItem])
256
+ }
257
+ }
258
+
259
+ healthCheck() {
260
+ let localCommand = new Command(this.runtimeName, CommandType.Value, ['health_check'])
261
+ this.#currentCommand = this.#buildCommand(localCommand)
262
+ this.execute()
263
+ }
264
+ }
265
+
266
+ module.exports = RuntimeContext
@@ -0,0 +1,78 @@
1
+ const Runtime = require('../utils/RuntimeName')
2
+ const RuntimeContext = require('./RuntimeContext')
3
+
4
+ /**
5
+ * The RuntimeFactory class provides methods for creating runtime contexts.
6
+ * Each method corresponds to a specific runtime (CLR, JVM, .NET Core, Perl, Ruby, Node.js, Python) and returns a RuntimeContext instance for that runtime.
7
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/runtime-context)
8
+ */
9
+ class RuntimeFactory {
10
+ constructor(connectionData) {
11
+ this.connectionData = connectionData
12
+ }
13
+
14
+ /**
15
+ * Creates RuntimeContext instance to interact with the .NET Framework runtime.
16
+ * @return {RuntimeContext} a RuntimeContext instance for the .NET Framework runtime
17
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/runtime-context)
18
+ */
19
+ clr() {
20
+ return RuntimeContext.getInstance(Runtime.Clr, this.connectionData)
21
+ }
22
+
23
+ /**
24
+ * Creates RuntimeContext instance to interact with the JVM runtime.
25
+ * @return {RuntimeContext} a RuntimeContext instance for the JVM runtime
26
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/runtime-context)
27
+ */
28
+ jvm() {
29
+ return RuntimeContext.getInstance(Runtime.Jvm, this.connectionData)
30
+ }
31
+
32
+ /**
33
+ * Creates RuntimeContext instance to interact with the .NET runtime.
34
+ * @return {RuntimeContext} a RuntimeContext instance for the .NET runtime
35
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/runtime-context)
36
+ */
37
+ netcore() {
38
+ return RuntimeContext.getInstance(Runtime.Netcore, this.connectionData)
39
+ }
40
+
41
+ /**
42
+ * Creates RuntimeContext instance to interact with the Perl runtime.
43
+ * @return {RuntimeContext} a RuntimeContext instance for the Perl runtime
44
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/runtime-context)
45
+ */
46
+ perl() {
47
+ return RuntimeContext.getInstance(Runtime.Perl, this.connectionData)
48
+ }
49
+
50
+ /**
51
+ * Creates RuntimeContext instance to interact with the Python runtime.
52
+ * @return {RuntimeContext} a RuntimeContext instance for the Python runtime
53
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/runtime-context)
54
+ */
55
+ python() {
56
+ return RuntimeContext.getInstance(Runtime.Python, this.connectionData)
57
+ }
58
+
59
+ /**
60
+ * Creates RuntimeContext instance to interact with the Ruby runtime.
61
+ * @return {RuntimeContext} a RuntimeContext instance for the Ruby runtime
62
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/runtime-context)
63
+ */
64
+ ruby() {
65
+ return RuntimeContext.getInstance(Runtime.Ruby, this.connectionData)
66
+ }
67
+
68
+ /**
69
+ * Creates RuntimeContext instance to interact with Node.js runtime.
70
+ * @return {RuntimeContext} a RuntimeContext instance for the Node.js runtime
71
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/runtime-context)
72
+ */
73
+ nodejs() {
74
+ return RuntimeContext.getInstance(Runtime.Nodejs, this.connectionData)
75
+ }
76
+ }
77
+
78
+ module.exports = RuntimeFactory
@@ -0,0 +1,101 @@
1
+ const fs = require('fs')
2
+
3
+ function hasOwnProperty(obj, key) {
4
+ return Object.prototype.hasOwnProperty.call(obj, key)
5
+ }
6
+
7
+ class JsonFileResolver {
8
+ constructor(path) {
9
+ this.path = path
10
+ try {
11
+ const data = fs.readFileSync(this.path, 'utf8')
12
+ this.jsonObject = JSON.parse(data)
13
+ // eslint-disable-next-line no-unused-vars
14
+ } catch (err) {
15
+ throw new Error(
16
+ `Configuration file ${this.path} not found. Please check your configuration file.`
17
+ )
18
+ }
19
+ }
20
+ getLicenseKey() {
21
+ if (!hasOwnProperty(this.jsonObject, 'licenseKey')) {
22
+ throw new Error(
23
+ 'License key not found in configuration file. Please check your configuration file.'
24
+ )
25
+ }
26
+ return this.jsonObject.licenseKey
27
+ }
28
+
29
+ getRuntimes() {
30
+ return this.jsonObject.runtimes
31
+ }
32
+
33
+ getRuntime(runtimeName, configName) {
34
+ const runtimes = this.getRuntimes()
35
+ if (hasOwnProperty(runtimes, runtimeName)) {
36
+ const runtime = runtimes[runtimeName]
37
+ if (Array.isArray(runtime)) {
38
+ for (let item of runtime) {
39
+ if (item.name === configName) {
40
+ return item
41
+ }
42
+ }
43
+ } else if (runtime.name === configName) {
44
+ return runtime
45
+ }
46
+ }
47
+ throw new Error(
48
+ `Runtime config ${configName} not found in configuration file for runtime ${runtimeName}. Please check your configuration file.`
49
+ )
50
+ }
51
+
52
+ getChannel(runtimeName, configName) {
53
+ const runtime = this.getRuntime(runtimeName, configName)
54
+ if (!hasOwnProperty(runtime, 'channel')) {
55
+ throw new Error(
56
+ `Channel key not found in configuration file for config ${configName}. Please check your configuration file.`
57
+ )
58
+ }
59
+ return runtime.channel
60
+ }
61
+
62
+ getChannelType(runtimeName, configName) {
63
+ const channel = this.getChannel(runtimeName, configName)
64
+ if (!hasOwnProperty(channel, 'type')) {
65
+ throw new Error(
66
+ `Channel type not found in configuration file for config ${configName}. Please check your configuration file.`
67
+ )
68
+ }
69
+ return channel.type
70
+ }
71
+
72
+ getChannelHost(runtimeName, configName) {
73
+ const channel = this.getChannel(runtimeName, configName)
74
+ if (!hasOwnProperty(channel, 'host')) {
75
+ throw new Error(
76
+ `Channel host not found in configuration file for config ${configName}. Please check your configuration file.`
77
+ )
78
+ }
79
+ return channel.host
80
+ }
81
+
82
+ getChannelPort(runtimeName, configName) {
83
+ const channel = this.getChannel(runtimeName, configName)
84
+ if (!hasOwnProperty(channel, 'port')) {
85
+ throw new Error(
86
+ `Channel port not found in configuration file for config ${configName}. Please check your configuration file.`
87
+ )
88
+ }
89
+ return channel.port
90
+ }
91
+
92
+ getModules(runtimeName, configName) {
93
+ const runtime = this.getRuntime(runtimeName, configName)
94
+ if (hasOwnProperty(runtime, 'modules')) {
95
+ return runtime.modules
96
+ }
97
+ return ''
98
+ }
99
+ }
100
+
101
+ module.exports = JsonFileResolver
@@ -0,0 +1,79 @@
1
+ const https = require('https')
2
+ const os = require('os')
3
+ // const packageJson = require('../../../package.json')
4
+
5
+ const address = 'https://dc.services.visualstudio.com/v2/track'
6
+
7
+ /**
8
+ *
9
+ * @param {any} e
10
+ * @param {string} licenseKey
11
+ */
12
+ function sendExceptionToAppInsights(e, licenseKey) {
13
+ return new Promise((resolve, reject) => {
14
+ try {
15
+ const instrumentationKey = '2c751560-90c8-40e9-b5dd-534566514723'
16
+ // const javonetVersion = packageJson.version ? packageJson.version : '2.0.0'
17
+ const javonetVersion = '2.0.0'
18
+ const nodeName = os.hostname()
19
+ const operationName = 'JavonetSdkException'
20
+ const osName = os.platform()
21
+ const callingRuntimeName = 'Nodejs'
22
+ const eventMessage = e.message
23
+
24
+ const nowGMT = new Date().toISOString()
25
+ const jsonPayload = JSON.stringify({
26
+ name: 'AppEvents',
27
+ time: nowGMT,
28
+ iKey: instrumentationKey,
29
+ tags: {
30
+ 'ai.application.ver': javonetVersion,
31
+ 'ai.cloud.roleInstance': nodeName,
32
+ 'ai.operation.id': '0',
33
+ 'ai.operation.parentId': '0',
34
+ 'ai.operation.name': operationName,
35
+ 'ai.internal.sdkVersion': 'javonet:' + javonetVersion,
36
+ 'ai.internal.nodeName': nodeName,
37
+ },
38
+ data: {
39
+ baseType: 'EventData',
40
+ baseData: {
41
+ ver: 2,
42
+ name: eventMessage,
43
+ properties: {
44
+ OperatingSystem: osName,
45
+ LicenseKey: licenseKey,
46
+ CallingTechnology: callingRuntimeName,
47
+ },
48
+ },
49
+ },
50
+ })
51
+
52
+ const options = {
53
+ method: 'POST',
54
+ headers: {
55
+ 'Content-Type': 'application/json',
56
+ 'Content-Length': jsonPayload.length,
57
+ },
58
+ }
59
+
60
+ const req = https.request(address, options, (res) => {
61
+ console.log('POST Response Code ::', res.statusCode)
62
+ resolve(res.statusCode)
63
+ })
64
+
65
+ req.on('error', (error) => {
66
+ console.error(error)
67
+ reject(error)
68
+ })
69
+
70
+ req.write(jsonPayload)
71
+ req.end()
72
+ } catch (error) {
73
+ console.error(error)
74
+ reject(error)
75
+ }
76
+ })
77
+ }
78
+
79
+ module.exports = sendExceptionToAppInsights
@@ -0,0 +1,69 @@
1
+ const CommandType = require('./CommandType')
2
+
3
+ class Command {
4
+ /**
5
+ * Constructs a new Command instance.
6
+ * @param {number} runtimeName - The runtime name associated with the command.
7
+ * @param {number} commandType - The type of the command.
8
+ * @param {any} [payload] - The optional payload of the command.
9
+ * @method
10
+ */
11
+ constructor(runtimeName, commandType, payload = []) {
12
+ this.runtimeName = runtimeName
13
+ this.commandType = commandType
14
+ this.payload = payload
15
+ }
16
+
17
+ /**
18
+ * @param {any} [response]
19
+ * @param {number} runtimeName
20
+ */
21
+ static createResponse(response, runtimeName) {
22
+ return new Command(runtimeName, CommandType.Value, [response])
23
+ }
24
+
25
+ /**
26
+ * @param {any} [response]
27
+ * @param {number} runtimeName
28
+ * @method
29
+ */
30
+ static createReference(response, runtimeName) {
31
+ return new Command(runtimeName, CommandType.Reference, [response])
32
+ }
33
+
34
+ /**
35
+ * @param {any} [response]
36
+ * @param {number} runtimeName
37
+ * @returns {Command}
38
+ * @method
39
+ */
40
+ static createArrayResponse(response, runtimeName) {
41
+ return new Command(runtimeName, CommandType.Array, response)
42
+ }
43
+
44
+ dropFirstPayloadArg() {
45
+ return new Command(this.runtimeName, this.commandType, this.payload.slice(1))
46
+ }
47
+
48
+ /**
49
+ * @param {any} arg
50
+ * @returns {Command}
51
+ */
52
+ addArgToPayload(arg) {
53
+ return new Command(this.runtimeName, this.commandType, this.payload.concat(arg))
54
+ }
55
+
56
+ /**
57
+ * @param {Command|null} current_command
58
+ * @returns {Command}
59
+ */
60
+ prependArgToPayload(current_command) {
61
+ if (current_command == null) {
62
+ return new Command(this.runtimeName, this.commandType, this.payload)
63
+ } else {
64
+ return new Command(this.runtimeName, this.commandType, [current_command].concat(this.payload))
65
+ }
66
+ }
67
+ }
68
+
69
+ module.exports = Command
@@ -1,4 +1,5 @@
1
- module.exports = {
1
+ // @ts-check
2
+ const CommandType = /** @type {const} */ ({
2
3
  Value: 0,
3
4
  LoadLibrary: 1,
4
5
  InvokeStaticMethod: 2,
@@ -36,4 +37,7 @@ module.exports = {
36
37
  EnableNamespace: 34,
37
38
  EnableType: 35,
38
39
  CreateNull: 36,
39
- }
40
+ InvokeStandaloneMethod: 37,
41
+ })
42
+
43
+ module.exports = CommandType
@@ -0,0 +1,8 @@
1
+ // @ts-check
2
+ const ConnectionType = /** @type {const} */ ({
3
+ IN_MEMORY: 0,
4
+ TCP: 1,
5
+ WEB_SOCKET: 2,
6
+ })
7
+
8
+ module.exports = ConnectionType
@@ -1,4 +1,5 @@
1
- module.exports = {
1
+ // @ts-check
2
+ const ExceptionType = /** @type {const} */ ({
2
3
  EXCEPTION: 0,
3
4
  IO_EXCEPTION: 1,
4
5
  FILE_NOT_FOUND_EXCEPTION: 2,
@@ -6,5 +7,7 @@ module.exports = {
6
7
  ARITHMETIC_EXCEPTION: 4,
7
8
  ILLEGAL_ARGUMENT_EXCEPTION: 5,
8
9
  INDEX_OUT_OF_BOUNDS_EXCEPTION: 6,
9
- NULL_POINTER_EXCEPTION: 7
10
- }
10
+ NULL_POINTER_EXCEPTION: 7,
11
+ })
12
+
13
+ module.exports = ExceptionType
@@ -0,0 +1,30 @@
1
+ const os = require('os')
2
+ const process = require('process')
3
+
4
+ class RuntimeLogger {
5
+ static notLoggedYet = true
6
+
7
+ static getRuntimeInfo() {
8
+ try {
9
+ return (
10
+ `JavaScript Managed Runtime Info:\n` +
11
+ `Node.js Version: ${process.version}\n` +
12
+ `OS Version: ${os.type()} ${os.release()}\n` +
13
+ `Process Architecture: ${os.arch()}\n` +
14
+ `Current Directory: ${process.cwd()}\n`
15
+ )
16
+ // eslint-disable-next-line no-unused-vars
17
+ } catch (e) {
18
+ return 'JavaScript Managed Runtime Info: Error while fetching runtime info'
19
+ }
20
+ }
21
+
22
+ static printRuntimeInfo() {
23
+ if (this.notLoggedYet) {
24
+ console.log(this.getRuntimeInfo())
25
+ this.notLoggedYet = false
26
+ }
27
+ }
28
+ }
29
+
30
+ module.exports = RuntimeLogger