javonet-nodejs-sdk 2.1.12 → 2.1.13

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 (287) hide show
  1. package/Binaries/Jvm/Linux/X64/JavonetJvmRuntime.jar +0 -0
  2. package/Binaries/Jvm/MacOs/X64/JavonetJvmRuntime.jar +0 -0
  3. package/Binaries/Jvm/Windows/X64/JavonetJvmRuntime.jar +0 -0
  4. package/Binaries/Native/Linux/X64/NetVersion80LatestPatch.runtimeconfig.json +10 -0
  5. package/Binaries/Native/Linux/X64/NetVersionLatest.runtimeconfig.json +2 -2
  6. package/Binaries/Native/Linux/X64/libJavonetCppRuntimeNative.so +0 -0
  7. package/Binaries/Native/Linux/X64/libJavonetGoRuntimeNative.so +0 -0
  8. package/Binaries/Native/Linux/X64/libJavonetJvmRuntimeNative.so +0 -0
  9. package/Binaries/Native/Linux/X64/libJavonetNetcoreRuntimeNative.so +0 -0
  10. package/Binaries/Native/Linux/X64/libJavonetNodejsRuntimeNative.so +0 -0
  11. package/Binaries/Native/Linux/X64/libJavonetPerlRuntimeNative.so +0 -0
  12. package/Binaries/Native/Linux/X64/libJavonetPythonRuntimeNative.so +0 -0
  13. package/Binaries/Native/Linux/X64/libJavonetRubyRuntimeNative.so +0 -0
  14. package/Binaries/Native/Linux/X64/libUtils.so +0 -0
  15. package/Binaries/Native/MacOs/X64/NetVersion80LatestPatch.runtimeconfig.json +10 -0
  16. package/Binaries/Native/MacOs/X64/NetVersionLatest.runtimeconfig.json +2 -2
  17. package/Binaries/Native/MacOs/X64/libJavonetCppRuntimeNative.dylib +0 -0
  18. package/Binaries/Native/MacOs/X64/libJavonetGoRuntimeNative.dylib +0 -0
  19. package/Binaries/Native/MacOs/X64/libJavonetJvmRuntimeNative.dylib +0 -0
  20. package/Binaries/Native/MacOs/X64/libJavonetNetcoreRuntimeNative.dylib +0 -0
  21. package/Binaries/Native/MacOs/X64/libJavonetNodejsRuntimeNative.dylib +0 -0
  22. package/Binaries/Native/MacOs/X64/libJavonetPerlRuntimeNative.dylib +0 -0
  23. package/Binaries/Native/MacOs/X64/libJavonetPythonRuntimeNative.dylib +0 -0
  24. package/Binaries/Native/MacOs/X64/libJavonetRubyRuntimeNative.dylib +0 -0
  25. package/Binaries/Native/MacOs/X64/libUtils.dylib +0 -0
  26. package/Binaries/Native/Windows/X64/JavonetClrRuntimeNative.dll +0 -0
  27. package/Binaries/Native/Windows/X64/JavonetCppRuntimeNative.dll +0 -0
  28. package/Binaries/Native/Windows/X64/JavonetGoRuntimeNative.dll +0 -0
  29. package/Binaries/Native/Windows/X64/JavonetJvmRuntimeNative.dll +0 -0
  30. package/Binaries/Native/Windows/X64/JavonetNetcoreRuntimeNative.dll +0 -0
  31. package/Binaries/Native/Windows/X64/JavonetNodejsRuntimeNative.dll +0 -0
  32. package/Binaries/Native/Windows/X64/JavonetPerlRuntimeNative.dll +0 -0
  33. package/Binaries/Native/Windows/X64/JavonetPythonRuntimeNative.dll +0 -0
  34. package/Binaries/Native/Windows/X64/JavonetRubyRuntimeNative.dll +0 -0
  35. package/Binaries/Native/Windows/X64/NetVersion80LatestPatch.runtimeconfig.json +10 -0
  36. package/Binaries/Native/Windows/X64/NetVersionLatest.runtimeconfig.json +2 -2
  37. package/Binaries/Native/Windows/X64/Utils.dll +0 -0
  38. package/Binaries/Netcore/Linux/X64/Javonet.Netcore.Core.dll +0 -0
  39. package/Binaries/Netcore/Linux/X64/Javonet.Netcore.Utils.dll +0 -0
  40. package/Binaries/Netcore/MacOs/X64/Javonet.Netcore.Core.dll +0 -0
  41. package/Binaries/Netcore/MacOs/X64/Javonet.Netcore.Utils.dll +0 -0
  42. package/Binaries/Netcore/Windows/X64/Javonet.Netcore.Core.dll +0 -0
  43. package/Binaries/Netcore/Windows/X64/Javonet.Netcore.Utils.dll +0 -0
  44. package/Binaries/Nodejs/Linux/X64/core/handler/ValueHandler.js +4 -0
  45. package/Binaries/Nodejs/Linux/X64/core/interpreter/Interpreter.js +17 -9
  46. package/Binaries/Nodejs/Linux/X64/core/protocol/CommandDeserializer.js +160 -0
  47. package/Binaries/Nodejs/Linux/X64/core/protocol/{CommandEncoder.js → CommandSerializer.js} +5 -5
  48. package/Binaries/Nodejs/Linux/X64/core/protocol/TypeDeserializer.js +77 -0
  49. package/Binaries/Nodejs/Linux/X64/core/protocol/TypeSerializer.js +126 -0
  50. package/Binaries/Nodejs/Linux/X64/core/receiver/Receiver.js +1 -4
  51. package/Binaries/Nodejs/MacOs/X64/core/handler/ValueHandler.js +4 -0
  52. package/Binaries/Nodejs/MacOs/X64/core/interpreter/Interpreter.js +17 -9
  53. package/Binaries/Nodejs/MacOs/X64/core/protocol/CommandDeserializer.js +160 -0
  54. package/Binaries/Nodejs/MacOs/X64/core/protocol/{CommandEncoder.js → CommandSerializer.js} +5 -5
  55. package/Binaries/Nodejs/MacOs/X64/core/protocol/TypeDeserializer.js +77 -0
  56. package/Binaries/Nodejs/MacOs/X64/core/protocol/TypeSerializer.js +126 -0
  57. package/Binaries/Nodejs/MacOs/X64/core/receiver/Receiver.js +1 -4
  58. package/Binaries/Nodejs/Windows/X64/core/handler/ValueHandler.js +4 -0
  59. package/Binaries/Nodejs/Windows/X64/core/interpreter/Interpreter.js +17 -9
  60. package/Binaries/Nodejs/Windows/X64/core/protocol/CommandDeserializer.js +160 -0
  61. package/Binaries/Nodejs/Windows/X64/core/protocol/{CommandEncoder.js → CommandSerializer.js} +5 -5
  62. package/Binaries/Nodejs/Windows/X64/core/protocol/TypeDeserializer.js +77 -0
  63. package/Binaries/Nodejs/Windows/X64/core/protocol/TypeSerializer.js +126 -0
  64. package/Binaries/Nodejs/Windows/X64/core/receiver/Receiver.js +1 -4
  65. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Attribute-Util-1.07/install.json +1 -1
  66. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Capture-Tiny-0.48/install.json +1 -1
  67. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Class-Load-0.25/install.json +1 -1
  68. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Class-Load-XS-0.10/install.json +1 -1
  69. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Clone-0.46/install.json +1 -1
  70. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Data-Cmp-0.010/install.json +1 -1
  71. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Data-OptList-0.114/install.json +1 -1
  72. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Data-UUID-1.226/install.json +1 -1
  73. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Devel-GlobalDestruction-0.14/install.json +1 -1
  74. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Devel-OverloadInfo-0.007/install.json +1 -1
  75. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Devel-StackTrace-2.04/install.json +1 -1
  76. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Dist-CheckConflicts-0.11/install.json +1 -1
  77. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Eval-Closure-0.14/install.json +1 -1
  78. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/ExtUtils-Config-0.008/install.json +1 -1
  79. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/ExtUtils-Helpers-0.026/install.json +1 -1
  80. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/ExtUtils-InstallPaths-0.012/install.json +1 -1
  81. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/FFI-CheckLib-0.31/install.json +1 -1
  82. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/FFI-Platypus-2.08/install.json +1 -1
  83. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/File-Which-1.27/install.json +1 -1
  84. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/IPC-System-Simple-1.30/install.json +1 -1
  85. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/MRO-Compat-0.15/install.json +1 -1
  86. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Module-Build-0.4234/install.json +1 -1
  87. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Module-Build-Tiny-0.047/install.json +1 -1
  88. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Module-Implementation-0.09/install.json +1 -1
  89. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Module-Runtime-0.016/install.json +1 -1
  90. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Module-Runtime-Conflicts-0.003/install.json +1 -1
  91. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Moose-2.2206/install.json +1 -1
  92. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Nice-Try-v1.3.5/install.json +1 -1
  93. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/PPI-1.277/install.json +1 -1
  94. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/PPI-XS-0.910/install.json +1 -1
  95. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Package-DeprecationManager-0.18/install.json +1 -1
  96. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Package-Stash-0.40/install.json +1 -1
  97. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Package-Stash-XS-0.30/install.json +1 -1
  98. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Params-Util-1.102/install.json +1 -1
  99. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Path-Tiny-0.144/install.json +1 -1
  100. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Scalar-List-Utils-1.63/install.json +1 -1
  101. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Scalar-Util-Numeric-0.40/install.json +1 -1
  102. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Scope-Guard-0.21/install.json +1 -1
  103. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Sub-Exporter-0.991/install.json +1 -1
  104. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Sub-Exporter-Progressive-0.001013/install.json +1 -1
  105. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Sub-Install-0.929/install.json +1 -1
  106. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Task-Weaken-1.06/install.json +1 -1
  107. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Test-Fatal-0.017/install.json +1 -1
  108. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Try-Tiny-0.31/install.json +1 -1
  109. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Want-0.29/install.json +1 -1
  110. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/aliased-0.34/install.json +1 -1
  111. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/autobox-v3.0.1/install.json +1 -1
  112. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Class/Load/XS/XS.so +0 -0
  113. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Data/UUID/UUID.so +0 -0
  114. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/FFI/Platypus/Platypus.so +0 -0
  115. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/List/Util/Util.so +0 -0
  116. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Moose/Moose.so +0 -0
  117. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/PPI/XS/XS.so +0 -0
  118. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Package/Stash/XS/XS.so +0 -0
  119. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Params/Util/Util.so +0 -0
  120. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Want/Want.so +0 -0
  121. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/share/dist/FFI-Platypus/lib/libplfill.so +0 -0
  122. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/share/dist/FFI-Platypus/probe/bin/dlrun +0 -0
  123. package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod +89 -89
  124. package/Binaries/Perl/MacOs/X64/deps/bin/config_data +1 -1
  125. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Attribute-Util-1.07/install.json +1 -1
  126. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Capture-Tiny-0.48/install.json +1 -1
  127. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Class-Load-0.25/install.json +1 -1
  128. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Class-Load-XS-0.10/install.json +1 -1
  129. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Clone-0.46/install.json +1 -1
  130. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Data-Cmp-0.010/install.json +1 -1
  131. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Data-OptList-0.114/install.json +1 -1
  132. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Data-UUID-1.226/install.json +1 -1
  133. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Devel-GlobalDestruction-0.14/install.json +1 -1
  134. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Devel-OverloadInfo-0.007/install.json +1 -1
  135. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Devel-StackTrace-2.04/install.json +1 -1
  136. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Dist-CheckConflicts-0.11/install.json +1 -1
  137. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Eval-Closure-0.14/install.json +1 -1
  138. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/ExtUtils-Config-0.008/install.json +1 -1
  139. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/ExtUtils-Helpers-0.026/install.json +1 -1
  140. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/ExtUtils-InstallPaths-0.012/install.json +1 -1
  141. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/FFI-CheckLib-0.31/install.json +1 -1
  142. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/FFI-Platypus-2.08/install.json +1 -1
  143. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/File-Which-1.27/install.json +1 -1
  144. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/IPC-System-Simple-1.30/install.json +1 -1
  145. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/MRO-Compat-0.15/install.json +1 -1
  146. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Module-Build-0.4234/install.json +1 -1
  147. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Module-Build-Tiny-0.047/install.json +1 -1
  148. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Module-Implementation-0.09/install.json +1 -1
  149. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Module-Runtime-0.016/install.json +1 -1
  150. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Module-Runtime-Conflicts-0.003/install.json +1 -1
  151. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Moose-2.2206/install.json +1 -1
  152. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Nice-Try-v1.3.5/install.json +1 -1
  153. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/PPI-1.277/install.json +1 -1
  154. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/PPI-XS-0.910/install.json +1 -1
  155. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Package-DeprecationManager-0.18/install.json +1 -1
  156. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Package-Stash-0.40/install.json +1 -1
  157. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Package-Stash-XS-0.30/install.json +1 -1
  158. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Params-Util-1.102/install.json +1 -1
  159. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Path-Tiny-0.144/install.json +1 -1
  160. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Scalar-Util-Numeric-0.40/install.json +1 -1
  161. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Scope-Guard-0.21/install.json +1 -1
  162. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Sub-Exporter-0.991/install.json +1 -1
  163. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Sub-Exporter-Progressive-0.001013/install.json +1 -1
  164. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Sub-Install-0.929/install.json +1 -1
  165. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Task-Weaken-1.06/install.json +1 -1
  166. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Test-Fatal-0.017/install.json +1 -1
  167. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Try-Tiny-0.31/install.json +1 -1
  168. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/Want-0.29/install.json +1 -1
  169. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/aliased-0.34/install.json +1 -1
  170. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/.meta/autobox-v3.0.1/install.json +1 -1
  171. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/auto/share/dist/FFI-Platypus/include/ffi_platypus_config.h +1 -1
  172. package/Binaries/Perl/MacOs/X64/deps/lib/perl5/darwin-thread-multi-2level/perllocal.pod +88 -88
  173. package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/Attribute-Util-1.07/install.json +1 -1
  174. package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/Data-Cmp-0.010/install.json +1 -1
  175. package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/Data-UUID-1.226/install.json +1 -1
  176. package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/Nice-Try-v1.3.5/install.json +1 -1
  177. package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/PPI-1.277/install.json +1 -1
  178. package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/PPI-XS-0.910/install.json +1 -1
  179. package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/Scalar-Util-Numeric-0.40/install.json +1 -1
  180. package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/Want-0.29/install.json +1 -1
  181. package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/autobox-v3.0.1/install.json +1 -1
  182. package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Data/UUID/UUID.xs.dll +0 -0
  183. package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/PPI/XS/XS.xs.dll +0 -0
  184. package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Scalar/Util/Numeric/Numeric.xs.dll +0 -0
  185. package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Want/Want.xs.dll +0 -0
  186. package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/autobox/autobox.xs.dll +0 -0
  187. package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/perllocal.pod +18 -18
  188. package/Binaries/Python/Linux/X64/javonet/core/interpreter/Interpreter.py +0 -1
  189. package/Binaries/Python/Linux/X64/javonet/core/protocol/CommandSerializer.py +6 -9
  190. package/Binaries/Python/Linux/X64/javonet/core/protocol/TypeDeserializer.py +2 -2
  191. package/Binaries/Python/MacOs/X64/javonet/core/interpreter/Interpreter.py +0 -1
  192. package/Binaries/Python/MacOs/X64/javonet/core/protocol/CommandSerializer.py +6 -9
  193. package/Binaries/Python/MacOs/X64/javonet/core/protocol/TypeDeserializer.py +2 -2
  194. package/Binaries/Python/Windows/X64/javonet/core/__pycache__/__init__.cpython-311.pyc +0 -0
  195. package/Binaries/Python/Windows/X64/javonet/core/generator/__pycache__/__init__.cpython-311.pyc +0 -0
  196. package/Binaries/Python/Windows/X64/javonet/core/generator/internal/__pycache__/PythonStringBuilder.cpython-311.pyc +0 -0
  197. package/Binaries/Python/Windows/X64/javonet/core/generator/internal/__pycache__/__init__.cpython-311.pyc +0 -0
  198. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/AbstractCommandHandler.cpython-311.pyc +0 -0
  199. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/ArrayGetItemHandler.cpython-311.pyc +0 -0
  200. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/ArrayGetRankHandler.cpython-311.pyc +0 -0
  201. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/ArrayGetSizeHandler.cpython-311.pyc +0 -0
  202. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/ArrayHandler.cpython-311.pyc +0 -0
  203. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/ArraySetItemHandler.cpython-311.pyc +0 -0
  204. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/CastingHandler.cpython-311.pyc +0 -0
  205. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/CreateClassInstanceHandler.cpython-311.pyc +0 -0
  206. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/DestructReferenceHandler.cpython-311.pyc +0 -0
  207. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/GetEnumItemHandler.cpython-311.pyc +0 -0
  208. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/GetEnumNameHandler.cpython-311.pyc +0 -0
  209. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/GetEnumValueHandler.cpython-311.pyc +0 -0
  210. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/GetInstanceFieldHandler.cpython-311.pyc +0 -0
  211. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/GetStaticFieldHandler.cpython-311.pyc +0 -0
  212. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/GetTypeHandler.cpython-311.pyc +0 -0
  213. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/InvokeInstanceMethodHandler.cpython-311.pyc +0 -0
  214. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/InvokeStaticMethodHandler.cpython-311.pyc +0 -0
  215. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/LoadLibraryHandler.cpython-311.pyc +0 -0
  216. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/ResolveInstanceHandler.cpython-311.pyc +0 -0
  217. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/SetInstanceFieldHandler.cpython-311.pyc +0 -0
  218. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/SetStaticFieldHandler.cpython-311.pyc +0 -0
  219. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/ValueHandler.cpython-311.pyc +0 -0
  220. package/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/__pycache__/__init__.cpython-311.pyc +0 -0
  221. package/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/AbstractHandler.cpython-311.pyc +0 -0
  222. package/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/Handler.cpython-311.pyc +0 -0
  223. package/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/HandlerDictionary.cpython-311.pyc +0 -0
  224. package/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/ReferencesCache.cpython-311.pyc +0 -0
  225. package/Binaries/Python/Windows/X64/javonet/core/handler/__pycache__/__init__.cpython-311.pyc +0 -0
  226. package/Binaries/Python/Windows/X64/javonet/core/interpreter/Interpreter.py +0 -1
  227. package/Binaries/Python/Windows/X64/javonet/core/interpreter/__pycache__/Interpreter.cpython-311.pyc +0 -0
  228. package/Binaries/Python/Windows/X64/javonet/core/interpreter/__pycache__/__init__.cpython-311.pyc +0 -0
  229. package/Binaries/Python/Windows/X64/javonet/core/protocol/CommandSerializer.py +6 -9
  230. package/Binaries/Python/Windows/X64/javonet/core/protocol/TypeDeserializer.py +2 -2
  231. package/Binaries/Python/Windows/X64/javonet/core/protocol/__pycache__/CommandDeserializer.cpython-311.pyc +0 -0
  232. package/Binaries/Python/Windows/X64/javonet/core/protocol/__pycache__/CommandSerializer.cpython-311.pyc +0 -0
  233. package/Binaries/Python/Windows/X64/javonet/core/protocol/__pycache__/TypeDeserializer.cpython-311.pyc +0 -0
  234. package/Binaries/Python/Windows/X64/javonet/core/protocol/__pycache__/TypeSerializer.cpython-311.pyc +0 -0
  235. package/Binaries/Python/Windows/X64/javonet/core/protocol/__pycache__/__init__.cpython-311.pyc +0 -0
  236. package/Binaries/Python/Windows/X64/javonet/core/receiver/__pycache__/Receiver.cpython-311.pyc +0 -0
  237. package/Binaries/Python/Windows/X64/javonet/core/receiver/__pycache__/__init__.cpython-311.pyc +0 -0
  238. package/Binaries/Python/Windows/X64/javonet/utils/__pycache__/Command.cpython-311.pyc +0 -0
  239. package/Binaries/Python/Windows/X64/javonet/utils/__pycache__/CommandType.cpython-311.pyc +0 -0
  240. package/Binaries/Python/Windows/X64/javonet/utils/__pycache__/ConnectionType.cpython-311.pyc +0 -0
  241. package/Binaries/Python/Windows/X64/javonet/utils/__pycache__/ExceptionType.cpython-311.pyc +0 -0
  242. package/Binaries/Python/Windows/X64/javonet/utils/__pycache__/RuntimeName.cpython-311.pyc +0 -0
  243. package/Binaries/Python/Windows/X64/javonet/utils/__pycache__/StringEncodingMode.cpython-311.pyc +0 -0
  244. package/Binaries/Python/Windows/X64/javonet/utils/__pycache__/Type.cpython-311.pyc +0 -0
  245. package/Binaries/Python/Windows/X64/javonet/utils/__pycache__/__init__.cpython-311.pyc +0 -0
  246. package/Binaries/Python/Windows/X64/javonet/utils/exception/__pycache__/ExceptionSerializer.cpython-311.pyc +0 -0
  247. package/Binaries/Python/Windows/X64/javonet/utils/exception/__pycache__/__init__.cpython-311.pyc +0 -0
  248. package/Binaries/Ruby/Linux/X64/core/interpreter/interpreter.rb +4 -4
  249. package/Binaries/Ruby/Linux/X64/core/protocol/command_deserializer.rb +150 -115
  250. package/Binaries/Ruby/Linux/X64/core/protocol/command_serializer.rb +23 -24
  251. package/Binaries/Ruby/Linux/X64/core/protocol/type_deserializer.rb +35 -48
  252. package/Binaries/Ruby/Linux/X64/core/protocol/type_serializer.rb +43 -40
  253. package/Binaries/Ruby/Linux/X64/utils/type.rb +1 -1
  254. package/Binaries/Ruby/MacOs/X64/core/interpreter/interpreter.rb +4 -4
  255. package/Binaries/Ruby/MacOs/X64/core/protocol/command_deserializer.rb +150 -115
  256. package/Binaries/Ruby/MacOs/X64/core/protocol/command_serializer.rb +23 -24
  257. package/Binaries/Ruby/MacOs/X64/core/protocol/type_deserializer.rb +35 -48
  258. package/Binaries/Ruby/MacOs/X64/core/protocol/type_serializer.rb +43 -40
  259. package/Binaries/Ruby/MacOs/X64/utils/type.rb +1 -1
  260. package/Binaries/Ruby/Windows/X64/core/interpreter/interpreter.rb +4 -4
  261. package/Binaries/Ruby/Windows/X64/core/protocol/command_deserializer.rb +150 -115
  262. package/Binaries/Ruby/Windows/X64/core/protocol/command_serializer.rb +23 -24
  263. package/Binaries/Ruby/Windows/X64/core/protocol/type_deserializer.rb +35 -48
  264. package/Binaries/Ruby/Windows/X64/core/protocol/type_serializer.rb +43 -40
  265. package/Binaries/Ruby/Windows/X64/utils/type.rb +1 -1
  266. package/lib/core/handler/ValueHandler.js +4 -0
  267. package/lib/core/interpreter/Interpreter.js +17 -9
  268. package/lib/core/protocol/CommandDeserializer.js +160 -0
  269. package/lib/core/protocol/{CommandEncoder.js → CommandSerializer.js} +5 -5
  270. package/lib/core/protocol/TypeDeserializer.js +77 -0
  271. package/lib/core/protocol/TypeSerializer.js +126 -0
  272. package/lib/core/receiver/Receiver.js +1 -4
  273. package/package.json +1 -1
  274. package/Binaries/Cpp/Linux/X64/libJavonetCppRuntime.so +0 -0
  275. package/Binaries/Cpp/MacOs/X64/libJavonetCppRuntime.dylib +0 -0
  276. package/Binaries/Cpp/Windows/X64/JavonetCppRuntime.dll +0 -0
  277. package/Binaries/Go/Linux/X64/libJavonetGoRuntime.so +0 -0
  278. package/Binaries/Go/MacOs/X64/libJavonetGoRuntime.dylib +0 -0
  279. package/Binaries/Go/Windows/X64/JavonetGoRuntime.dll +0 -0
  280. package/Binaries/Nodejs/Linux/X64/core/protocol/CommandDecoder.js +0 -171
  281. package/Binaries/Nodejs/Linux/X64/core/protocol/TypeEncoder.js +0 -78
  282. package/Binaries/Nodejs/MacOs/X64/core/protocol/CommandDecoder.js +0 -171
  283. package/Binaries/Nodejs/MacOs/X64/core/protocol/TypeEncoder.js +0 -78
  284. package/Binaries/Nodejs/Windows/X64/core/protocol/CommandDecoder.js +0 -171
  285. package/Binaries/Nodejs/Windows/X64/core/protocol/TypeEncoder.js +0 -78
  286. package/lib/core/protocol/CommandDecoder.js +0 -171
  287. package/lib/core/protocol/TypeEncoder.js +0 -78
