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,39 @@
1
+ const OS = require('os')
2
+ const AbstractGeneratorHandler = require('../../AbstractGeneratorHandler')
3
+ const CommonGenerator = require('../../../internal/CommonGenerator')
4
+ const SharedHandlerType = require('../../../internal/SharedHandlerType')
5
+ const StringUtils = require('../../../utils/StringUtils')
6
+ const { RuntimeName } = require('../../../../../..')
7
+
8
+ class SharedInvokeStaticMethodBodyHandler extends AbstractGeneratorHandler {
9
+ generate_code(existing_string_builder, common_command, used_object, handlers) {
10
+ handlers.SHARED_HANDLER[SharedHandlerType.RETURN_TYPE].generate_code(
11
+ existing_string_builder,
12
+ common_command,
13
+ used_object.payload[1],
14
+ handlers
15
+ )
16
+ existing_string_builder.append('Javonet.inMemory().')
17
+ existing_string_builder.append(
18
+ StringUtils.capitalizeFirstLetter(Object.keys(RuntimeName)[common_command.runtimeName])
19
+ )
20
+ existing_string_builder.append('().')
21
+ existing_string_builder.append('getType("')
22
+ existing_string_builder.append(used_object.payload[3])
23
+ existing_string_builder.append('").')
24
+ existing_string_builder.append('invokeStaticMethod("')
25
+ existing_string_builder.append(used_object.payload[0])
26
+ existing_string_builder.append('", ')
27
+ CommonGenerator.process_method_arguments_names(
28
+ existing_string_builder,
29
+ common_command,
30
+ used_object.payload[5],
31
+ handlers
32
+ )
33
+ existing_string_builder.append(').')
34
+ existing_string_builder.append('execute().resultValue')
35
+ existing_string_builder.append(OS.EOL)
36
+ }
37
+ }
38
+
39
+ module.exports = SharedInvokeStaticMethodBodyHandler
@@ -0,0 +1,39 @@
1
+ const SharedHandlerType = require('./SharedHandlerType')
2
+
3
+ class CommonGenerator {
4
+ static process_method_arguments(
5
+ existing_string_builder,
6
+ common_command,
7
+ type_array,
8
+ name_array,
9
+ handlers
10
+ ) {
11
+ for (let i = 0; i < name_array.length; i++) {
12
+ handlers.SHARED_HANDLER[SharedHandlerType.ARGUMENT_NAME].generate_code(
13
+ existing_string_builder,
14
+ common_command,
15
+ name_array[i],
16
+ handlers
17
+ )
18
+ if (i < name_array.length - 1) {
19
+ existing_string_builder.append(', ')
20
+ }
21
+ }
22
+ }
23
+
24
+ static process_method_arguments_names(existing_string_builder, common_command, name_array, handlers) {
25
+ for (let i = 0; i < name_array.length; i++) {
26
+ handlers.SHARED_HANDLER[SharedHandlerType.ARGUMENT_NAME].generate_code(
27
+ existing_string_builder,
28
+ common_command,
29
+ name_array[i],
30
+ handlers
31
+ )
32
+ if (i < name_array.length - 1) {
33
+ existing_string_builder.append(', ')
34
+ }
35
+ }
36
+ }
37
+ }
38
+
39
+ module.exports = CommonGenerator
@@ -0,0 +1,17 @@
1
+ class NodejsStringBuilder {
2
+ constructor() {
3
+ this.string = ''
4
+ }
5
+
6
+ string
7
+
8
+ append(string) {
9
+ this.string += string
10
+ }
11
+
12
+ getString() {
13
+ return this.string
14
+ }
15
+ }
16
+
17
+ module.exports = NodejsStringBuilder
@@ -6,5 +6,5 @@ module.exports = {
6
6
  MODIFIER: 4,
7
7
  TYPE: 5,
8
8
  CLAZZ_INSTANCE: 6,
9
- RETURN_TYPE: 7
10
- }
9
+ RETURN_TYPE: 7,
10
+ }
@@ -1,7 +1,7 @@
1
1
  class StringUtils {
2
2
  static capitalizeFirstLetter(string) {
3
- return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();
3
+ return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase()
4
4
  }
5
5
  }
