javonet-ruby-sdk 2.6.7 → 2.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/javonet-ruby-sdk/Binaries/Clr/JavonetClrRuntime.dll +0 -0
  4. data/lib/javonet-ruby-sdk/Binaries/Jvm/JavonetJvmRuntime.jar +0 -0
  5. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetActivationService.so +0 -0
  6. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetJvmRuntimeNative.so +0 -0
  7. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libUtils.so +0 -0
  8. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/version.txt +1 -1
  9. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetActivationService.so +0 -0
  10. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetJvmRuntimeNative.so +0 -0
  11. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNodejs2218RuntimeNative.so +0 -0
  12. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libUtils.so +0 -0
  13. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/version.txt +1 -1
  14. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/libJavonetActivationService.dylib +0 -0
  15. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/libJavonetJvmRuntimeNative.dylib +0 -0
  16. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/libUtils.dylib +0 -0
  17. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/version.txt +1 -1
  18. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetActivationService.dylib +0 -0
  19. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetJvmRuntimeNative.dylib +0 -0
  20. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejs2218RuntimeNative.dylib +0 -0
  21. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libUtils.dylib +0 -0
  22. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/version.txt +1 -1
  23. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/Configs.dll +0 -0
  24. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetActivationService.dll +0 -0
  25. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetCppRuntimeNative.dll +0 -0
  26. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetGoRuntimeNative.dll +0 -0
  27. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetJvmRuntimeNative.dll +0 -0
  28. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetNetcoreRuntimeNative.dll +0 -0
  29. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetPhpRuntimeNative.dll +0 -0
  30. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetPythonRuntimeNative.dll +0 -0
  31. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetRubyRuntimeNative.dll +0 -0
  32. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpClient.dll +0 -0
  33. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpTlsClient.dll +0 -0
  34. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/Utils.dll +0 -0
  35. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/version.txt +0 -0
  36. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/Configs.dll +0 -0
  37. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetActivationService.dll +0 -0
  38. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetClrRuntimeNative.dll +0 -0
  39. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetCppRuntimeNative.dll +0 -0
  40. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetGoRuntimeNative.dll +0 -0
  41. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetJvmRuntimeNative.dll +0 -0
  42. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNetcoreRuntimeNative.dll +0 -0
  43. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejs2218RuntimeNative.dll +0 -0
  44. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejsRuntimeNative.dll +0 -0
  45. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPerlRuntimeNative.dll +0 -0
  46. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPhp848RuntimeNative.dll +0 -0
  47. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPhpRuntimeNative.dll +0 -0
  48. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPython2RuntimeNative.dll +0 -0
  49. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPythonRuntimeNative.dll +0 -0
  50. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRubyRuntimeNative.dll +0 -0
  51. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpClient.dll +0 -0
  52. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpTlsClient.dll +0 -0
  53. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/Utils.dll +0 -0
  54. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/version.txt +1 -1
  55. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/Configs.dll +0 -0
  56. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetActivationService.dll +0 -0
  57. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetClrRuntimeNative.dll +0 -0
  58. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetCppRuntimeNative.dll +0 -0
  59. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetGoRuntimeNative.dll +0 -0
  60. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetJvmRuntimeNative.dll +0 -0
  61. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetNetcoreRuntimeNative.dll +0 -0
  62. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPhpRuntimeNative.dll +0 -0
  63. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPython2RuntimeNative.dll +0 -0
  64. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPythonRuntimeNative.dll +0 -0
  65. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpClient.dll +0 -0
  66. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpTlsClient.dll +0 -0
  67. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/Utils.dll +0 -0
  68. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/version.txt +1 -1
  69. data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Core.dll +0 -0
  70. data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Plugins.dll +0 -0
  71. data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Utils.dll +0 -0
  72. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/Handler.cjs +2 -7
  73. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/LoadLibraryHandler.cjs +15 -9
  74. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/PassDelegateHandler.cjs +2 -2
  75. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/interpreter/Interpreter.cjs +11 -33
  76. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/protocol/CommandSerializer.cjs +3 -8
  77. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/receiver/Receiver.cjs +6 -6
  78. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/Activator.cjs +44 -0
  79. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/ActivatorDetails.cjs +13 -3
  80. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/ConfigRuntimeFactory.cjs +9 -0
  81. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/InvocationContext.cjs +49 -56
  82. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/Javonet.cjs +3 -0
  83. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/RuntimeContext.cjs +8 -8
  84. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/configuration/ConfigSourceResolver.cjs +43 -21
  85. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/tools/ComplexTypeResolver.cjs +84 -34
  86. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/Handler.d.ts +2 -1
  87. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/PassDelegateHandler.d.ts +2 -2
  88. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/interpreter/Interpreter.d.ts +2 -2
  89. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/protocol/CommandSerializer.d.ts +3 -3
  90. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/receiver/Receiver.d.ts +4 -4
  91. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/Activator.d.ts +12 -0
  92. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/ActivatorDetails.d.ts +5 -3
  93. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/ConfigRuntimeFactory.d.ts +7 -0
  94. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/InvocationContext.d.ts +11 -10
  95. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/Javonet.d.ts +2 -1
  96. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/RuntimeContext.d.ts +4 -3
  97. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/configuration/ConfigSourceResolver.d.ts +21 -4
  98. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/tools/ComplexTypeResolver.d.ts +21 -5
  99. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/Primitives.d.ts +5 -0
  100. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/Primitives.cjs +201 -0
  101. 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
  102. 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
  103. 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
  104. 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
  105. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Moose/Moose.so +0 -0
  106. 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
  107. 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
  108. 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
  109. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Want/Want.so +0 -0
  110. 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
  111. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod +96 -96
  112. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Handler/CommandHandler/LoadLibraryHandler.pm +108 -11
  113. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Data/UUID/UUID.xs.dll +0 -0
  114. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/PPI/XS/XS.xs.dll +0 -0
  115. 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
  116. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Want/Want.xs.dll +0 -0
  117. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/autobox/autobox.xs.dll +0 -0
  118. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/perllocal.pod +22 -22
  119. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Handler/CommandHandler/LoadLibraryHandler.pm +108 -11
  120. data/lib/javonet-ruby-sdk/Binaries/Php/javonet/core/handler/LoadLibraryHandler.php +56 -21
  121. data/lib/javonet-ruby-sdk/Binaries/Php/javonet/core/interpreter/Interpreter.php +2 -2
  122. data/lib/javonet-ruby-sdk/Binaries/Php/javonet/core/protocol/CommandDeserializer.php +219 -106
  123. data/lib/javonet-ruby-sdk/Binaries/Php/javonet/core/protocol/CommandSerializer.php +55 -13
  124. data/lib/javonet-ruby-sdk/Binaries/Php/javonet/utils/Command.php +27 -9
  125. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/__pycache__/__init__.cpython-312.pyc +0 -0
  126. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/delegateCache/__pycache__/DelegatesCache.cpython-312.pyc +0 -0
  127. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/delegateCache/__pycache__/__init__.cpython-312.pyc +0 -0
  128. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/GetTypeHandler.py +2 -2
  129. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/LoadLibraryHandler.py +54 -14
  130. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractCommandHandler.cpython-312.pyc +0 -0
  131. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractHandler.cpython-312.pyc +0 -0
  132. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AddEventListenerHandler.cpython-312.pyc +0 -0
  133. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetItemHandler.cpython-312.pyc +0 -0
  134. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetRankHandler.cpython-312.pyc +0 -0
  135. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetSizeHandler.cpython-312.pyc +0 -0
  136. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayHandler.cpython-312.pyc +0 -0
  137. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayReferenceHandler.cpython-312.pyc +0 -0
  138. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArraySetItemHandler.cpython-312.pyc +0 -0
  139. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AsOutHandler.cpython-312.pyc +0 -0
  140. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AsRefHandler.cpython-312.pyc +0 -0
  141. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CastingHandler.cpython-312.pyc +0 -0
  142. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ConvertTypeHandler.cpython-312.pyc +0 -0
  143. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CreateClassInstanceHandler.cpython-312.pyc +0 -0
  144. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CreateNullHandler.cpython-312.pyc +0 -0
  145. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/DestructReferenceHandler.cpython-312.pyc +0 -0
  146. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableNamespaceHandler.cpython-312.pyc +0 -0
  147. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableTypeHandler.cpython-312.pyc +0 -0
  148. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ExceptionHandler.cpython-312.pyc +0 -0
  149. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GenerateLibHandler.cpython-312.pyc +0 -0
  150. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetAsyncOperationResultHandler.cpython-312.pyc +0 -0
  151. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumItemHandler.cpython-312.pyc +0 -0
  152. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumNameHandler.cpython-312.pyc +0 -0
  153. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumValueHandler.cpython-312.pyc +0 -0
  154. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetGlobalFieldHandler.cpython-312.pyc +0 -0
  155. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetInstanceFieldHandler.cpython-312.pyc +0 -0
  156. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetInstanceMethodAsDelegateHandler.cpython-312.pyc +0 -0
  157. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetKwargHandler.cpython-312.pyc +0 -0
  158. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetModuleHandler.cpython-312.pyc +0 -0
  159. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetRefValueHandler.cpython-312.pyc +0 -0
  160. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetResultTypeHandler.cpython-312.pyc +0 -0
  161. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetStaticFieldHandler.cpython-312.pyc +0 -0
  162. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetStaticMethodAsDelegateHandler.cpython-312.pyc +0 -0
  163. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetTypeHandler.cpython-312.pyc +0 -0
  164. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/Handler.cpython-312.pyc +0 -0
  165. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/HandlerDictionary.cpython-312.pyc +0 -0
  166. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/HeartBeatHandler.cpython-312.pyc +0 -0
  167. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeDelegateHandler.cpython-312.pyc +0 -0
  168. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeGenericMethodHandler.cpython-312.pyc +0 -0
  169. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeGenericStaticMethodHandler.cpython-312.pyc +0 -0
  170. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeGlobalFunctionHandler.cpython-312.pyc +0 -0
  171. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeInstanceMethodHandler.cpython-312.pyc +0 -0
  172. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeStaticMethodHandler.cpython-312.pyc +0 -0
  173. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/LoadLibraryHandler.cpython-312.pyc +0 -0
  174. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/OptimizeHandler.cpython-312.pyc +0 -0
  175. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/PassDelegateHandler.cpython-312.pyc +0 -0
  176. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/PluginWrapperHandler.cpython-312.pyc +0 -0
  177. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ResolveInstanceHandler.cpython-312.pyc +0 -0
  178. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/RetrieveArrayHandler.cpython-312.pyc +0 -0
  179. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetInstanceFieldHandler.cpython-312.pyc +0 -0
  180. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetStaticFieldHandler.cpython-312.pyc +0 -0
  181. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ValueHandler.cpython-312.pyc +0 -0
  182. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/__init__.cpython-312.pyc +0 -0
  183. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/Interpreter.cpython-312.pyc +0 -0
  184. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/__init__.cpython-312.pyc +0 -0
  185. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/NamespaceCache.cpython-312.pyc +0 -0
  186. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/__init__.cpython-312.pyc +0 -0
  187. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandDeserializer.cpython-312.pyc +0 -0
  188. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandSerializer.cpython-312.pyc +0 -0
  189. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeDeserializer.cpython-312.pyc +0 -0
  190. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeSerializer.cpython-312.pyc +0 -0
  191. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/__init__.cpython-312.pyc +0 -0
  192. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/Receiver.cpython-312.pyc +0 -0
  193. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/__init__.cpython-312.pyc +0 -0
  194. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/ReferencesCache.cpython-312.pyc +0 -0
  195. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/__init__.cpython-312.pyc +0 -0
  196. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/TypeCache.cpython-312.pyc +0 -0
  197. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/__init__.cpython-312.pyc +0 -0
  198. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/LazyModuleLoader.py +8 -11
  199. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Command.cpython-312.pyc +0 -0
  200. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/CommandType.cpython-312.pyc +0 -0
  201. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ConnectionType.cpython-312.pyc +0 -0
  202. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ExceptionType.cpython-312.pyc +0 -0
  203. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/LazyModuleLoader.cpython-312.pyc +0 -0
  204. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/RuntimeLogger.cpython-312.pyc +0 -0
  205. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/RuntimeName.cpython-312.pyc +0 -0
  206. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/StringEncodingMode.cpython-312.pyc +0 -0
  207. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Type.cpython-312.pyc +0 -0
  208. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/TypesHandler.cpython-312.pyc +0 -0
  209. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/UtilsConst.cpython-312.pyc +0 -0
  210. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  211. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/IConnectionData.cpython-312.pyc +0 -0
  212. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/InMemoryConnectionData.cpython-312.pyc +0 -0
  213. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/__init__.cpython-312.pyc +0 -0
  214. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/ExceptionSerializer.py +1 -1
  215. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/ExceptionSerializer.cpython-312.pyc +0 -0
  216. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/ExceptionThrower.cpython-312.pyc +0 -0
  217. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/JavonetException.cpython-312.pyc +0 -0
  218. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/__init__.cpython-312.pyc +0 -0
  219. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/messageHelper/__pycache__/MessageHelper.cpython-312.pyc +0 -0
  220. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/messageHelper/__pycache__/__init__.cpython-312.pyc +0 -0
  221. data/lib/javonet-ruby-sdk/Binaries/version.txt +1 -1
  222. data/lib/javonet-ruby-sdk/core/handler/load_library_handler.rb +22 -9
  223. data/lib/javonet-ruby-sdk/sdk/config_runtime_factory.rb +8 -0
  224. data/lib/javonet-ruby-sdk/utils/exceptions/exception_serializer.rb +0 -1
  225. metadata +6 -2