@@ -1,21 +1,27 @@
1
1
  const { Handler } = require('../handler/Handler')
2
- const CommandEncoder = require('../protocol/CommandEncoder')
3
- const CommandDecoder = require('../protocol/CommandDecoder')
2
+ const CommandSerializer = require('../protocol/CommandSerializer')
3
+ const CommandDeserializer = require('../protocol/CommandDeserializer')
4
4
  const Runtime = require("../../utils/RuntimeName");
5
5
 
6
6
  let Transmitter
7
+ let Receiver
7
8
 
8
9
  class Interpreter {
9
10
  handler = new Handler()
10
11
 
11
12
  execute(command, connectionType, tcpAddress) {
12
- let commandEncoder = new CommandEncoder()
13
- let byteMessage = commandEncoder.encode(command,connectionType, tcpAddress)
13
+ let commandSerializer = new CommandSerializer()
14
+ let byteMessage = commandSerializer.serialize(command,connectionType, tcpAddress)
14
15
  let responseByteArray
15
16
 
16
17
  if (command.runtimeName === Runtime.Nodejs)
17
18
  {
18
- return this.process(byteMessage)
19
+ // lazy receiver loading
20
+ if (!Receiver) {
21
+ Receiver = require('../receiver/Receiver')
22
+ }
23
+ responseByteArray = Receiver.sendCommand(byteMessage)
24
+
19
25
  }
20
26
  else {
21
27
  // lazy transmitter loading
@@ -23,14 +29,16 @@ class Interpreter {
23
29
  Transmitter = require('../transmitter/Transmitter')
24
30
  }
25
31
  responseByteArray = Transmitter.sendCommand(byteMessage)
26
- return new CommandDecoder(responseByteArray).decode()
27
32
  }
33
+ return new CommandDeserializer(responseByteArray).deserialize()
28
34
  }
29
35
 
30
36
  process(byteArray) {
31
- let decoder = new CommandDecoder(byteArray)
32
- let command = decoder.decode()
33
- return this.handler.handleCommand(command)
37
+ let commandDeserializer = new CommandDeserializer(byteArray)
38
+ let receivedCommand = commandDeserializer.deserialize()
39
+ let responseCommand = this.handler.handleCommand(receivedCommand)
40
+ let commandSerializer = new CommandSerializer()
41
+ return commandSerializer.serialize(responseCommand, 0, "0.0.0.0:0")
34
42
  }
35
43
  }