6
6
 
7
- module.exports = StringUtils
7
+ module.exports = StringUtils
@@ -1,12 +1,13 @@
1
- const Handler = require('./Handler')
2
- const Command = require('../../utils/Command')
1
+ const { Command } = require('../../..')
3
2
 
4
3
  class AbstractHandler {
4
+ handlers = []
5
+
5
6
  constructor() {
6
- if(new.target === AbstractHandler)
7
- throw new TypeError('You cannot instantiate abstract class')
7
+ if (new.target === AbstractHandler) throw new TypeError('You cannot instantiate abstract class')
8
8
  }
9
9
 
10
+ // eslint-disable-next-line no-unused-vars
10
11
  process(command) {
11
12
  throw new Error('process must be implemented')
12
13
  }
@@ -17,23 +18,22 @@ class AbstractHandler {
17
18
  }
18
19
 
19
20
  iterate(cmd) {
20
- for(let i = 0; i < cmd.payload.length; i++) {
21
-
22
- if(cmd.payload[i] instanceof Command) {
21
+ for (let i = 0; i < cmd.payload.length; i++) {
22
+ if (cmd.payload[i] instanceof Command) {
23
23
  let inner = cmd.payload[i]
24
- cmd.payload[i] = Handler.handlers[inner.commandType].handleCommand(inner)
24
+ cmd.payload[i] = this.handlers[inner.commandType].handleCommand(inner)
25
25
  }
26
26
  }
27
27
  }
28
28
 
29
29
  process_stack_trace(error, class_name) {
30
- let stackTraceArray = error.stack.split('\n').map(frame => frame.trim());
30
+ let stackTraceArray = error.stack.split('\n').map((frame) => frame.trim())
31
31
  stackTraceArray.forEach((str, index) => {
32
32
  if (str.includes(class_name)) {
33
- stackTraceArray = stackTraceArray.slice(0, index).filter((s) => !s.includes(class_name));
33
+ stackTraceArray = stackTraceArray.slice(0, index).filter((s) => !s.includes(class_name))
34
34
  }
35
- });
36
- error.stack = stackTraceArray.join(" \n ")
35
+ })
36
+ error.stack = stackTraceArray.join(' \n ')
37
37
  return error
38
38
  }
39
39
  }
@@ -1,5 +1,4 @@
1
- const AbstractHandler = require("./AbstractHandler")
2
-
1
+ const AbstractHandler = require('./AbstractHandler')
3
2
 