@@ -36,7 +36,7 @@ class InvocationContext {
36
36
  #connectionData;
37
37
  /** @type {Command | null} */
38
38
  #currentCommand = null;
39
- /** @type {Command | Promise<Command> | null} */
39
+ /** @type {Command | null} */
40
40
  #responseCommand = null;
41
41
  /** @type {boolean} */
42
42
  #isExecuted = false;
@@ -84,30 +84,21 @@ class InvocationContext {
84
84
  // this.execute();
85
85
  // }
86
86
  //}
87
- [Symbol.iterator] = () => {
87
+ /**
88
+ * Async iterator for InvocationContext arrays
89
+ * Use: for await (const item of invocationContext) { ... }
90
+ * @returns {AsyncGenerator<InvocationContext, void, unknown>}
91
+ */
92
+ async *[Symbol.asyncIterator]() {
88
93
  if (this.#currentCommand?.commandType !== import_CommandType.CommandType.Reference) {
89
94
  throw new Error("Object is not iterable");
90
95
  }
91
- let position = -1;
92
- let arraySize = 0;
93
- const sizeCtx = (
94
- /** @type {any} */
95
- this.getSize().execute()
96
- );
97
- if (sizeCtx instanceof Promise) {
98
- sizeCtx.then((ctx) => {
99
- arraySize = Number(ctx.getValue());
100
- });
101
- } else {
102
- arraySize = Number(sizeCtx.getValue());
96
+ const sizeCtx = await this.getSize().execute();
97
+ const arraySize = Number(sizeCtx.getValue());
98
+ for (let position = 0; position < arraySize; position++) {
99
+ yield this.getIndex(position);
103
100
  }
104
- return {
105
- next: () => ({
106
- value: this.getIndex(++position),
107
- done: position >= arraySize
108
- })
109
- };
110
- };
101
+ }
111
102
  /**
112
103
  * Executes the current command.
113
104
  * Because invocation context is building the intent of executing particular expression on target environment, we call the initial state of invocation context as non-materialized.
@@ -115,37 +106,30 @@ class InvocationContext {
115
106
  * Commands are becoming nested through each invocation of methods on Invocation Context.
116
107
  * Each invocation triggers the creation of new Invocation Context instance wrapping the current command with new parent command valid for invoked method.
117
108
  * Developer can decide on any moment of the materialization for the context taking full control of the chunks of the expression being transferred and processed on target runtime.
118
- * @returns {Promise<InvocationContext> | InvocationContext} the InvocationContext after executing the command.
109
+ * @returns {Promise<InvocationContext>} the InvocationContext after executing the command.
119
110
  * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/execute-method)
120
111
  * @method
121
112
  */
122
- execute() {
113
+ async execute() {
123
114
  if (this.#currentCommand === null) {
124
115
  throw new Error("currentCommand is undefined in Invocation Context execute method");
125
116
  }
126
117
  if (!this.#interpreter) {
127
118
  this.#interpreter = new import_Interpreter.Interpreter();
128
119
  }
129
- this.#responseCommand = this.#interpreter.execute(this.#currentCommand, this.#connectionData);
130
- const handleResponse = (resolvedResponse) => {
131
- if (!resolvedResponse) {
132
- throw new Error("responseCommand is undefined in Invocation Context execute method");
133
- }
134
- if (resolvedResponse.commandType === import_CommandType.CommandType.Exception) {
135
- throw import_ExceptionThrower.ExceptionThrower.throwException(resolvedResponse);
136
- }
137
- if (resolvedResponse.commandType === import_CommandType.CommandType.CreateClassInstance) {
138
- this.#currentCommand = resolvedResponse;
139
- this.#isExecuted = true;
140
- return this;
141
- }
142
- return new InvocationContext(this.#runtimeName, this.#connectionData, resolvedResponse, true);
143
- };
144
- if (this.#responseCommand instanceof Promise) {
145
- return this.#responseCommand.then(handleResponse);
146
- } else {
147
- return handleResponse(this.#responseCommand);
120
+ this.#responseCommand = await this.#interpreter.execute(this.#currentCommand, this.#connectionData);
121
+ if (!this.#responseCommand) {
122
+ throw new Error("responseCommand is undefined in Invocation Context execute method");
123
+ }
124
+ if (this.#responseCommand.commandType === import_CommandType.CommandType.Exception) {
125
+ throw import_ExceptionThrower.ExceptionThrower.throwException(this.#responseCommand);
148
126
  }
127
+ if (this.#responseCommand.commandType === import_CommandType.CommandType.CreateClassInstance) {
128
+ this.#currentCommand = this.#responseCommand;
129
+ this.#isExecuted = true;
130
+ return this;
131
+ }
132
+ return new InvocationContext(this.#runtimeName, this.#connectionData, this.#responseCommand, true);
149
133
  }
150
134
  /**
151
135
  * Invokes a static method on the target runtime.
@@ -382,21 +366,19 @@ class InvocationContext {
382
366
  }
383
367
  /**
384
368
  * Retrieves the type of the object from the target runtime.
385
- * @returns {Promise<string> | string} The type of the object.
369
+ * @returns {Promise<string>} The type of the object.
386
370
  * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/type-handling/getting-object-type)
387
371
  * @method
388
372
  */
389
- getResultType() {
373
+ async getResultType() {
390
374
  const localCommand = new import_Command.Command(this.#runtimeName, import_CommandType.CommandType.GetResultType, []);
391
375
  const invocationContext = new InvocationContext(
392
376
  this.#runtimeName,
393
377
  this.#connectionData,
394
378
  this.#buildCommand(localCommand)
395
379
  );
396
- const execCtx = invocationContext.execute();
397
- const extract = (invCtx) => String(invCtx.getValue());
398
- console.log(execCtx);
399
- return execCtx instanceof Promise ? execCtx.then(extract) : extract(execCtx);
380
+ const execCtx = await invocationContext.execute();
381
+ return String(execCtx.getValue());
400
382
  }
401
383
  /**
402
384
  * Retrieves the name of the runtime where the command is executed.
@@ -409,21 +391,33 @@ class InvocationContext {
409
391
  }
410
392
  /**
411
393
  * Retrieves an array from the target runtime.
394
+ * @async
412
395
  * @returns {Promise<any[]>}
413
396
  * @method
414
397
  */
415
- retrieveArray() {
398
+ async retrieveArray() {
416
399
  const localCommand = new import_Command.Command(this.#runtimeName, import_CommandType.CommandType.RetrieveArray, []);
417
400
  const localInvCtx = new InvocationContext(
418
401
  this.#runtimeName,
419
402
  this.#connectionData,
420
403
  this.#buildCommand(localCommand)
421
404
  );
422
- localInvCtx.execute();
423
- const extract = (respCommand) => {
424
- return respCommand.payload;
405
+ await localInvCtx.execute();
406
+ const resolve = (item) => {
407
+ return item?.commandType === import_CommandType.CommandType.Reference ? new InvocationContext(
408
+ this.#runtimeName,
409
+ this.#connectionData,
410
+ item
411
+ ) : item;
425
412
  };
426
- return localInvCtx.#responseCommand instanceof Promise ? localInvCtx.#responseCommand.then(extract) : localInvCtx.#responseCommand?.payload;
413
+ const respCommand = localInvCtx.#responseCommand;
414
+ if (!respCommand) {
415
+ return [];
416
+ }
417
+ if (respCommand.payload) {
418
+ return respCommand.payload.map((item) => resolve(item));
419
+ }
420
+ return respCommand.payload || [];
427
421
  }
428
422
  /**
429
423
  * Returns the primitive value from the target runtime. This could be any primitive type in JavaScript,
@@ -465,9 +459,8 @@ class InvocationContext {
465
459
  for (let i = 0; i < newArray.length; i++) {
466
460
  newArray[i] = typeof Object;
467
461
  }
468
- const args = [import_DelegatesCache.delegatesCacheInstance.addDelegate(payloadItem), import_RuntimeName.RuntimeName.Nodejs].push(
469
- ...newArray
470
- );
462
+ const args = [import_DelegatesCache.delegatesCacheInstance.addDelegate(payloadItem), import_RuntimeName.RuntimeName.Nodejs];
463
+ args.push(...newArray);
471
464
  return new import_Command.Command(this.#runtimeName, import_CommandType.CommandType.PassDelegate, args);
472
465
  } else if (import_TypesHandler.TypesHandler.isPrimitiveOrNullOrUndefined(payloadItem)) {
473
466
  return new import_Command.Command(this.#runtimeName, import_CommandType.CommandType.Value, [payloadItem]);
@@ -20,6 +20,7 @@ var Javonet_exports = {};
20
20
  __export(Javonet_exports, {
21
21
  CommandDeserializer: () => import_CommandDeserializer.CommandDeserializer,
22
22
  CommandSerializer: () => import_CommandSerializer.CommandSerializer,
23
+ ComplexTypeResolver: () => import_ComplexTypeResolver.ComplexTypeResolver,
23
24
  ConfigPriority: () => import_ConfigPriority.ConfigPriority,
24
25
  Javonet: () => Javonet,
25
26
  TcpConnectionData: () => import_TcpConnectionData.TcpConnectionData,
@@ -39,6 +40,7 @@ var import_WsConnectionData = require("../utils/connectionData/WsConnectionData.
39
40
  var import_UtilsConst = require("../utils/UtilsConst.cjs");
40
41
  var import_ConfigSourceResolver = require("./configuration/ConfigSourceResolver.cjs");
41
42
  var import_ConfigPriority = require("./configuration/ConfigPriority.cjs");
43
+ var import_ComplexTypeResolver = require("./tools/ComplexTypeResolver.cjs");
42
44
  class Javonet {
43
45
  /**
44
46
  * Initializes Javonet using an in-memory channel on the same machine.
@@ -134,6 +136,7 @@ class Javonet {
134
136
  0 && (module.exports = {
135
137
  CommandDeserializer,
136
138
  CommandSerializer,
139
+ ComplexTypeResolver,
137
140
  ConfigPriority,
138
141
  Javonet,
139
142
  TcpConnectionData,
@@ -136,10 +136,11 @@ class RuntimeContext {
136
136
  * Each invocation triggers the creation of a new RuntimeContext instance wrapping the current command with a new parent command.
137
137
  * 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.
138
138
  * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/execute-method)
139
+ * @returns {Promise<void>}
139
140
  * @method
140
141
  */
141
- execute() {
142
- this.#responseCommand = this.#interpreter?.execute(this.#currentCommand, this.connectionData);
142
+ async execute() {
143
+ this.#responseCommand = await this.#interpreter?.execute(this.#currentCommand, this.connectionData);
143
144
  this.#currentCommand = null;
144
145
  if (this.#responseCommand === void 0) {
145
146
  throw new Error("responseCommand is undefined in Runtime Context execute method");
@@ -154,14 +155,14 @@ class RuntimeContext {
154
155
  * 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.
155
156
  * 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.
156
157
  * @param {string} libraryPath - The relative or full path to the library.
157
- * @returns {RuntimeContext} RuntimeContext instance.
158
+ * @returns {Promise<RuntimeContext>} RuntimeContext instance.
158
159
  * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/getting-started/adding-references-to-libraries)
159
160
  * @method
160
161
  */
161
- loadLibrary(libraryPath) {
162
+ async loadLibrary(libraryPath) {
162
163
  let localCommand = new import_Command.Command(this.runtimeName, import_CommandType.CommandType.LoadLibrary, [libraryPath]);
163
164
  this.#currentCommand = this.#buildCommand(localCommand);
164
- this.execute();
165
+ await this.execute();
165
166
  return this;
166
167
  }
167
168
  /**
@@ -296,9 +297,8 @@ class RuntimeContext {
296
297
  for (let i = 0; i < newArray.length; i++) {
297
298
  newArray[i] = "object";
298
299
  }
299
- const args = [import_DelegatesCache.delegatesCacheInstance.addDelegate(payloadItem), import_RuntimeName.RuntimeName.Nodejs].push(
300
- ...newArray
301
- );
300
+ const args = [import_DelegatesCache.delegatesCacheInstance.addDelegate(payloadItem), import_RuntimeName.RuntimeName.Nodejs];
301
+ args.push(...newArray);
302
302
  return new import_Command.Command(this.runtimeName, import_CommandType.CommandType.PassDelegate, args);
303
303
  } else if (import_TypesHandler.TypesHandler.isPrimitiveOrNullOrUndefined(payloadItem)) {
304
304
  return new import_Command.Command(this.runtimeName, import_CommandType.CommandType.Value, [payloadItem]);
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,32 +15,39 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
  var ConfigSourceResolver_exports = {};
30
20
  __export(ConfigSourceResolver_exports, {
31
21
  ConfigSourceResolver: () => ConfigSourceResolver
32
22
  });
33
23
  module.exports = __toCommonJS(ConfigSourceResolver_exports);
34
- var import_fs = __toESM(require("fs"), 1);
35
- var import_process = __toESM(require("process"), 1);
36
24
  var import_ConfigsDictionary = require("./ConfigsDictionary.cjs");
37
25
  var import_JsonConfigResolver = require("./configResolvers/JsonConfigResolver.cjs");
38
26
  var import_YamlConfigResolver = require("./configResolvers/YamlConfigResolver.cjs");
39
27
  var import_ConnectionStringConfigResolver = require("./configResolvers/ConnectionStringConfigResolver.cjs");
28
+ var import_Runtime = require("../../utils/Runtime.cjs");
29
+ const import_meta = {};
30
+ let fs = null;
31
+ let process = null;
32
+ const requireDynamic = (0, import_Runtime.getRequire)(import_meta.url);
40
33
  class ConfigSourceResolver {
34
+ /**
35
+ * @param {import('./ConfigPriority.js').ConfigPriority} priority
36
+ * @param {string | any} configSource
37
+ */
41
38
  static addConfigs(priority, configSource) {
42
39
  console.log(`Adding config from source: ${configSource} with priority '${priority}'`);
43
- const configString = ConfigSourceResolver._getConfigSourceAsString(configSource);
44
- ConfigSourceResolver._parseConfigsAndAddToCollection(priority, configString);
40
+ if (configSource && typeof configSource === "object") {
41
+ import_JsonConfigResolver.JsonConfigResolver.addConfigs(priority, configSource);
42
+ } else {
43
+ const configString = ConfigSourceResolver._getConfigSourceAsString(configSource);
44
+ ConfigSourceResolver._parseConfigsAndAddToCollection(priority, configString);
45
+ }
45
46
  }
47
+ /**
48
+ * @param {string} configName
49
+ * @returns {*}
50
+ */
46
51
  static getConfig(configName) {
47
52
  console.log(`Retrieving config ${configName}`);
48
53
  return import_ConfigsDictionary.ConfigsDictionary.getConfig(configName);
@@ -50,19 +55,36 @@ class ConfigSourceResolver {
50
55
  static clearConfigs() {
51
56
  import_ConfigsDictionary.ConfigsDictionary.clearConfigs();
52
57
  }
58
+ /**
59
+ * @param {string} configSource
60
+ * @returns {string}
61
+ */
53
62
  static _getConfigSourceAsString(configSource) {
54
63
  if (!configSource || configSource.trim() === "") {
55
64
  throw new Error("Config source cannot be null or whitespace.");
56
65
  }
57
- const envValue = import_process.default.env[configSource];
58
- if (envValue && envValue.trim() !== "") {
59
- configSource = envValue;
60
- }
61
- if (import_fs.default.existsSync(configSource) && import_fs.default.statSync(configSource).isFile()) {
62
- configSource = import_fs.default.readFileSync(configSource, { encoding: "utf-8" });
66
+ if ((0, import_Runtime.isNodejsRuntime)()) {
67
+ if (!process) {
68
+ process = requireDynamic("process");
69
+ }
70
+ if (!fs) {
71
+ fs = requireDynamic("fs");
72
+ }
73
+ const envValue = process?.env[configSource];
74
+ if (envValue && envValue.trim() !== "") {
75
+ configSource = envValue;
76
+ }
77
+ if (fs?.existsSync(configSource) && fs?.statSync(configSource).isFile()) {
78
+ configSource = fs.readFileSync(configSource, { encoding: "utf-8" });
79
+ }
63
80
  }
64
81
  return configSource.trim();
65
82
  }
83
+ /**
84
+ * @param {import('./ConfigPriority.js').ConfigPriority} priority
85
+ * @param {string} configString
86
+ * @returns
87
+ */
66
88
  static _parseConfigsAndAddToCollection(priority, configString) {
67
89
  try {
68
90
  const jsonObject = JSON.parse(configString);
@@ -78,7 +100,7 @@ class ConfigSourceResolver {
78
100
  import_YamlConfigResolver.YamlConfigResolver.addConfigs(priority, configString);
79
101
  return;
80
102
  } catch (ex) {
81
- if (ex.name === "SyntaxError") {
103
+ if (ex?.name === "SyntaxError") {
82
104
  } else {
83
105
  console.log("Failed to parse config source as YAML: " + ex);
84
106
  }
@@ -21,8 +21,10 @@ __export(ComplexTypeResolver_exports, {
21
21
  ComplexTypeResolver: () => ComplexTypeResolver
22
22
  });
23
23
  module.exports = __toCommonJS(ComplexTypeResolver_exports);
24
+ var import_Primitives = require("../../utils/Primitives.cjs");
24
25
  var import_Runtime = require("../../utils/Runtime.cjs");
25
26
  var import_RuntimeName = require("../../utils/RuntimeName.cjs");
27
+ var import_Activator = require("../Activator.cjs");
26
28
  var import_ActivatorDetails = require("../ActivatorDetails.cjs");
27
29
  var import_InvocationContext = require("../InvocationContext.cjs");
28
30
  var import_JavaTypeParsingFunctions = require("./typeParsingFunctions/JavaTypeParsingFunctions.cjs");
@@ -31,17 +33,19 @@ var import_NodejsTypeParsingFunctions = require("./typeParsingFunctions/NodejsTy
31
33
  var import_PythonTypeParsingFunctions = require("./typeParsingFunctions/PythonTypeParsingFunctions.cjs");
32
34
  const import_meta = {};
33
35
  const dynamicImport = (0, import_Runtime.getRequire)(import_meta.url);
36
+ const typeParsingFunctions = /* @__PURE__ */ new Map([
37
+ [import_RuntimeName.RuntimeName.Netcore, import_NetcoreTypeParsingFunctions.NetcoreTypeParsingFunctions],
38
+ [import_RuntimeName.RuntimeName.Jvm, import_JavaTypeParsingFunctions.JavaTypeParsingFunctions],
39
+ [import_RuntimeName.RuntimeName.Nodejs, import_NodejsTypeParsingFunctions.NodejsTypeParsingFunctions],
40
+ [import_RuntimeName.RuntimeName.Python, import_PythonTypeParsingFunctions.PythonTypeParsingFunctions],
41
+ [import_RuntimeName.RuntimeName.Python27, import_PythonTypeParsingFunctions.PythonTypeParsingFunctions]
42
+ ]);
34
43
  class ComplexTypeResolver {
35
44
  /** @type {Map<string, ActivatorDetails>} */
36
- #typeMap = /* @__PURE__ */ new Map();
37
- /** @type {Map<number, Map<string, Function>>} */
38
- #typeParsingFunctions = /* @__PURE__ */ new Map([
39
- [import_RuntimeName.RuntimeName.Netcore, import_NetcoreTypeParsingFunctions.NetcoreTypeParsingFunctions],
40
- [import_RuntimeName.RuntimeName.Jvm, import_JavaTypeParsingFunctions.JavaTypeParsingFunctions],
41
- [import_RuntimeName.RuntimeName.Nodejs, import_NodejsTypeParsingFunctions.NodejsTypeParsingFunctions],
42
- [import_RuntimeName.RuntimeName.Python, import_PythonTypeParsingFunctions.PythonTypeParsingFunctions],
43
- [import_RuntimeName.RuntimeName.Python27, import_PythonTypeParsingFunctions.PythonTypeParsingFunctions]
44
- ]);
45
+ #typeMap;
46
+ constructor() {
47
+ this.#typeMap = /* @__PURE__ */ new Map();
48
+ }
45
49
  /**
46
50
  * Register a custom type mapping
47
51
  * @param {string} resultType - The type name from the target runtime
@@ -56,38 +60,40 @@ class ComplexTypeResolver {
56
60
  /**
57
61
  * Convert InvocationContext result to appropriate JavaScript type
58
62
  * @param {InvocationContext} ic - The invocation context
59
- * @returns {Promise<any> | any} The converted result
63
+ * @returns {Promise<any>} The converted result
60
64
  */
61
- convertResult(ic) {
65
+ async convertResult(ic) {
62
66
  const runtimeName = ic.getRuntimeName();
63
- const resultType = ic.getResultType();
64
- const runtimeDict = this.#typeParsingFunctions.get(runtimeName);
65
- if (runtimeDict) {
66
- let parsingFunc = null;
67
- if (resultType instanceof Promise) {
68
- parsingFunc = resultType.then((result) => {
69
- parsingFunc = runtimeDict.get(result);
70
- });
71
- } else {
72
- parsingFunc = runtimeDict.get(resultType);
73
- }
74
- if (parsingFunc) {
75
- return parsingFunc(ic);
76
- }
67
+ const resultType = await ic.getResultType();
68
+ if (!resultType) {
69
+ throw new Error("resultType is not valid");
77
70
  }
78
- let activatorDetails = null;
79
- if (resultType instanceof Promise) {
80
- activatorDetails = resultType.then((result) => {
81
- activatorDetails = this.#typeMap.get(result);
82
- });
83
- } else {
84
- activatorDetails = this.#typeMap.get(resultType);
71
+ let underlyingType = ComplexTypeResolver.tryGetUnderlyingArrayType(resultType);
72
+ if (underlyingType !== null) {
73
+ const { Type } = (
74
+ /** @type {ActivatorDetails} */
75
+ this.#typeMap.get(underlyingType)
76
+ );
77
+ const complexTypesArray = await ic.retrieveArray();
78
+ return complexTypesArray.map((item) => import_Activator.Activator.createInstance(Type, item));
85
79
  }
80
+ const parsingFunction = ComplexTypeResolver.tryGetTypeParsingFunction(runtimeName, resultType);
81
+ if (parsingFunction) {
82
+ return parsingFunction(ic);
83
+ }
84
+ const activatorDetails = this.tryGetValueFromTypeMap(resultType);
86
85
  if (!activatorDetails) {
87
86
  throw new Error(`No type registered for key '${resultType}'.`);
88
87
  }
89
- return new /** @type {any} */
90
- activatorDetails.type(...activatorDetails.arguments);
88
+ if (runtimeName === import_RuntimeName.RuntimeName.Nodejs) {
89
+ const value = await ic.getValue();
90
+ if (value) {
91
+ if (value instanceof activatorDetails.Type) {
92
+ return value;
93
+ }
94
+ }
95
+ }
96
+ return import_Activator.Activator.createInstance(activatorDetails.Type, activatorDetails.arguments ?? null);
91
97
  }
92
98
  /**
93
99
  * Resolve type from string name and optional module
@@ -121,6 +127,50 @@ class ComplexTypeResolver {
121
127
  }
122
128
  return typeObj;
123
129
  }
130
+ /**
131
+ * Attempts to extract the underlying element type from an array type string
132
+ * @param {string} type - The type string to parse (e.g., "MyType[]")
133
+ * @returns {string | null} Object indicating success and the element type
134
+ * @throws {Error} If the array element type is a primitive type
135
+ */
136
+ static tryGetUnderlyingArrayType(type) {
137
+ if (typeof type !== "string" || !type.includes("[")) {
138
+ return null;
139
+ }
140
+ let trimmedType = type.trim();
141
+ if (!trimmedType) return null;
142
+ const commaIndex = trimmedType.indexOf(",");
143
+ if (commaIndex > 0) {
144
+ trimmedType = trimmedType.substring(0, commaIndex).trim();
145
+ }
146
+ const bracketIndex = trimmedType.indexOf("[");
147
+ if (bracketIndex > 0) {
148
+ trimmedType = trimmedType.substring(0, bracketIndex).trim();
149
+ }
150
+ if (import_Primitives.PrimitiveSet.has(trimmedType)) {
151
+ throw new Error("Primitive array element types are not supported.");
152
+ }
153
+ return trimmedType;
154
+ }
155
+ /**
156
+ * @param {RuntimeName} runtimeName
157
+ * @param {string} resultType
158
+ * @returns {any}
159
+ */
160
+ static tryGetTypeParsingFunction(runtimeName, resultType) {
161
+ const runtimeDict = typeParsingFunctions.get(runtimeName);
162
+ return runtimeDict ? runtimeDict.get(resultType) ?? null : null;
163
+ }
164
+ /**
165
+ * @param {string} resultType
166
+ * @returns {ActivatorDetails | null}
167
+ */
168
+ tryGetValueFromTypeMap(resultType) {
169
+ if (!resultType) {
170
+ throw new Error("resultType is not valid");
171
+ }
172
+ return this.#typeMap.get(resultType) ?? null;
173
+ }
124
174
  }
125
175
  // Annotate the CommonJS export names for ESM import in node:
126
176
  0 && (module.exports = {
@@ -7,8 +7,9 @@ export class Handler {
7
7
  interpreter: import("../interpreter/Interpreter.js").Interpreter;
8
8
  /**
9
9
  * @param {Command} command
10
+ * @returns {Promise<Command> | Command}
10
11
  */
11
- handleCommand(command: Command): Command | Promise<Command>;
12
+ handleCommand(command: Command): Promise<Command> | Command;
12
13
  /**
13
14
  * @param {any} response
14
15
  * @param {RuntimeName} runtimeName
@@ -68,9 +68,9 @@ export class PassDelegateHandler extends AbstractHandler {
68
68
  /**
69
69
  * Creates a method call to execute the command.
70
70
  * @param {Command} command - The command object.
71
- * @returns {any} The response object.
71
+ * @returns {Promise<any>} The response object.
72
72
  */
73
- createExecuteCall(command: Command): any;
73
+ createExecuteCall(command: Command): Promise<any>;
74
74
  /**
75
75
  * Retrieves the response payload from the execution call.
76
76
  * @param {Object<string, any>} executeCall - Object containing the execution call.
@@ -7,9 +7,9 @@ export class Interpreter {
7
7
  *
8
8
  * @param {Command} command
9
9
  * @param {IConnectionData} connectionData
10
- * @returns {Command | Promise<Command>}
10
+ * @returns {Promise<Command>}
11
11
  */
12
- execute(command: Command, connectionData: IConnectionData): Command | Promise<Command>;
12
+ execute(command: Command, connectionData: IConnectionData): Promise<Command>;
13
13
  /**
14
14
  *
15
15
  * @param {Uint8Array} messageByteArray
@@ -5,12 +5,12 @@ export type IConnectionData = import("../../utils/connectionData/IConnectionData
5
5
  export class CommandSerializer {
6
6
  /**
7
7
  * Serializes the root command with connection data and optional runtime version.
8
- * @param {Promise<Command> | Command} rootCommand
8
+ * @param {Command} rootCommand
9
9
  * @param {IConnectionData} connectionData
10
10
  * @param {number} runtimeVersion
11
- * @returns {Promise<Uint8Array> | Uint8Array}
11
+ * @returns {Uint8Array}
12
12
  */
13
- serialize(rootCommand: Promise<Command> | Command, connectionData: IConnectionData, runtimeVersion?: number): Promise<Uint8Array> | Uint8Array;
13
+ serialize(rootCommand: Command, connectionData: IConnectionData, runtimeVersion?: number): Uint8Array;
14
14
  /**
15
15
  * Recursively serializes command payload.
16
16
  * @param {Command} command
@@ -3,14 +3,14 @@ export class Receiver {
3
3
  static getRuntimeInfo(): string;
4
4
  /**
5
5
  * @param {Uint8Array} messageByteArray
6
- * @returns {Promise<Uint8Array> | Uint8Array}
6
+ * @returns {Promise<Uint8Array>}
7
7
  */
8
- static sendCommand(messageByteArray: Uint8Array): Promise<Uint8Array> | Uint8Array;
8
+ static sendCommand(messageByteArray: Uint8Array): Promise<Uint8Array>;
9
9
  /**
10
10
  * @param {Uint8Array} messageByteArray
11
- * @returns {Promise<Uint8Array> | Uint8Array}
11
+ * @returns {Promise<Uint8Array>}
12
12
  */
13
- static heartBeat(messageByteArray: Uint8Array): Promise<Uint8Array> | Uint8Array;
13
+ static heartBeat(messageByteArray: Uint8Array): Promise<Uint8Array>;
14
14
  Receiver(): void;
15
15
  }
16
16
  import { InMemoryConnectionData } from '../../utils/connectionData/InMemoryConnectionData.js';
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Details for activating a type with constructor arguments
3
+ */
4
+ export class Activator {
5
+ /**
6
+ * Create a new instance of a type
7
+ * @param {Function} Type - The constructor function/class
8
+ * @param {any[] | any} args - The arguments to pass to the constructor
9
+ * @returns {any} The new instance
10
+ */
11
+ static createInstance(Type: Function, args: any[] | any): any;
12
+ }
@@ -4,9 +4,11 @@
4
4
  export class ActivatorDetails {
5
5
  /**
6
6
  * @param {Function} type - The constructor function/class
7
- * @param {any[]} [args] - Arguments to pass to constructor
7
+ * @param {any[]|any} [args] - Arguments to pass to constructor (array or single value)
8
8
  */
9
- constructor(type: Function, args?: any[]);
10
- type: Function;
9
+ constructor(type: Function, args?: any[] | any);
10
+ /** @type {Function} */
11
+ Type: Function;
12
+ /** @type {any[]} */
11
13
  arguments: any[];
12
14
  }
@@ -65,6 +65,13 @@ export class ConfigRuntimeFactory {
65
65
  * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/runtime-context)
66
66
  */
67
67
  nodejs(configName?: string): RuntimeContext;
68
+ /**
69
+ * Creates RuntimeContext instance to interact with the Php runtime.
70
+ * @param {string} [configName="default"] - The name of the configuration to use (optional).
71
+ * @return {RuntimeContext} a RuntimeContext instance for the Php runtime
72
+ * @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/runtime-context)
73
+ */
74
+ php(configName?: string): RuntimeContext;
68
75
  /**
69
76
  * Creates RuntimeContext instance to interact with the Python 2.7 runtime.
70
77
  * @param {string} [configName="default"] - The name of the configuration to use (optional).