36
44
 
@@ -0,0 +1,160 @@
1
+ const TypeDeserializer = require("./TypeDeserializer")
2
+ const Command = require("../../utils/Command")
3
+ const Type = require("../../utils/Type")
4
+ const StringEncodingMode = require("../../utils/StringEncodingMode")
5
+
6
+
7
+ class CommandDeserializer {
8
+ constructor(buffer) {
9
+ this.buffer = buffer
10
+ this.command = new Command(
11
+ buffer[0],
12
+ buffer[10],
13
+ []
14
+ )
15
+ this.position = 11
16
+ }
17
+
18
+ deserialize() {
19
+ while (!this.isAtEnd()) {
20
+ this.command = this.command.addArgToPayload((this.readObject(this.buffer[this.position])))
21
+ }
22
+ return this.command
23
+ }
24
+
25
+ isAtEnd() {
26
+ return this.position === this.buffer.length
27
+ }
28
+
29
+ readObject(typeNum) {
30
+ let type = Object.entries(Type).find(entry => entry[1] === typeNum)[0]
31
+ switch (type) {
32
+ case 'JAVONET_COMMAND':
33
+ return this.readCommand()
34
+ case 'JAVONET_STRING':
35
+ return this.readString()
36
+ case 'JAVONET_INTEGER':
37
+ return this.readInt()
38
+ case 'JAVONET_BOOLEAN':
39
+ return this.readBool();
40
+ case 'JAVONET_FLOAT':
41
+ return this.readFloat();
42
+ case 'JAVONET_BYTE':
43
+ return this.readByte();
44
+ case 'JAVONET_CHAR':
45
+ return this.readChar();
46
+ case 'JAVONET_LONG_LONG':
47
+ return this.readLongLong();
48
+ case 'JAVONET_DOUBLE':
49
+ return this.readDouble();
50
+ case 'JAVONET_UNSIGNED_LONG_LONG':
51
+ return this.readUllong
52
+ case 'JAVONET_UNSIGNED_INTEGER':
53
+ return this.readUInt()
54
+ default:
55
+ throw 'Unknown type - not supported in JavaScript'
56
+ }
57
+ }
58
+
59
+ readCommand() {
60
+ let p = this.position
61
+ let numberOfElementsInPayload = TypeDeserializer.deserializeInt(this.buffer.slice(p + 1, p + 5))
62
+ let runtime = this.buffer[p + 5]
63
+ let type = this.buffer[p + 6]
64
+ this.position += 7
65
+ let command = new Command(runtime, type, [])
66
+ return this.readCommandRecursively(numberOfElementsInPayload, command)
67
+ }
68
+
69
+ readCommandRecursively(numberOfElementsInPayloadLeft, cmd) {
70
+ if (numberOfElementsInPayloadLeft === 0) return cmd
71
+ let p = this.position
72
+ cmd = cmd.addArgToPayload(this.readObject(this.buffer[p]))
73
+ return this.readCommandRecursively(numberOfElementsInPayloadLeft - 1, cmd)
74
+ }
75
+
76
+ readString() {
77
+ let p = this.position
78
+ let stringEncodingMode = this.buffer[p + 1]
79
+ let size = TypeDeserializer.deserializeInt(this.buffer.slice(p + 2, p + 6))
80
+ this.position += 6
81
+ p = this.position
82
+ this.position += size
83
+ return TypeDeserializer.deserializeString(stringEncodingMode, this.buffer.slice(p, p + size))
84
+
85
+ }
86
+
87
+ readInt() {
88
+ let size = 4
89
+ this.position += 2
90
+ let p = this.position
91
+ this.position += size
92
+ return TypeDeserializer.deserializeInt(this.buffer.slice(p, p + size))
93
+ }
94
+
95
+ readBool() {
96
+ let size = 1
97
+ this.position += 2
98
+ let p = this.position
99
+ this.position += size
100
+ return TypeDeserializer.deserializeBool(this.buffer.slice(p, p + size))
101
+ }
102
+
103
+ readFloat() {
104
+ let size = 4
105
+ this.position += 2
106
+ let p = this.position
107
+ this.position += size
108
+ return TypeDeserializer.deserializeFloat(this.buffer.slice(p, p + size))
109
+ }
110
+
111
+ readByte() {
112
+ let size = 1
113
+ this.position += 2
114
+ let p = this.position
115
+ this.position += size
116
+ return TypeDeserializer.deserializeByte(this.buffer.slice(p, p + size))
117
+ }
118
+
119
+ readChar() {
120
+ let size = 1
121
+ this.position += 2
122
+ let p = this.position
123
+ this.position += size
124
+ return TypeDeserializer.deserializeChar(this.buffer.slice(p, p + size))
125
+ }
126
+
127
+ readLongLong() {
128
+ let size = 8
129
+ this.position += 2
130
+ let p = this.position
131
+ this.position += size
132
+ return TypeDeserializer.deserializeLongLong(this.buffer.slice(p, p + size))
133
+ }
134
+
135
+ readDouble() {
136
+ let size = 8
137
+ this.position += 2
138
+ let p = this.position
139
+ this.position += size
140
+ return TypeDeserializer.deserializeDouble(this.buffer.slice(p, p + size))
141
+ }
142
+
143
+ readUllong() {
144
+ let size = 8
145
+ this.position += 2
146
+ let p = this.position
147
+ this.position += size
148
+ return TypeDeserializer.deserializeULLong(this.buffer.slice(p, p + size))
149
+ }
150
+
151
+ readUInt() {
152
+ let size = 4
153
+ this.position += 2
154
+ let p = this.position
155
+ this.position += size
156
+ return TypeDeserializer.deserializeUInt(this.buffer.slice(p, p + size))
157
+ }
158
+ }
159
+
160
+ module.exports = CommandDeserializer
@@ -1,13 +1,13 @@
1
1
  const Command = require("../../utils/Command")