4
3
  class ArrayGetItemHandler extends AbstractHandler {
5
4
  requiredParametersCount = 2
@@ -11,7 +10,7 @@ class ArrayGetItemHandler extends AbstractHandler {
11
10
  process(command) {
12
11
  try {
13
12
  if (command.payload.length < this.requiredParametersCount) {
14
- throw new Error("Array Get Item parameters mismatch")
13
+ throw new Error('Array Get Item parameters mismatch')
15
14
  }
16
15
  let array = command.payload[0]
17
16
  let indexes
@@ -36,4 +35,4 @@ class ArrayGetItemHandler extends AbstractHandler {
36
35
  }
37
36
  }
38
37
 
39
- module.exports = new ArrayGetItemHandler()
38
+ module.exports = new ArrayGetItemHandler()
@@ -1,8 +1,6 @@
1
- const AbstractHandler = require("./AbstractHandler")
2
-
1
+ const AbstractHandler = require('./AbstractHandler')
3
2
 
4
3
  class ArrayGetRankHandler extends AbstractHandler {
5
-
6
4
  requiredParametersCount = 1
7
5
 
8
6
  constructor() {
@@ -11,12 +9,12 @@ class ArrayGetRankHandler extends AbstractHandler {
11
9
  process(command) {
12
10
  try {
13
11
  if (command.payload.length < this.requiredParametersCount) {
14
- throw new Error("Array Get Rank parameters mismatch")
12
+ throw new Error('Array Get Rank parameters mismatch')
15
13
  }
16
14
  let array = command.payload[0]
17
15
  let rank = 0
18
- while(Array.isArray(array)) {
19
- rank = rank +1
16
+ while (Array.isArray(array)) {
17
+ rank = rank + 1
20
18
  array = array[0]
21
19
  }
22
20
 
@@ -27,4 +25,4 @@ class ArrayGetRankHandler extends AbstractHandler {
27
25
  }
28
26
  }
29
27
 
30
- module.exports = new ArrayGetRankHandler()
28
+ module.exports = new ArrayGetRankHandler()
@@ -1,5 +1,4 @@
1
- const AbstractHandler = require("./AbstractHandler")
2
-
1
+ const AbstractHandler = require('./AbstractHandler')
3
2
 
4
3
  class ArrayGetSizeHandler extends AbstractHandler {
5
4
  requiredParametersCount = 1
@@ -11,7 +10,7 @@ class ArrayGetSizeHandler extends AbstractHandler {
11
10
  process(command) {
12
11
  try {
13
12
  if (command.payload.length < this.requiredParametersCount) {
14
- throw new Error("Array Get Size parameters mismatch")
13
+ throw new Error('Array Get Size parameters mismatch')
15
14
  }
16
15
  let array = command.payload[0]
17
16
  let size = 1
@@ -27,4 +26,4 @@ class ArrayGetSizeHandler extends AbstractHandler {
27
26
  }
28
27
  }
29
28
 
30
- module.exports = new ArrayGetSizeHandler()
29
+ module.exports = new ArrayGetSizeHandler()
@@ -1,5 +1,4 @@
1
- const AbstractHandler = require("./AbstractHandler")
2
-
1
+ const AbstractHandler = require('./AbstractHandler')
3
2
 
4
3
  class ArrayHandler extends AbstractHandler {
5
4
  constructor() {
@@ -16,4 +15,4 @@ class ArrayHandler extends AbstractHandler {
16
15
  }
17
16
  }
18
17
 
19
- module.exports = new ArrayHandler()
18
+ module.exports = new ArrayHandler()
@@ -1,5 +1,4 @@
1
- const AbstractHandler = require("./AbstractHandler")
2
-
1
+ const AbstractHandler = require('./AbstractHandler')
3
2
 
4
3
  class ArraySetItemHandler extends AbstractHandler {
5
4
  requiredParametersCount = 3
@@ -11,7 +10,7 @@ class ArraySetItemHandler extends AbstractHandler {
11
10
  process(command) {
12
11
  try {
13
12
  if (command.payload.length < this.requiredParametersCount) {
14
- throw new Error("Array Set Item parameters mismatch")
13
+ throw new Error('Array Set Item parameters mismatch')
15
14
  }
16
15
 
17
16
  let array = command.payload[0]
@@ -34,11 +33,11 @@ class ArraySetItemHandler extends AbstractHandler {
34
33
  array[indexes[indexes.length - 1]] = value
35
34
  }
36
35
 
37
- return 0;
36
+ return 0
38
37
  } catch (error) {
39
38
  throw this.process_stack_trace(error, this.constructor.name)
40
39
  }
41
40
  }
42
41
  }
43
42
 
44
- module.exports = new ArraySetItemHandler()
43
+ module.exports = new ArraySetItemHandler()
@@ -1,10 +1,10 @@
1
- const AbstractHandler = require("./AbstractHandler")
2
-
1
+ const AbstractHandler = require('./AbstractHandler')
3
2
 
4
3
  class CastingHandler extends AbstractHandler {
4
+ // eslint-disable-next-line no-unused-vars
5
5
  process(command) {
6
6
  throw new Error(`Dynamically typed languages are not supporting casting`)
7
7
  }
8
8
  }
9
9
 
10
- module.exports = new CastingHandler()
10
+ module.exports = new CastingHandler()
@@ -0,0 +1,36 @@
1
+ const AbstractHandler = require('./AbstractHandler')
2
+
3
+ class CreateClassInstanceHandler extends AbstractHandler {
4
+ requiredParametersCount = 1
5
+
6
+ constructor() {
7
+ super()
8
+ }
9
+
10
+ process(command) {
11
+ try {
12
+ if (command.payload.length < this.requiredParametersCount) {
13
+ throw new Error('Create Class Instance parameters mismatch')
14
+ }
15
+ let clazz = command.payload[0]
16
+ let constructorArguments = command.payload.slice(1)
17
+ let instance = new clazz(...constructorArguments)
18
+ if (typeof instance === 'undefined') {
19
+ let methods = Object.getOwnPropertyNames(type).filter(function (property) {
20
+ return typeof type[property] === 'function'
21
+ })
22
+ let message = `Method 'constructor' not found in class. Available methods:\n`
23
+ methods.forEach((methodIter) => {
24
+ message += `${methodIter}\n`
25
+ })
26
+ throw new Error(message)
27
+ } else {
28
+ return instance
29
+ }
30
+ } catch (error) {
31
+ throw this.process_stack_trace(error, this.constructor.name)
32
+ }
33
+ }
34
+ }
35
+
36
+ module.exports = new CreateClassInstanceHandler()
@@ -1,8 +1,7 @@
1
- const AbstractHandler = require("./AbstractHandler");
2
- const ReferencesCache = require("../referenceCache/ReferencesCache")
1
+ const ReferencesCache = require('../referenceCache/ReferencesCache')
2
+ const AbstractHandler = require('./AbstractHandler')
3
3
 
4
4
  class DestructReferenceHandler extends AbstractHandler {
5
-
6
5
  constructor() {
7
6
  super()
8
7
  }
@@ -17,4 +16,4 @@ class DestructReferenceHandler extends AbstractHandler {
17
16
  }
18
17
  }
19
18
 
20
- module.exports = new DestructReferenceHandler()
19
+ module.exports = new DestructReferenceHandler()
@@ -1,8 +1,7 @@
1
- const AbstractHandler = require("./AbstractHandler");
2
- const NamespaceCache = require("../namespaceCache/NamespaceCache");
1
+ const NamespaceCache = require('../namespaceCache/NamespaceCache')
2
+ const AbstractHandler = require('./AbstractHandler')
3
3
 
4
4
  class EnableNamespaceHandler extends AbstractHandler {
5
-
6
5
  constructor() {
7
6
  super()
8
7
  this.requiredParametersCount = 1
@@ -11,27 +10,25 @@ class EnableNamespaceHandler extends AbstractHandler {
11
10
  process(command) {
12
11
  try {
13
12
  if (command.payload.length < this.requiredParametersCount) {
14
- throw new Error(this.constructor.name + " parameters mismatch")
13
+ throw new Error(this.constructor.name + ' parameters mismatch')
15
14
  }
16
- const namespace_cache = new NamespaceCache();
15
+ const namespace_cache = new NamespaceCache()
17
16
 
18
17
  for (let payload of command.payload) {
19
18
  if (typeof payload === 'string') {
20
- namespace_cache.cacheNamespace(payload);
19
+ namespace_cache.cacheNamespace(payload)
21
20
  }
22
21
  if (Array.isArray(payload)) {
23
22
  for (let namespace_to_enable of payload) {
24
- namespace_cache.cacheNamespace(namespace_to_enable);
23
+ namespace_cache.cacheNamespace(namespace_to_enable)
25
24
  }
26
25
  }
27
26
  }
28
- return 0;
29
-
27
+ return 0
30
28
  } catch (error) {
31
29
  throw this.process_stack_trace(error, this.constructor.name)
32
30
  }
33
-
34
31
  }
35
32
  }
36
33
 
37
- module.exports = new EnableNamespaceHandler()
34
+ module.exports = new EnableNamespaceHandler()
@@ -1,5 +1,5 @@
1
- const AbstractHandler = require("./AbstractHandler");
2
- const TypeCache = require("../typeCache/TypeCache");
1
+ const TypeCache = require('../typeCache/TypeCache')
2
+ const AbstractHandler = require('./AbstractHandler')
3
3
 
4
4
  class EnableTypeHandler extends AbstractHandler {
5
5
  requiredParametersCount = 1
@@ -11,27 +11,25 @@ class EnableTypeHandler extends AbstractHandler {
11
11
  process(command) {
12
12
  try {
13
13
  if (command.payload.length < this.requiredParametersCount) {
14
- throw new Error("Get Type parameters mismatch")
14
+ throw new Error('Get Type parameters mismatch')
15
15
  }
16
- const typeCache = new TypeCache();
16
+ const typeCache = new TypeCache()
17
17
 
18
18
  for (let payload of command.payload) {
19
19
  if (typeof payload === 'string') {
20
- typeCache.cacheType(payload);
20
+ typeCache.cacheType(payload)
21
21
  }
22
22
  if (Array.isArray(payload)) {
23
23
  for (let namespace_to_enable of payload) {
24
- typeCache.cacheType(namespace_to_enable);
24
+ typeCache.cacheType(namespace_to_enable)
25
25
  }
26
26
  }
27
27
  }
28
- return 0;
29
-
28
+ return 0
30
29
  } catch (error) {
31
30
  throw this.process_stack_trace(error, this.constructor.name)
32
31
  }
33
-
34
32
  }
35
33
  }
36
34
 
37
- module.exports = new EnableTypeHandler()
35
+ module.exports = new EnableTypeHandler()
@@ -0,0 +1,37 @@
1
+ const AbstractHandler = require('./AbstractHandler')
2
+
3
+ class GetGlobalStaticFieldHandler extends AbstractHandler {
4
+ requiredParametersCount = 1
5
+
6
+ constructor() {
7
+ super()
8
+ }
9
+
10
+ process(command) {
11
+ try {
12
+ if (command.payload.length < this.requiredParametersCount) {
13
+ throw new Error('Get global static field parameters mismatch')
14
+ }
15
+ const { payload } = command
16
+ const splitted = payload[0].split('.')
17
+ let fieldToGet
18
+
19
+ for (let i = 0; i < splitted.length; i++) {
20
+ fieldToGet = !fieldToGet ? global[splitted[i]] : fieldToGet[splitted[i]]
21
+ if (typeof fieldToGet === 'undefined') {
22
+ let fields = Object.keys(global)
23
+ let message = `Field ${payload[0]} not found in global. Available fields:\n`
24
+ fields.forEach((fieldIter) => {
25
+ message += `${fieldIter}\n`
26
+ })
27
+ throw new Error(message)
28
+ }
29
+ }
30
+ return fieldToGet
31
+ } catch (error) {
32
+ throw this.process_stack_trace(error, this.constructor.name)
33
+ }
34
+ }
35
+ }
36
+
37
+ module.exports = new GetGlobalStaticFieldHandler()
@@ -0,0 +1,35 @@
1
+ const AbstractHandler = require('./AbstractHandler')
2
+
3
+ class GetInstanceFieldHandler extends AbstractHandler {
4
+ requiredParametersCount = 2
5
+
6
+ constructor() {
7
+ super()
8
+ }
9
+
10
+ process(command) {
11
+ try {
12
+ if (command.payload.length < this.requiredParametersCount) {
13
+ throw new Error('Get Instance Field parameters mismatch')
14
+ }
15
+ const { payload } = command
16
+ let instance = payload[0]
17
+ let field = payload[1]
18
+ let instanceField = instance[field]
19
+ if (typeof instanceField === 'undefined') {
20
+ let fields = Object.keys(instance)
21
+ let message = `Field ${field} not found in object. Available fields:\n`
22
+ fields.forEach((fieldIter) => {
23
+ message += `${fieldIter}\n`
24
+ })
25
+ throw new Error(message)
26
+ } else {
27
+ return instanceField
28
+ }
29
+ } catch (error) {
30
+ throw this.process_stack_trace(error, this.constructor.name)
31
+ }
32
+ }
33
+ }
34
+
35
+ module.exports = new GetInstanceFieldHandler()
@@ -0,0 +1,36 @@
1
+ const AbstractHandler = require('./AbstractHandler')
2
+
3
+ class GetStaticFieldHandler extends AbstractHandler {
4
+ requiredParametersCount = 2
5
+
6
+ constructor() {
7
+ super()
8
+ }
9
+
10
+ process(command) {
11
+ try {
12
+ if (command.payload.length < this.requiredParametersCount) {
13
+ throw new Error('Array Static Field parameters mismatch')
14
+ }
15
+ const { payload } = command
16
+ let type = payload[0]
17
+ let field = payload[1]
18
+
19
+ let staticField = type[field]
20
+ if (typeof staticField === 'undefined') {
21
+ let fields = Object.keys(type)
22
+ let message = `Field ${field} not found in class. Available fields:\n`
23
+ fields.forEach((fieldIter) => {
24
+ message += `${fieldIter}\n`
25
+ })
26
+ throw new Error(message)
27
+ } else {
28
+ return staticField
29
+ }
30
+ } catch (error) {
31
+ throw this.process_stack_trace(error, this.constructor.name)
32
+ }
33
+ }
34
+ }
35
+
36
+ module.exports = new GetStaticFieldHandler()
@@ -0,0 +1,63 @@
1
+ const AbstractHandler = require('./AbstractHandler')
2
+ const LoadLibraryHandler = require('./LoadLibraryHandler')
3
+ const NamespaceCache = require('../namespaceCache/NamespaceCache')
4
+ const TypeCache = require('../typeCache/TypeCache')
5
+
6
+ class GetTypeHandler extends AbstractHandler {
7
+ constructor() {
8
+ super()
9
+ this.requiredParametersCount = 1
10
+ this.namespaceCache = new NamespaceCache()
11
+ this.typeCache = new TypeCache()
12
+ }
13
+
14
+ process(command) {
15
+ try {
16
+ if (command.payload.length < this.requiredParametersCount) {
17
+ throw new Error('Get Type parameters mismatch')
18
+ }
19
+ const { payload } = command
20
+ let typeName = payload[0]
21
+ typeName = typeName.replace('.js', '')
22
+ let typeToReturn = global[typeName]
23
+ if (typeToReturn === undefined) {
24
+ let message = `Type ${typeName} not found\n`
25
+ message += 'Available types:\n'
26
+ message += this.getAvailableTypes().join('\n')
27
+ throw new Error(message)
28
+ }
29
+
30
+ if (
31
+ (this.namespaceCache.isNamespaceCacheEmpty() && this.typeCache.isTypeCacheEmpty()) || // both caches are empty
32
+ this.namespaceCache.isTypeAllowed(typeToReturn) || // namespace is allowed
33
+ this.typeCache.isTypeAllowed(typeToReturn) // type is allowed
34
+ ) {
35
+ // continue - type is allowed
36
+ } else {
37
+ let allowed_namespaces = this.namespaceCache.getCachedNamespaces().join(', ')
38
+ let allowed_types = this.typeCache.getCachedTypes().join(', ')
39
+ throw new Error(
40
+ `Type ${typeToReturn.name} not allowed. \nAllowed namespaces: ${allowed_namespaces}\nAllowed types: ${allowed_types}`
41
+ )
42
+ }
43
+
44
+ return typeToReturn
45
+ } catch (error) {
46
+ throw this.process_stack_trace(error, this.constructor.name)
47
+ }
48
+ }
49
+
50
+ getAvailableTypes() {
51
+ let availableTypes = []
52
+ LoadLibraryHandler.getLoadedLibraries().forEach((lib) => {
53
+ const moduleExports = require(lib)
54
+ availableTypes.push(moduleExports.name)
55
+ Object.keys(moduleExports).forEach((key) => {
56
+ availableTypes.push(key)
57
+ })
58
+ })
59
+ return availableTypes
60
+ }
61
+ }
62
+
63
+ module.exports = new GetTypeHandler()