2
- const TypeEncoder = require('./TypeEncoder')
2
+ const TypeEncoder = require('./TypeSerializer')
3
3
  const ConnectionType = require("../../utils/ConnectionType");
4
4
  const Runtime = require('../../utils/RuntimeName')
5
5
 
6
- class CommandEncoder {
6
+ class CommandSerializer {
7
7
  buffer = new Int8Array(2)
8
8
  encodedTcp;
9
9
 
10
- encode(command, connectionType, tcpConnectionData, runtimeVersion = 0) {
10
+ serialize(command, connectionType, tcpConnectionData, runtimeVersion = 0) {
11
11
  let deque = [command]
12
12
  this.buffer[0] = command.runtimeName
13
13
  this.buffer[1] = runtimeVersion
@@ -48,7 +48,7 @@ class CommandEncoder {
48
48
  if (cmd.payload.length > 0) {
49
49
  if (cmd.payload[0] instanceof Command) {
50
50
  let innerCommand = cmd.payload[0]
51
- this.#insertIntoBuffer(TypeEncoder.encodeCommand(innerCommand))
51
+ this.#insertIntoBuffer(TypeEncoder.serializeCommand(innerCommand))
52
52
  deque.push(innerCommand)
53
53
  } else {
54
54
  let result = TypeEncoder.encodePrimitive(cmd.payload[0])
@@ -69,4 +69,4 @@ class CommandEncoder {
69
69
  }
70
70
  }
71
71
 
72
- module.exports = CommandEncoder
72
+ module.exports = CommandSerializer
@@ -0,0 +1,77 @@
1
+ const Command = require('../../utils/Command')
2
+ const Type = require('../../utils/Type')
3
+ const StringEncodingMode = require('../../utils/StringEncodingMode')
4
+ const {TextDecoder} = require("util");
5
+
6
+ class TypeDeserializer {
7
+ static deserializeCommand(encodedCommand) {
8
+ return new Command(encodedCommand[0], encodedCommand[1], [])
9
+ }
10
+
11
+ static deserializeString(stringEncodingMode, encodedString) {
12
+ switch (stringEncodingMode) {
13
+ case StringEncodingMode.ASCII:
14
+ return String.fromCharCode(...encodedString)
15
+ case StringEncodingMode.UTF8:
16
+ let decoder = new TextDecoder('UTF-8');
17
+ return decoder.decode(new Uint8Array(encodedString))
18
+ case StringEncodingMode.UTF16:
19
+ let str = "";
20
+ let newBuffer = new Uint8Array(encodedString)
21
+ for (let i = 0; i < newBuffer.length; i++) {
22
+ newBuffer[i] = encodedString[i]
23
+ }
24
+ for (let i = 0; i < encodedString.length; i = i + 2) {
25
+ str += String.fromCharCode(newBuffer[i] + 256 * newBuffer[i + 1])
26
+ }
27
+ return str;
28
+ case StringEncodingMode.UTF32:
29
+ throw "Type utf32-encoded string not supported in JavaScript"
30
+ default:
31
+ throw "Unknown string encoding - not supported in JavaScript";
32
+ }
33
+ }
34
+
35
+ static deserializeInt(encodedInt) {
36
+ return (
37
+ (encodedInt[0] & 0xFF)
38
+ | ((encodedInt[1] & 0xFF) << 8)
39
+ | ((encodedInt[2] & 0xFF) << 16)
40
+ | ((encodedInt[3] & 0xFF) << 24)
41
+ )
42
+ }
43
+
44
+ static deserializeBool(encodedBool) {
45
+ return encodedBool[0] === 1
46
+ }
47
+
48
+ static deserializeFloat(encodedFloat) {
49
+ return Buffer.from(encodedFloat).readFloatLE()
50
+ }
51
+
52
+ static deserializeByte(encodedByte) {
53
+ return Buffer.from(encodedByte).readUint8()
54
+ }
55
+
56
+ static deserializeChar(encodedChar) {
57
+ return Buffer.from(encodedChar).readUint8()
58
+ }
59
+
60
+ static deserializeLongLong(encodedLongLong) {
61
+ return Buffer.from(encodedLongLong).readBigInt64LE()
62
+ }
63
+
64
+ static deserializeDouble(encodedDouble) {
65
+ return Buffer.from(encodedDouble).readDoubleLE()
66
+ }
67
+
68
+ static deserializeULLong(encodedULLong) {
69
+ return Buffer.from(encodedULLong).readBigUInt64LE()
70
+ }
71
+
72
+ static deserializeUInt(encodedUInt) {
73
+ return Buffer.from(encodedUInt).readUIntLE(0, 4)
74
+ }
75
+ }
76
+
77
+ module.exports = TypeDeserializer
@@ -0,0 +1,126 @@
1
+ const Command = require('../../utils/Command')
2
+ const Type = require('../../utils/Type')
3
+ const StringEncodingMode = require('../../utils/StringEncodingMode')
4
+
5
+ const util = require('util');
6
+ let encoder = new util.TextEncoder();
7
+
8
+ class TypeSerializer {
9
+
10
+ static encodePrimitive(payload_item) {
11
+ if (payload_item instanceof Command) {
12
+ return TypeSerializer.serializeCommand(payload_item)
13
+ } else if (typeof (payload_item) === 'number' || payload_item instanceof Number) {
14
+ if (Number.isInteger(payload_item)) {
15
+ return TypeSerializer.serializeInt(payload_item)
16
+ } else {
17
+ return TypeSerializer.serializeDouble(payload_item)
18
+ }
19
+ } else if (typeof (payload_item) === 'string' || payload_item instanceof String) {
20
+ return TypeSerializer.serializeString(payload_item)
21
+ } else if (typeof (payload_item) === 'boolean' || payload_item instanceof Boolean) {
22
+ return TypeSerializer.serializeBool(payload_item)
23
+ } else {
24
+ throw 'Unknown type - not supported in JavaScript'
25
+ }
26
+ }
27
+
28
+ static serializeCommand(command) {
29
+ const buffer = Buffer.alloc(7, command)
30
+ buffer.writeUInt8(Type.JAVONET_COMMAND, 0)
31
+ buffer.fill(Buffer.from(this.serializeIntValue(command.payload.length)), 1, 5)
32
+ buffer.writeUInt8(command.runtime, 5)
33
+ buffer.writeUInt8(command.commandType, 6)
34
+ return buffer
35
+ }
36
+
37
+ static serializeString(string_value) {
38
+ let bytes = encoder.encode(string_value)
39
+ const buffer = Buffer.alloc(6 + bytes.length)
40
+ buffer.writeUInt8(Type.JAVONET_STRING, 0)
41
+ buffer.writeUInt8(StringEncodingMode.UTF8, 1)
42
+ buffer.fill(Buffer.from(this.serializeIntValue(bytes.length)), 2, 6)
43
+ buffer.fill(Buffer.from(bytes), 6, 6 + bytes.length)
44
+ return buffer
45
+ }
46
+
47
+ static serializeInt(int_value) {
48
+ const buffer = Buffer.alloc(6)
49
+ buffer.writeUInt8(Type.JAVONET_INTEGER, 0)
50
+ buffer.writeUInt8(4, 1)
51
+ buffer.writeInt32LE(int_value, 2)
52
+ return buffer
53
+ }
54
+
55
+ static serializeBool(bool_value) {
56
+ const buffer = Buffer.alloc(3)
57
+ buffer.writeUInt8(Type.JAVONET_BOOLEAN, 0)
58
+ buffer.writeUInt8(1, 1)
59
+ buffer.writeUInt8(bool_value ? 1 : 0, 2)
60
+ return buffer
61
+ }
62
+
63
+ static serializeFloat(float_value) {
64
+ const buffer = Buffer.alloc(6)
65
+ buffer.writeUInt8(Type.JAVONET_FLOAT, 0)
66
+ buffer.writeUInt8(4, 1)
67
+ buffer.writeFloatLE(float_value, 2)
68
+ return buffer
69
+ }
70
+
71
+ static serializeByte(byte_value) {
72
+ const buffer = Buffer.alloc(3)
73
+ buffer.writeUInt8(Type.JAVONET_BYTE, 0)
74
+ buffer.writeUInt8(1, 1)
75
+ buffer.writeUInt8(byte_value, 2)
76
+ return buffer
77
+ }
78
+
79
+ static serializeChar(char_value) {
80
+ const buffer = Buffer.alloc(3)
81
+ buffer.writeUInt8(Type.JAVONET_CHAR, 0)
82
+ buffer.writeUInt8(1, 1)
83
+ buffer.writeUInt8(char_value, 2)
84
+ return buffer
85
+ }
86
+
87
+ static serializeLongLong(longlong_value) {
88
+ const buffer = Buffer.alloc(10)
89
+ buffer.writeUInt8(Type.JAVONET_LONG_LONG, 0)
90
+ buffer.writeUInt8(8, 1)
91
+ buffer.writeBigInt64LE(BigInt(longlong_value), 2)
92
+ return buffer
93
+ }
94
+
95
+ static serializeDouble(double_value) {
96
+ const buffer = Buffer.alloc(10)
97
+ buffer.writeUInt8(Type.JAVONET_DOUBLE, 0)
98
+ buffer.writeUInt8(8, 1)
99
+ buffer.writeDoubleLE(double_value, 2)
100
+ return buffer
101
+ }
102
+
103
+ static serializeULLong(ullong_value) {
104
+ const buffer = Buffer.alloc(10)
105
+ buffer.writeUInt8(Type.JAVONET_UNSIGNED_LONG_LONG, 0)
106
+ buffer.writeUInt8(8, 1)
107
+ buffer.writeBigUInt64LE(ullong_value, 2)
108
+ return buffer
109
+ }
110
+
111
+ static serializeUInt(uint_value) {
112
+ const buffer = Buffer.alloc(6)
113
+ buffer.writeUInt8(Type.JAVONET_UNSIGNED_INTEGER, 0)
114
+ buffer.writeUInt8(4, 1)
115
+ buffer.writeUInt32LE(uint_value, 2)
116
+ return buffer
117
+ }
118
+
119
+ static serializeIntValue(int_value) {
120
+ const buffer = Buffer.alloc(4)
121
+ buffer.writeInt32LE(int_value, 0)
122
+ return buffer
123
+ }
124
+ }
125
+
126
+ module.exports = TypeSerializer
@@ -1,12 +1,9 @@
1
1
  const Interpreter = require('../interpreter/Interpreter')
2
- const CommandEncoder = require('../protocol/CommandEncoder')
3
2
  const interpreter = new Interpreter()
4
3
 
5
4
  class Receiver {
6
5
  static sendCommand(byteArray) {
7
- let command = interpreter.process(byteArray)
8
- let commandEncoder = new CommandEncoder()
9
- return commandEncoder.encode(command, 0, 0)
6
+ return interpreter.process(byteArray)
10
7
  }
11
8
  static heartBeat(byteArray) {
12
9
  return Int8Array.from([49, 48])
@@ -2,6 +2,10 @@ const AbstractHandler = require("./AbstractHandler")
2
2
 
3
3
 
4
4
  class ValueHandler extends AbstractHandler {
5
+
6
+ constructor() {
7
+ super()
8
+ }
5
9
  process(command) {
6
10
  const {payload} = command
7
11
  return payload[0]
@@ -1,21 +1,27 @@
1
1
  const { Handler } = require('../handler/Handler')
2
- const CommandEncoder = require('../protocol/CommandEncoder')
3
- const CommandDecoder = require('../protocol/CommandDecoder')
2
+ const CommandSerializer = require('../protocol/CommandSerializer')
3
+ const CommandDeserializer = require('../protocol/CommandDeserializer')
4
4
  const Runtime = require("../../utils/RuntimeName");
5
5
 
6
6
  let Transmitter
7
+ let Receiver
7
8
 
8
9
  class Interpreter {
9
10
  handler = new Handler()
10
11
 
11
12
  execute(command, connectionType, tcpAddress) {
12
- let commandEncoder = new CommandEncoder()
13
- let byteMessage = commandEncoder.encode(command,connectionType, tcpAddress)
13
+ let commandSerializer = new CommandSerializer()
14
+ let byteMessage = commandSerializer.serialize(command,connectionType, tcpAddress)
14
15
  let responseByteArray
15
16
 
16
17
  if (command.runtimeName === Runtime.Nodejs)
17
18
  {
18
- return this.process(byteMessage)
19
+ // lazy receiver loading
20
+ if (!Receiver) {
21
+ Receiver = require('../receiver/Receiver')
22
+ }
23
+ responseByteArray = Receiver.sendCommand(byteMessage)
24
+
19
25
  }
20
26
  else {
21
27
  // lazy transmitter loading
@@ -23,14 +29,16 @@ class Interpreter {
23
29
  Transmitter = require('../transmitter/Transmitter')
24
30
  }
25
31
  responseByteArray = Transmitter.sendCommand(byteMessage)
26
- return new CommandDecoder(responseByteArray).decode()
27
32
  }
33
+ return new CommandDeserializer(responseByteArray).deserialize()
28
34
  }
29
35
 
30
36
  process(byteArray) {
31
- let decoder = new CommandDecoder(byteArray)
32
- let command = decoder.decode()
33
- return this.handler.handleCommand(command)
37
+ let commandDeserializer = new CommandDeserializer(byteArray)
38
+ let receivedCommand = commandDeserializer.deserialize()
39
+ let responseCommand = this.handler.handleCommand(receivedCommand)
40
+ let commandSerializer = new CommandSerializer()
41
+ return commandSerializer.serialize(responseCommand, 0, "0.0.0.0:0")
34
42
  }
35
43
  }
36
44
 
@@ -0,0 +1,160 @@
1
+ const TypeDeserializer = require("./TypeDeserializer")
2
+ const Command = require("../../utils/Command")
3
+ const Type = require("../../utils/Type")
4
+ const StringEncodingMode = require("../../utils/StringEncodingMode")
5
+
6
+
7
+ class CommandDeserializer {
8
+ constructor(buffer) {
9
+ this.buffer = buffer
10
+ this.command = new Command(
11
+ buffer[0],
12
+ buffer[10],
13
+ []
14
+ )
15
+ this.position = 11
16
+ }
17
+
18
+ deserialize() {
19
+ while (!this.isAtEnd()) {
20
+ this.command = this.command.addArgToPayload((this.readObject(this.buffer[this.position])))
21
+ }
22
+ return this.command
23
+ }
24
+
25
+ isAtEnd() {
26
+ return this.position === this.buffer.length
27
+ }
28
+
29
+ readObject(typeNum) {
30
+ let type = Object.entries(Type).find(entry => entry[1] === typeNum)[0]
31
+ switch (type) {
32
+ case 'JAVONET_COMMAND':
33
+ return this.readCommand()
34
+ case 'JAVONET_STRING':
35
+ return this.readString()
36
+ case 'JAVONET_INTEGER':
37
+ return this.readInt()
38
+ case 'JAVONET_BOOLEAN':
39
+ return this.readBool();
40
+ case 'JAVONET_FLOAT':
41
+ return this.readFloat();
42
+ case 'JAVONET_BYTE':
43
+ return this.readByte();
44
+ case 'JAVONET_CHAR':
45
+ return this.readChar();
46
+ case 'JAVONET_LONG_LONG':
47
+ return this.readLongLong();
48
+ case 'JAVONET_DOUBLE':
49
+ return this.readDouble();
50
+ case 'JAVONET_UNSIGNED_LONG_LONG':
51
+ return this.readUllong
52
+ case 'JAVONET_UNSIGNED_INTEGER':
53
+ return this.readUInt()
54
+ default:
55
+ throw 'Unknown type - not supported in JavaScript'
56
+ }
57
+ }
58
+
59
+ readCommand() {
60
+ let p = this.position
61
+ let numberOfElementsInPayload = TypeDeserializer.deserializeInt(this.buffer.slice(p + 1, p + 5))
62
+ let runtime = this.buffer[p + 5]
63
+ let type = this.buffer[p + 6]
64
+ this.position += 7
65
+ let command = new Command(runtime, type, [])
66
+ return this.readCommandRecursively(numberOfElementsInPayload, command)
67
+ }
68
+
69
+ readCommandRecursively(numberOfElementsInPayloadLeft, cmd) {
70
+ if (numberOfElementsInPayloadLeft === 0) return cmd
71
+ let p = this.position
72
+ cmd = cmd.addArgToPayload(this.readObject(this.buffer[p]))
73
+ return this.readCommandRecursively(numberOfElementsInPayloadLeft - 1, cmd)
74
+ }
75
+
76
+ readString() {
77
+ let p = this.position
78
+ let stringEncodingMode = this.buffer[p + 1]
79
+ let size = TypeDeserializer.deserializeInt(this.buffer.slice(p + 2, p + 6))
80
+ this.position += 6
81
+ p = this.position
82
+ this.position += size
83
+ return TypeDeserializer.deserializeString(stringEncodingMode, this.buffer.slice(p, p + size))
84
+
85
+ }
86
+
87
+ readInt() {
88
+ let size = 4
89
+ this.position += 2
90
+ let p = this.position
91
+ this.position += size
92
+ return TypeDeserializer.deserializeInt(this.buffer.slice(p, p + size))
93
+ }
94
+
95
+ readBool() {
96
+ let size = 1
97
+ this.position += 2
98
+ let p = this.position
99
+ this.position += size
100
+ return TypeDeserializer.deserializeBool(this.buffer.slice(p, p + size))
101
+ }
102
+
103
+ readFloat() {
104
+ let size = 4
105
+ this.position += 2
106
+ let p = this.position
107
+ this.position += size
108
+ return TypeDeserializer.deserializeFloat(this.buffer.slice(p, p + size))
109
+ }
110
+
111
+ readByte() {
112
+ let size = 1
113
+ this.position += 2
114
+ let p = this.position
115
+ this.position += size
116
+ return TypeDeserializer.deserializeByte(this.buffer.slice(p, p + size))
117
+ }
118
+
119
+ readChar() {
120
+ let size = 1
121
+ this.position += 2
122
+ let p = this.position
123
+ this.position += size
124
+ return TypeDeserializer.deserializeChar(this.buffer.slice(p, p + size))
125
+ }
126
+
127
+ readLongLong() {
128
+ let size = 8
129
+ this.position += 2
130
+ let p = this.position
131
+ this.position += size
132
+ return TypeDeserializer.deserializeLongLong(this.buffer.slice(p, p + size))
133
+ }
134
+
135
+ readDouble() {
136
+ let size = 8
137
+ this.position += 2
138
+ let p = this.position
139
+ this.position += size
140
+ return TypeDeserializer.deserializeDouble(this.buffer.slice(p, p + size))
141
+ }
142
+
143
+ readUllong() {
144
+ let size = 8
145
+ this.position += 2
146
+ let p = this.position
147
+ this.position += size
148
+ return TypeDeserializer.deserializeULLong(this.buffer.slice(p, p + size))
149
+ }
150
+
151
+ readUInt() {
152
+ let size = 4
153
+ this.position += 2
154
+ let p = this.position
155
+ this.position += size
156
+ return TypeDeserializer.deserializeUInt(this.buffer.slice(p, p + size))
157
+ }
158
+ }
159
+
160
+ module.exports = CommandDeserializer