javonet-nodejs-sdk 2.5.10 → 2.5.12
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.
- package/Binaries/Clr/Javonet.Clr.Utils.dll +0 -0
- package/Binaries/Clr/JavonetClrRuntime.dll +0 -0
- package/Binaries/Jvm/JavonetJvmRuntime.jar +0 -0
- package/Binaries/Native/Linux/ARM64/libJavonetActivationService.so +0 -0
- package/Binaries/Native/Linux/ARM64/libJavonetCppRuntimeNative.so +0 -0
- package/Binaries/Native/Linux/ARM64/libJavonetGoRuntimeNative.so +0 -0
- package/Binaries/Native/Linux/ARM64/libJavonetJvmRuntimeNative.so +0 -0
- package/Binaries/Native/Linux/ARM64/libJavonetNetcoreRuntimeNative.so +0 -0
- package/Binaries/Native/Linux/ARM64/libJavonetPythonRuntimeNative.so +0 -0
- package/Binaries/Native/Linux/ARM64/libJavonetRuby278RuntimeNative.so +0 -0
- package/Binaries/Native/Linux/ARM64/libJavonetRubyRuntimeNative.so +0 -0
- package/Binaries/Native/Linux/ARM64/libJavonetTcpClient.so +0 -0
- package/Binaries/Native/Linux/ARM64/libJavonetTcpTlsClient.so +0 -0
- package/Binaries/Native/Linux/ARM64/libUtils.so +0 -0
- package/Binaries/Native/Linux/ARM64/version.txt +1 -1
- package/Binaries/Native/Linux/X64/NativeUtilsUnitTests.xml +30 -30
- package/Binaries/Native/Linux/X64/libJavonetActivationService.so +0 -0
- package/Binaries/Native/Linux/X64/libJavonetCppRuntimeNative.so +0 -0
- package/Binaries/Native/Linux/X64/libJavonetGoRuntimeNative.so +0 -0
- package/Binaries/Native/Linux/X64/libJavonetJvmRuntimeNative.so +0 -0
- package/Binaries/Native/Linux/X64/libJavonetNetcoreRuntimeNative.so +0 -0
- package/Binaries/Native/Linux/X64/libJavonetNodejs1816RuntimeNative.so +0 -0
- package/Binaries/Native/Linux/X64/libJavonetNodejsRuntimeNative.so +0 -0
- package/Binaries/Native/Linux/X64/libJavonetPerlRuntimeNative.so +0 -0
- package/Binaries/Native/Linux/X64/libJavonetPythonRuntimeNative.so +0 -0
- package/Binaries/Native/Linux/X64/libJavonetRuby278RuntimeNative.so +0 -0
- package/Binaries/Native/Linux/X64/libJavonetRubyRuntimeNative.so +0 -0
- package/Binaries/Native/Linux/X64/libJavonetTcpClient.so +0 -0
- package/Binaries/Native/Linux/X64/libJavonetTcpTlsClient.so +0 -0
- package/Binaries/Native/Linux/X64/libUtils.so +0 -0
- package/Binaries/Native/Linux/X64/openssl3/libJavonetActivationService.so +0 -0
- package/Binaries/Native/Linux/X64/openssl3/libJavonetTcpTlsClient.so +0 -0
- package/Binaries/Native/Linux/X64/openssl3/libUtils.so +0 -0
- package/Binaries/Native/Linux/X64/version.txt +1 -1
- package/Binaries/Native/MacOs/X64/libJavonetActivationService.dylib +0 -0
- package/Binaries/Native/MacOs/X64/libJavonetCppRuntimeNative.dylib +0 -0
- package/Binaries/Native/MacOs/X64/libJavonetGoRuntimeNative.dylib +0 -0
- package/Binaries/Native/MacOs/X64/libJavonetJvmRuntimeNative.dylib +0 -0
- package/Binaries/Native/MacOs/X64/libJavonetNetcoreRuntimeNative.dylib +0 -0
- package/Binaries/Native/MacOs/X64/libJavonetNodejs1816RuntimeNative.dylib +0 -0
- package/Binaries/Native/MacOs/X64/libJavonetNodejsRuntimeNative.dylib +0 -0
- package/Binaries/Native/MacOs/X64/libJavonetPerlRuntimeNative.dylib +0 -0
- package/Binaries/Native/MacOs/X64/libJavonetPythonRuntimeNative.dylib +0 -0
- package/Binaries/Native/MacOs/X64/libJavonetRuby278RuntimeNative.dylib +0 -0
- package/Binaries/Native/MacOs/X64/libJavonetRubyRuntimeNative.dylib +0 -0
- package/Binaries/Native/MacOs/X64/libJavonetTcpClient.dylib +0 -0
- package/Binaries/Native/MacOs/X64/libJavonetTcpTlsClient.dylib +0 -0
- package/Binaries/Native/MacOs/X64/libUtils.dylib +0 -0
- package/Binaries/Native/MacOs/X64/version.txt +1 -1
- package/Binaries/Native/Windows/ARM64/JavonetActivationService.dll +0 -0
- package/Binaries/Native/Windows/ARM64/JavonetCppRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/ARM64/JavonetGoRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/ARM64/JavonetJvmRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/ARM64/JavonetNetcoreRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/ARM64/JavonetPythonRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/ARM64/JavonetRuby278RuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/ARM64/JavonetRubyRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/ARM64/JavonetTcpClient.dll +0 -0
- package/Binaries/Native/Windows/ARM64/JavonetTcpTlsClient.dll +0 -0
- package/Binaries/Native/Windows/ARM64/Utils.dll +0 -0
- package/Binaries/Native/Windows/ARM64/version.txt +0 -0
- package/Binaries/Native/Windows/X64/JavonetActivationService.dll +0 -0
- package/Binaries/Native/Windows/X64/JavonetClrRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/JavonetCppRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/JavonetGoRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/JavonetJvmRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/JavonetNetcoreRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/JavonetNodejs1816RuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/JavonetNodejsRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/JavonetPerlRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/JavonetPythonRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/JavonetRuby278RuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/JavonetRubyRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/JavonetTcpClient.dll +0 -0
- package/Binaries/Native/Windows/X64/JavonetTcpTlsClient.dll +0 -0
- package/Binaries/Native/Windows/X64/Utils.dll +0 -0
- package/Binaries/Native/Windows/X64/version.txt +1 -1
- package/Binaries/Native/Windows/X86/JavonetActivationService.dll +0 -0
- package/Binaries/Native/Windows/X86/JavonetClrRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X86/JavonetCppRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X86/JavonetGoRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X86/JavonetJvmRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X86/JavonetNetcoreRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X86/JavonetPythonRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X86/JavonetTcpClient.dll +0 -0
- package/Binaries/Native/Windows/X86/JavonetTcpTlsClient.dll +0 -0
- package/Binaries/Native/Windows/X86/Utils.dll +0 -0
- package/Binaries/Native/Windows/X86/version.txt +1 -1
- package/Binaries/Netcore/Javonet.Netcore.Core.dll +0 -0
- package/Binaries/Netcore/Javonet.Netcore.Utils.dll +0 -0
- package/Binaries/Nodejs/lib/core/handler/Handler.js +6 -9
- package/Binaries/Nodejs/lib/core/handler/InvokeGlobalFunctionHandler.js +39 -0
- package/Binaries/Nodejs/lib/core/interpreter/Interpreter.js +11 -15
- package/Binaries/Nodejs/lib/core/protocol/TypeSerializer.js +7 -0
- package/Binaries/Nodejs/lib/core/transmitter/Transmitter.js +4 -4
- package/Binaries/Nodejs/lib/core/transmitter/TransmitterWrapper.js +27 -14
- package/Binaries/Nodejs/lib/sdk/ConfigRuntimeFactory.js +1 -1
- package/Binaries/Nodejs/lib/sdk/InvocationContext.js +7 -17
- package/Binaries/Nodejs/lib/sdk/Javonet.js +17 -1
- package/Binaries/Nodejs/lib/sdk/RuntimeContext.js +27 -0
- package/Binaries/Nodejs/lib/utils/CommandType.js +1 -2
- package/Binaries/Nodejs/lib/utils/CustomError.js +8 -0
- package/Binaries/Perl/Linux/X64/deps/bin/yamlpp-load +11 -0
- package/Binaries/Perl/Linux/X64/deps/bin/yamlpp-load-dump +11 -0
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Common.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Constructor.pm +7 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Dumper.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Emitter.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Exception.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Grammar.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Highlight.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Lexer.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Loader.pm +3 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Parser.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Perl.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Reader.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Render.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Representer.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Schema/Binary.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Schema/Catchall.pm +76 -0
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Schema/Core.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Schema/Failsafe.pm +23 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Schema/Include.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Schema/JSON.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Schema/Merge.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Schema/Perl.pm +13 -9
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Schema/Tie/IxHash.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Schema/YAML1_1.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Schema.pm +10 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Type/MergeKey.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Writer/File.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP/Writer.pm +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/YAML/PP.pm +39 -5
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Attribute-Util-1.07/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Capture-Tiny-0.50/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Class-Load-0.25/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Class-Load-XS-0.10/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Clone-0.47/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Data-Cmp-0.010/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Data-OptList-0.114/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Data-UUID-1.227/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Devel-GlobalDestruction-0.14/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Devel-OverloadInfo-0.007/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Devel-StackTrace-2.05/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Dist-CheckConflicts-0.11/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Eval-Closure-0.14/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/ExtUtils-Config-0.010/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/ExtUtils-Helpers-0.028/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/ExtUtils-InstallPaths-0.014/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/FFI-CheckLib-0.31/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/FFI-Platypus-2.10/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/File-Which-1.27/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/IPC-System-Simple-1.30/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/MRO-Compat-0.15/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Module-Build-0.4234/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Module-Build-Tiny-0.051/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Module-Implementation-0.09/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Module-Runtime-0.016/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Module-Runtime-Conflicts-0.003/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Moose-2.2207/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Nice-Try-v1.3.15/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/PPI-1.281/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/PPI-XS-0.910/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Package-DeprecationManager-0.18/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Package-Stash-0.40/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Package-Stash-XS-0.30/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Params-Util-1.102/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Path-Tiny-0.146/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Safe-Isa-1.000010/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Scalar-List-Utils-1.68/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Scalar-Util-Numeric-0.40/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Scope-Guard-0.21/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Sub-Exporter-0.991/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Sub-Exporter-Progressive-0.001013/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Sub-Install-0.929/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Task-Weaken-1.06/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Test-Fatal-0.017/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Try-Tiny-0.32/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/Want-0.29/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/{YAML-PP-v0.38.0 → YAML-PP-v0.39.0}/MYMETA.json +39 -35
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/YAML-PP-v0.39.0/install.json +1 -0
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/aliased-0.34/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/autobox-v3.0.2/install.json +1 -1
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Class/Load/XS/XS.so +0 -0
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Data/UUID/UUID.so +0 -0
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/FFI/Platypus/Platypus.so +0 -0
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/List/Util/Util.so +0 -0
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Moose/Moose.so +0 -0
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/PPI/XS/XS.so +0 -0
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Package/Stash/XS/XS.so +0 -0
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Params/Util/Util.so +0 -0
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Want/Want.so +0 -0
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/YAML/PP/.packlist +2 -0
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod +91 -91
- package/Binaries/Perl/Linux/X64/lib/Javonet/Core/Handler/CommandHandler/InvokeGlobalFunctionHandler.pm +63 -0
- package/Binaries/Perl/Linux/X64/lib/Javonet/Core/Handler/PerlHandler.pm +7 -0
- package/Binaries/Perl/Linux/X64/lib/Javonet/Core/Transmitter/PerlTransmitter.pm +6 -1
- package/Binaries/Perl/Linux/X64/lib/Javonet/Core/Transmitter/PerlTransmitterWrapper.pm +15 -0
- package/Binaries/Perl/Linux/X64/lib/Javonet/Javonet.pm +22 -4
- package/Binaries/Perl/Linux/X64/lib/Javonet/Sdk/Core/PerlCommandType.pm +6 -1
- package/Binaries/Perl/Linux/X64/lib/Javonet/Sdk/Internal/Abstract/AbstractRuntimeContext.pm +17 -0
- package/Binaries/Perl/Linux/X64/lib/Javonet/Sdk/Internal/RuntimeContext.pm +21 -0
- package/Binaries/Perl/Windows/X64/deps/bin/yamlpp-load +11 -0
- package/Binaries/Perl/Windows/X64/deps/bin/yamlpp-load-dump +11 -0
- package/Binaries/Perl/Windows/X64/deps/bin/yamlpp-load-dump.bat +11 -0
- package/Binaries/Perl/Windows/X64/deps/bin/yamlpp-load.bat +11 -0
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/Attribute-Util-1.07/install.json +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/Data-Cmp-0.010/install.json +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/Data-UUID-1.227/install.json +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/Nice-Try-v1.3.15/install.json +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/PPI-1.281/install.json +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/PPI-XS-0.910/install.json +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/Safe-Isa-1.000010/install.json +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/Scalar-Util-Numeric-0.40/install.json +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/Test-Fatal-0.017/install.json +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/Want-0.29/install.json +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/{YAML-PP-v0.38.0 → YAML-PP-v0.39.0}/MYMETA.json +39 -35
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/YAML-PP-v0.39.0/install.json +1 -0
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/autobox-v3.0.2/install.json +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Data/UUID/UUID.xs.dll +0 -0
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/PPI/XS/XS.xs.dll +0 -0
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Scalar/Util/Numeric/Numeric.xs.dll +0 -0
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Want/Want.xs.dll +0 -0
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/YAML/PP/.packlist +1 -0
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/autobox/autobox.xs.dll +0 -0
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/perllocal.pod +24 -24
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Common.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Constructor.pm +7 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Dumper.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Emitter.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Exception.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Grammar.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Highlight.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Lexer.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Loader.pm +3 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Parser.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Perl.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Reader.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Render.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Representer.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Schema/Binary.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Schema/Catchall.pm +76 -0
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Schema/Core.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Schema/Failsafe.pm +23 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Schema/Include.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Schema/JSON.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Schema/Merge.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Schema/Perl.pm +13 -9
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Schema/Tie/IxHash.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Schema/YAML1_1.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Schema.pm +10 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Type/MergeKey.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Writer/File.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP/Writer.pm +1 -1
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/YAML/PP.pm +39 -5
- package/Binaries/Perl/Windows/X64/lib/Javonet/Core/Handler/CommandHandler/InvokeGlobalFunctionHandler.pm +63 -0
- package/Binaries/Perl/Windows/X64/lib/Javonet/Core/Handler/PerlHandler.pm +7 -0
- package/Binaries/Perl/Windows/X64/lib/Javonet/Core/Transmitter/PerlTransmitter.pm +6 -1
- package/Binaries/Perl/Windows/X64/lib/Javonet/Core/Transmitter/PerlTransmitterWrapper.pm +15 -0
- package/Binaries/Perl/Windows/X64/lib/Javonet/Javonet.pm +22 -4
- package/Binaries/Perl/Windows/X64/lib/Javonet/Sdk/Core/PerlCommandType.pm +6 -1
- package/Binaries/Perl/Windows/X64/lib/Javonet/Sdk/Internal/Abstract/AbstractRuntimeContext.pm +17 -0
- package/Binaries/Perl/Windows/X64/lib/Javonet/Sdk/Internal/RuntimeContext.pm +21 -0
- package/Binaries/Python/javonet/core/handler/Handler.py +2 -0
- package/Binaries/Python/javonet/core/handler/InvokeGlobalFunctionHandler.py +46 -0
- package/Binaries/Python/javonet/core/transmitter/Transmitter.py +5 -1
- package/Binaries/Python/javonet/core/transmitter/TransmitterWrapper.py +20 -1
- package/Binaries/Python/javonet/utils/CommandType.py +2 -1
- package/Binaries/Ruby/Linux/X64/core/handler/handler.rb +3 -0
- package/Binaries/Ruby/Linux/X64/core/handler/invoke_global_function_handler.rb +45 -0
- package/Binaries/Ruby/Linux/X64/core/handler/invoke_instance_method_handler.rb +9 -5
- package/Binaries/Ruby/Linux/X64/core/handler/invoke_static_method_handler.rb +4 -3
- package/Binaries/Ruby/Linux/X64/core/receiver/receiver.rb +6 -2
- package/Binaries/Ruby/Linux/X64/core/transmitter/transmitter.rb +10 -0
- package/Binaries/Ruby/Linux/X64/core/transmitter/transmitter_wrapper.rb +1 -0
- package/Binaries/Ruby/Linux/X64/utils/command_type.rb +18 -3
- package/Binaries/Ruby/MacOs/X64/core/handler/handler.rb +3 -0
- package/Binaries/Ruby/MacOs/X64/core/handler/invoke_global_function_handler.rb +45 -0
- package/Binaries/Ruby/MacOs/X64/core/handler/invoke_instance_method_handler.rb +9 -5
- package/Binaries/Ruby/MacOs/X64/core/handler/invoke_static_method_handler.rb +4 -3
- package/Binaries/Ruby/MacOs/X64/core/receiver/receiver.rb +6 -2
- package/Binaries/Ruby/MacOs/X64/core/transmitter/transmitter.rb +10 -0
- package/Binaries/Ruby/MacOs/X64/core/transmitter/transmitter_wrapper.rb +1 -0
- package/Binaries/Ruby/MacOs/X64/utils/command_type.rb +18 -3
- package/Binaries/Ruby/Windows/X64/core/handler/handler.rb +3 -0
- package/Binaries/Ruby/Windows/X64/core/handler/invoke_global_function_handler.rb +45 -0
- package/Binaries/Ruby/Windows/X64/core/handler/invoke_instance_method_handler.rb +9 -5
- package/Binaries/Ruby/Windows/X64/core/handler/invoke_static_method_handler.rb +4 -3
- package/Binaries/Ruby/Windows/X64/core/receiver/receiver.rb +6 -2
- package/Binaries/Ruby/Windows/X64/core/transmitter/transmitter.rb +10 -0
- package/Binaries/Ruby/Windows/X64/core/transmitter/transmitter_wrapper.rb +1 -0
- package/Binaries/Ruby/Windows/X64/utils/command_type.rb +18 -3
- package/Binaries/version.txt +1 -1
- package/addon/JavonetNodejsRuntimeAddon.cpp +114 -16
- package/addon/JavonetNodejsRuntimeAddon.h +12 -2
- package/dist/Javonet.d.ts +119 -688
- package/dist/lib/core/handler/Handler.js +6 -9
- package/dist/lib/core/handler/InvokeGlobalFunctionHandler.js +39 -0
- package/dist/lib/core/interpreter/Interpreter.js +11 -15
- package/dist/lib/core/protocol/TypeSerializer.js +7 -0
- package/dist/lib/core/transmitter/Transmitter.js +4 -4
- package/dist/lib/core/transmitter/TransmitterWrapper.js +27 -14
- package/dist/lib/sdk/ConfigRuntimeFactory.js +1 -1
- package/dist/lib/sdk/InvocationContext.js +7 -17
- package/dist/lib/sdk/Javonet.js +17 -1
- package/dist/lib/sdk/RuntimeContext.js +27 -0
- package/dist/lib/utils/CommandType.js +1 -2
- package/dist/lib/utils/CustomError.js +8 -0
- package/lib/core/handler/Handler.js +6 -9
- package/lib/core/handler/InvokeGlobalFunctionHandler.js +39 -0
- package/lib/core/transmitter/Transmitter.js +4 -4
- package/lib/core/transmitter/TransmitterWrapper.js +27 -14
- package/lib/sdk/ConfigRuntimeFactory.js +1 -1
- package/lib/sdk/Javonet.js +17 -1
- package/package.json +1 -1
- package/Binaries/Nodejs/lib/core/generator/handler/AbstractGeneratorHandler.js +0 -11
- package/Binaries/Nodejs/lib/core/generator/handler/CreateInstanceGeneratorHandler.js +0 -27
- package/Binaries/Nodejs/lib/core/generator/handler/GeneratorHandler.js +0 -38
- package/Binaries/Nodejs/lib/core/generator/handler/GetInstanceFieldGeneratorHandler.js +0 -26
- package/Binaries/Nodejs/lib/core/generator/handler/GetStaticFieldGeneratorHandler.js +0 -24
- package/Binaries/Nodejs/lib/core/generator/handler/GetTypeGeneratorHandler.js +0 -39
- package/Binaries/Nodejs/lib/core/generator/handler/Handlers.js +0 -58
- package/Binaries/Nodejs/lib/core/generator/handler/InvokeInstanceMethodGeneratorHandler.js +0 -33
- package/Binaries/Nodejs/lib/core/generator/handler/InvokeStandaloneMethodGeneratorHandler.js +0 -35
- package/Binaries/Nodejs/lib/core/generator/handler/InvokeStaticMethodGeneratorHandler.js +0 -35
- package/Binaries/Nodejs/lib/core/generator/handler/shared/SharedArgumentNameHandler.js +0 -15
- package/Binaries/Nodejs/lib/core/generator/handler/shared/SharedClassInstanceHandler.js +0 -12
- package/Binaries/Nodejs/lib/core/generator/handler/shared/SharedClassNameHandler.js +0 -44
- package/Binaries/Nodejs/lib/core/generator/handler/shared/SharedMethodNameHandler.js +0 -42
- package/Binaries/Nodejs/lib/core/generator/handler/shared/SharedReturnTypeHandler.js +0 -9
- package/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedBodyHandler.js +0 -18
- package/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedCreateInstanceBodyHandler.js +0 -29
- package/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedGetInstanceFieldBodyHandler.js +0 -21
- package/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedGetStaticFieldBodyHandler.js +0 -31
- package/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedGetTypeBodyHandler.js +0 -21
- package/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedInvokeInstanceMethodBodyHandler.js +0 -33
- package/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedInvokeStandaloneMethodBodyHandler.js +0 -39
- package/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedInvokeStaticMethodBodyHandler.js +0 -39
- package/Binaries/Nodejs/lib/core/generator/internal/CommonGenerator.js +0 -39
- package/Binaries/Nodejs/lib/core/generator/internal/NodejsStringBuilder.js +0 -17
- package/Binaries/Nodejs/lib/core/generator/internal/SharedHandlerType.js +0 -10
- package/Binaries/Nodejs/lib/core/generator/utils/StringUtils.js +0 -7
- package/Binaries/Nodejs/lib/core/handler/InvokeGlobalMethodHandler.js +0 -43
- package/Binaries/Nodejs/lib/core/handler/InvokeStandaloneMethodHandler.js +0 -56
- package/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/.meta/YAML-PP-v0.38.0/install.json +0 -1
- package/Binaries/Perl/Linux/X64/lib/Javonet/Sdk/Internal/Abstract/AbstractModuleContext.pm +0 -11
- package/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/.meta/YAML-PP-v0.38.0/install.json +0 -1
- package/Binaries/Perl/Windows/X64/lib/Javonet/Sdk/Internal/Abstract/AbstractModuleContext.pm +0 -11
- package/dist/lib/core/generator/handler/AbstractGeneratorHandler.js +0 -11
- package/dist/lib/core/generator/handler/CreateInstanceGeneratorHandler.js +0 -27
- package/dist/lib/core/generator/handler/GeneratorHandler.js +0 -38
- package/dist/lib/core/generator/handler/GetInstanceFieldGeneratorHandler.js +0 -26
- package/dist/lib/core/generator/handler/GetStaticFieldGeneratorHandler.js +0 -24
- package/dist/lib/core/generator/handler/GetTypeGeneratorHandler.js +0 -39
- package/dist/lib/core/generator/handler/Handlers.js +0 -58
- package/dist/lib/core/generator/handler/InvokeInstanceMethodGeneratorHandler.js +0 -33
- package/dist/lib/core/generator/handler/InvokeStandaloneMethodGeneratorHandler.js +0 -35
- package/dist/lib/core/generator/handler/InvokeStaticMethodGeneratorHandler.js +0 -35
- package/dist/lib/core/generator/handler/shared/SharedArgumentNameHandler.js +0 -15
- package/dist/lib/core/generator/handler/shared/SharedClassInstanceHandler.js +0 -12
- package/dist/lib/core/generator/handler/shared/SharedClassNameHandler.js +0 -44
- package/dist/lib/core/generator/handler/shared/SharedMethodNameHandler.js +0 -42
- package/dist/lib/core/generator/handler/shared/SharedReturnTypeHandler.js +0 -9
- package/dist/lib/core/generator/handler/shared/body/SharedBodyHandler.js +0 -18
- package/dist/lib/core/generator/handler/shared/body/SharedCreateInstanceBodyHandler.js +0 -29
- package/dist/lib/core/generator/handler/shared/body/SharedGetInstanceFieldBodyHandler.js +0 -21
- package/dist/lib/core/generator/handler/shared/body/SharedGetStaticFieldBodyHandler.js +0 -31
- package/dist/lib/core/generator/handler/shared/body/SharedGetTypeBodyHandler.js +0 -21
- package/dist/lib/core/generator/handler/shared/body/SharedInvokeInstanceMethodBodyHandler.js +0 -33
- package/dist/lib/core/generator/handler/shared/body/SharedInvokeStandaloneMethodBodyHandler.js +0 -39
- package/dist/lib/core/generator/handler/shared/body/SharedInvokeStaticMethodBodyHandler.js +0 -39
- package/dist/lib/core/generator/internal/CommonGenerator.js +0 -39
- package/dist/lib/core/generator/internal/NodejsStringBuilder.js +0 -17
- package/dist/lib/core/generator/internal/SharedHandlerType.js +0 -10
- package/dist/lib/core/generator/utils/StringUtils.js +0 -7
- package/dist/lib/core/handler/InvokeGlobalMethodHandler.js +0 -43
- package/dist/lib/core/handler/InvokeStandaloneMethodHandler.js +0 -56
- package/lib/core/generator/handler/AbstractGeneratorHandler.js +0 -11
- package/lib/core/generator/handler/CreateInstanceGeneratorHandler.js +0 -27
- package/lib/core/generator/handler/GeneratorHandler.js +0 -38
- package/lib/core/generator/handler/GetInstanceFieldGeneratorHandler.js +0 -26
- package/lib/core/generator/handler/GetStaticFieldGeneratorHandler.js +0 -24
- package/lib/core/generator/handler/GetTypeGeneratorHandler.js +0 -39
- package/lib/core/generator/handler/Handlers.js +0 -58
- package/lib/core/generator/handler/InvokeInstanceMethodGeneratorHandler.js +0 -33
- package/lib/core/generator/handler/InvokeStandaloneMethodGeneratorHandler.js +0 -35
- package/lib/core/generator/handler/InvokeStaticMethodGeneratorHandler.js +0 -35
- package/lib/core/generator/handler/shared/SharedArgumentNameHandler.js +0 -15
- package/lib/core/generator/handler/shared/SharedClassInstanceHandler.js +0 -12
- package/lib/core/generator/handler/shared/SharedClassNameHandler.js +0 -44
- package/lib/core/generator/handler/shared/SharedMethodNameHandler.js +0 -42
- package/lib/core/generator/handler/shared/SharedReturnTypeHandler.js +0 -9
- package/lib/core/generator/handler/shared/body/SharedBodyHandler.js +0 -18
- package/lib/core/generator/handler/shared/body/SharedCreateInstanceBodyHandler.js +0 -29
- package/lib/core/generator/handler/shared/body/SharedGetInstanceFieldBodyHandler.js +0 -21
- package/lib/core/generator/handler/shared/body/SharedGetStaticFieldBodyHandler.js +0 -31
- package/lib/core/generator/handler/shared/body/SharedGetTypeBodyHandler.js +0 -21
- package/lib/core/generator/handler/shared/body/SharedInvokeInstanceMethodBodyHandler.js +0 -33
- package/lib/core/generator/handler/shared/body/SharedInvokeStandaloneMethodBodyHandler.js +0 -39
- package/lib/core/generator/handler/shared/body/SharedInvokeStaticMethodBodyHandler.js +0 -39
- package/lib/core/generator/internal/CommonGenerator.js +0 -39
- package/lib/core/generator/internal/NodejsStringBuilder.js +0 -17
- package/lib/core/generator/internal/SharedHandlerType.js +0 -10
- package/lib/core/generator/utils/StringUtils.js +0 -7
- package/lib/core/handler/InvokeGlobalMethodHandler.js +0 -43
- package/lib/core/handler/InvokeStandaloneMethodHandler.js +0 -56
- package/lib/sdk/RuntimeContext.js +0 -36
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
const { CommandType, Command, ExceptionSerializer } = require('../../..')
|
|
2
|
+
const ReferencesCache = require('../referenceCache/ReferencesCache')
|
|
3
|
+
|
|
1
4
|
const ValueHandler = require('./ValueHandler')
|
|
2
5
|
const LoadLibraryHandler = require('./LoadLibraryHandler')
|
|
3
6
|
const GetTypeHandler = require('./GetTypeHandler')
|
|
@@ -11,7 +14,6 @@ const SetInstanceFieldHandler = require('./SetInstanceFieldHandler')
|
|
|
11
14
|
const InvokeInstanceMethodHandler = require('./InvokeInstanceMethodHandler')
|
|
12
15
|
const DestructReferenceHandler = require('./DestructReferenceHandler')
|
|
13
16
|
const CastHandler = require('./CastingHandler')
|
|
14
|
-
const InvokeGlobalMethodHandler = require('./InvokeGlobalMethodHandler')
|
|
15
17
|
const ArrayGetItemHandler = require('./ArrayGetItemHandler')
|
|
16
18
|
const ArrayGetSizeHandler = require('./ArrayGetSizeHandler')
|
|
17
19
|
const ArrayGetRankHandler = require('./ArrayGetRankHandler')
|
|
@@ -19,15 +21,11 @@ const ArraySetItemHandler = require('./ArraySetItemHandler')
|
|
|
19
21
|
const ArrayHandler = require('./ArrayHandler')
|
|
20
22
|
const EnableNamespaceHandler = require('./EnableNamespaceHandler')
|
|
21
23
|
const EnableTypeHandler = require('./EnableTypeHandler')
|
|
22
|
-
|
|
23
|
-
const { CommandType, Command, ExceptionSerializer } = require('../../..')
|
|
24
|
-
const ReferencesCache = require('../referenceCache/ReferencesCache')
|
|
25
|
-
const InvokeStandaloneMethodHandler = require('./InvokeStandaloneMethodHandler')
|
|
26
24
|
const GetStaticMethodAsDelegateHandler = require('./GetStaticMethodAsDelegateHandler')
|
|
27
25
|
const GetInstanceMethodAsDelegateHandler = require('./GetInstanceMethodAsDelegateHandler')
|
|
28
26
|
const PassDelegateHandler = require('./PassDelegateHandler')
|
|
29
27
|
const InvokeDelegateHandler = require('./InvokeDelegateHandler')
|
|
30
|
-
const
|
|
28
|
+
const InvokeGlobalFunctionHandler = require('./InvokeGlobalFunctionHandler')
|
|
31
29
|
|
|
32
30
|
function isResponseSimpleType(response) {
|
|
33
31
|
let type = typeof response
|
|
@@ -51,8 +49,6 @@ const handlers = {
|
|
|
51
49
|
[CommandType.GetInstanceField]: GetInstanceFieldHandler,
|
|
52
50
|
[CommandType.SetInstanceField]: SetInstanceFieldHandler,
|
|
53
51
|
[CommandType.InvokeInstanceMethod]: InvokeInstanceMethodHandler,
|
|
54
|
-
[CommandType.InvokeStandaloneMethod]: InvokeStandaloneMethodHandler,
|
|
55
|
-
[CommandType.InvokeGlobalMethod]: InvokeGlobalMethodHandler,
|
|
56
52
|
[CommandType.DestructReference]: DestructReferenceHandler,
|
|
57
53
|
[CommandType.ArrayGetItem]: ArrayGetItemHandler,
|
|
58
54
|
[CommandType.ArrayGetSize]: ArrayGetSizeHandler,
|
|
@@ -65,7 +61,8 @@ const handlers = {
|
|
|
65
61
|
[CommandType.GetInstanceMethodAsDelegate]: GetInstanceMethodAsDelegateHandler,
|
|
66
62
|
[CommandType.PassDelegate]: PassDelegateHandler,
|
|
67
63
|
[CommandType.InvokeDelegate]: InvokeDelegateHandler,
|
|
68
|
-
[CommandType.ConvertType]: ConvertTypeHandler,
|
|
64
|
+
// [CommandType.ConvertType]: ConvertTypeHandler,
|
|
65
|
+
[CommandType.InvokeGlobalFunction]: InvokeGlobalFunctionHandler,
|
|
69
66
|
}
|
|
70
67
|
|
|
71
68
|
Object.keys(handlers).forEach((commandTypeHandler) => {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const AbstractHandler = require('./AbstractHandler')
|
|
2
|
+
|
|
3
|
+
class InvokeGlobalFunctionHandler extends AbstractHandler {
|
|
4
|
+
requiredParametersCount = 1
|
|
5
|
+
|
|
6
|
+
constructor() {
|
|
7
|
+
super()
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
process(command) {
|
|
11
|
+
try {
|
|
12
|
+
if (command.payload.length < this.requiredParametersCount) {
|
|
13
|
+
throw new Error('Invoke Global Function parameters mismatch')
|
|
14
|
+
}
|
|
15
|
+
const { payload } = command
|
|
16
|
+
const functionName = payload[0]
|
|
17
|
+
const args = payload.slice(1)
|
|
18
|
+
|
|
19
|
+
if (typeof global[functionName] === 'function') {
|
|
20
|
+
return Reflect.apply(global[functionName], undefined, args)
|
|
21
|
+
} else {
|
|
22
|
+
let methods = Object.getOwnPropertyNames(global).filter(function(property) {
|
|
23
|
+
return typeof global[property] === 'function'
|
|
24
|
+
})
|
|
25
|
+
let message = `Method ${functionName} not found in global. Available methods:\n`
|
|
26
|
+
methods.forEach((methodIter) => {
|
|
27
|
+
message += `${methodIter}\n`
|
|
28
|
+
})
|
|
29
|
+
throw new Error(message)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
} catch (error) {
|
|
34
|
+
throw this.process_stack_trace(error, this.constructor.name)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
module.exports = new InvokeGlobalFunctionHandler()
|
|
@@ -31,27 +31,22 @@ class Interpreter {
|
|
|
31
31
|
_Receiver = require(require.resolve('../receiver/Receiver'))
|
|
32
32
|
}
|
|
33
33
|
responseByteArray = _Receiver.sendCommand(messageByteArray)
|
|
34
|
-
} else if (
|
|
35
|
-
command.runtimeName === RuntimeName.Nodejs &&
|
|
36
|
-
connectionData.connectionType === ConnectionType.WEB_SOCKET
|
|
37
|
-
) {
|
|
34
|
+
} else if (connectionData.connectionType === ConnectionType.WEB_SOCKET) {
|
|
38
35
|
try {
|
|
39
36
|
// lazy transmitter websocket loading
|
|
40
37
|
if (!_TransmitterWebsocket) {
|
|
41
38
|
_TransmitterWebsocket = require('../transmitter/TransmitterWebsocket')
|
|
42
39
|
}
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
.catch((error) => {
|
|
52
|
-
throw error
|
|
53
|
-
})
|
|
40
|
+
const _response = await _TransmitterWebsocket.sendCommand(
|
|
41
|
+
messageByteArray,
|
|
42
|
+
connectionData
|
|
43
|
+
)
|
|
44
|
+
if (_response) {
|
|
45
|
+
const command = new CommandDeserializer(_response).deserialize()
|
|
46
|
+
return command
|
|
47
|
+
}
|
|
54
48
|
} catch (error) {
|
|
49
|
+
// TODO: handle error exception log?
|
|
55
50
|
console.log(error)
|
|
56
51
|
}
|
|
57
52
|
} else {
|
|
@@ -65,6 +60,7 @@ class Interpreter {
|
|
|
65
60
|
// eslint-disable-next-line no-unused-vars
|
|
66
61
|
} catch (error) {
|
|
67
62
|
// TODO: handle error exception log?
|
|
63
|
+
console.log(error)
|
|
68
64
|
}
|
|
69
65
|
}
|
|
70
66
|
|
|
@@ -2,6 +2,7 @@ const Command = require('../../utils/Command')
|
|
|
2
2
|
const Type = require('../../utils/Type')
|
|
3
3
|
const StringEncodingMode = require('../../utils/StringEncodingMode')
|
|
4
4
|
const { Buffer } = require('buffer')
|
|
5
|
+
const CustomError = require('../../utils/CustomError')
|
|
5
6
|
|
|
6
7
|
const encoder = new TextEncoder()
|
|
7
8
|
|
|
@@ -23,6 +24,12 @@ class TypeSerializer {
|
|
|
23
24
|
} else if (typeof payload_item === 'boolean' || payload_item instanceof Boolean) {
|
|
24
25
|
return TypeSerializer.serializeBool(payload_item)
|
|
25
26
|
} else {
|
|
27
|
+
if (payload_item instanceof Promise) {
|
|
28
|
+
throw new CustomError('Type not supported - Promise', JSON.stringify(payload_item))
|
|
29
|
+
}
|
|
30
|
+
if (payload_item === undefined) {
|
|
31
|
+
throw 'Type not supported - undefined'
|
|
32
|
+
}
|
|
26
33
|
throw 'Unknown type - not supported in JavaScript'
|
|
27
34
|
}
|
|
28
35
|
}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
const wrapper = require('./TransmitterWrapper')
|
|
2
2
|
|
|
3
3
|
class Transmitter {
|
|
4
|
-
static initialize() {
|
|
5
|
-
return wrapper.initialize()
|
|
6
|
-
}
|
|
7
|
-
|
|
8
4
|
static sendCommand(messageArray) {
|
|
9
5
|
return wrapper.sendCommand(messageArray)
|
|
10
6
|
}
|
|
@@ -16,6 +12,10 @@ class Transmitter {
|
|
|
16
12
|
static setConfigSource(configSource) {
|
|
17
13
|
return wrapper.setConfigSource(configSource)
|
|
18
14
|
}
|
|
15
|
+
|
|
16
|
+
static setJavonetWorkingDirectory(workingDirectory) {
|
|
17
|
+
return wrapper.setJavonetWorkingDirectory(workingDirectory)
|
|
18
|
+
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
module.exports = Transmitter
|
|
@@ -1,34 +1,47 @@
|
|
|
1
1
|
let library
|
|
2
2
|
|
|
3
3
|
class TransmitterWrapper {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
library = require(
|
|
15
|
-
`${require('path').resolve(__dirname, '../../../../')}/build/Release/JavonetNodejsRuntimeAddon.node`
|
|
16
|
-
)
|
|
4
|
+
|
|
5
|
+
static isNativeLibraryLoaded() {
|
|
6
|
+
return library !== undefined
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
static loadNativeLibrary() {
|
|
10
|
+
if (this.isNativeLibraryLoaded()) {
|
|
11
|
+
return
|
|
12
|
+
}
|
|
13
|
+
|
|
17
14
|
let binariesRootPath = String(`${require('path').resolve(__dirname, '../../../../')}`)
|
|
18
|
-
|
|
15
|
+
|
|
16
|
+
const nativeAddonPath = `${binariesRootPath}/build/Release/JavonetNodejsRuntimeAddon.node`
|
|
17
|
+
|
|
18
|
+
library = require(nativeAddonPath)
|
|
19
|
+
|
|
20
|
+
library.initializeTransmitter(binariesRootPath)
|
|
21
|
+
// eslint-disable-next-line no-unused-vars
|
|
22
|
+
const ReceiverNative = require('../receiver/ReceiverNative')
|
|
23
|
+
library.setReceiverNative(global.ReceiverNative)
|
|
19
24
|
}
|
|
20
25
|
|
|
21
26
|
static activate(licenseKey) {
|
|
27
|
+
this.loadNativeLibrary()
|
|
22
28
|
return library.activate(licenseKey)
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
static sendCommand(messageArray) {
|
|
32
|
+
this.loadNativeLibrary()
|
|
26
33
|
return library.sendCommand(messageArray)
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
static setConfigSource(configSource) {
|
|
37
|
+
this.loadNativeLibrary()
|
|
30
38
|
return library.setConfigSource(configSource)
|
|
31
39
|
}
|
|
40
|
+
|
|
41
|
+
static setJavonetWorkingDirectory(path) {
|
|
42
|
+
this.loadNativeLibrary()
|
|
43
|
+
library.setJavonetWorkingDirectory(path)
|
|
44
|
+
}
|
|
32
45
|
}
|
|
33
46
|
|
|
34
47
|
module.exports = TransmitterWrapper
|
|
@@ -127,7 +127,7 @@ class ConfigRuntimeFactory {
|
|
|
127
127
|
#loadModules(runtime, configName, jfr, rtmCtx) {
|
|
128
128
|
const modules = jfr
|
|
129
129
|
.getModules(RuntimeNameHandler.getName(runtime), configName)
|
|
130
|
-
.split('
|
|
130
|
+
.split(',')
|
|
131
131
|
.filter((module) => module.trim() !== '')
|
|
132
132
|
|
|
133
133
|
const configDirectoryAbsolutePath = require('path').dirname(this.path)
|
|
@@ -92,7 +92,9 @@ class InvocationContext {
|
|
|
92
92
|
execute() {
|
|
93
93
|
this.#interpreter = new Interpreter()
|
|
94
94
|
this.#responseCommand = this.#interpreter.execute(this.#currentCommand, this.#connectionData)
|
|
95
|
-
|
|
95
|
+
if (this.#responseCommand === undefined) {
|
|
96
|
+
throw new Error('responseCommand is undefined in Invocation Context execute method')
|
|
97
|
+
}
|
|
96
98
|
if (this.#responseCommand.commandType === CommandType.Exception) {
|
|
97
99
|
throw ExceptionThrower.throwException(this.#responseCommand)
|
|
98
100
|
}
|
|
@@ -122,22 +124,6 @@ class InvocationContext {
|
|
|
122
124
|
return this.#createInstanceContext(localCommand)
|
|
123
125
|
}
|
|
124
126
|
|
|
125
|
-
/**
|
|
126
|
-
* Invokes a standalone method on the target runtime.
|
|
127
|
-
* @param {string} methodName - The name of the method to invoke.
|
|
128
|
-
* @param {...any} args - Method arguments.
|
|
129
|
-
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to invoke the static method.
|
|
130
|
-
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/calling-methods/invoking-static-method)
|
|
131
|
-
* @method
|
|
132
|
-
*/
|
|
133
|
-
invokeStandaloneMethod(methodName, ...args) {
|
|
134
|
-
let localCommand = new Command(this.#runtimeName, CommandType.InvokeStandaloneMethod, [
|
|
135
|
-
methodName,
|
|
136
|
-
...args,
|
|
137
|
-
])
|
|
138
|
-
return this.#createInstanceContext(localCommand)
|
|
139
|
-
}
|
|
140
|
-
|
|
141
127
|
/**
|
|
142
128
|
* Retrieves the value of a static field from the target runtime.
|
|
143
129
|
* @param {string} fieldName - The name of the field to get.
|
|
@@ -480,6 +466,10 @@ class InvocationWsContext extends InvocationContext {
|
|
|
480
466
|
this.#connectionData
|
|
481
467
|
)
|
|
482
468
|
|
|
469
|
+
if (this.#responseCommand === undefined) {
|
|
470
|
+
throw new Error('responseCommand is undefined in Invocation Context execute method')
|
|
471
|
+
}
|
|
472
|
+
|
|
483
473
|
if (this.#responseCommand.commandType === CommandType.Exception) {
|
|
484
474
|
throw ExceptionThrower.throwException(this.#responseCommand)
|
|
485
475
|
}
|
package/dist/lib/sdk/Javonet.js
CHANGED
|
@@ -4,6 +4,7 @@ const Transmitter = require('../core/transmitter/Transmitter')
|
|
|
4
4
|
const ConfigRuntimeFactory = require('./ConfigRuntimeFactory')
|
|
5
5
|
const RuntimeLogger = require('../utils/RuntimeLogger')
|
|
6
6
|
const TcpConnectionData = require('../utils/connectionData/TcpConnectionData')
|
|
7
|
+
const { mkdirSync } = require('node:fs')
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* The Javonet class is a singleton class that serves as the entry point for interacting with Javonet.
|
|
@@ -14,7 +15,6 @@ const TcpConnectionData = require('../utils/connectionData/TcpConnectionData')
|
|
|
14
15
|
class Javonet {
|
|
15
16
|
// Static block to initialize the Transmitter
|
|
16
17
|
static {
|
|
17
|
-
Transmitter.initialize()
|
|
18
18
|
//SDKExceptionHelper.sendExceptionToAppInsights("SdkMessage", "Javonet SDK initialized");
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -80,6 +80,22 @@ class Javonet {
|
|
|
80
80
|
static setConfigSource(configSource) {
|
|
81
81
|
Transmitter.setConfigSource(configSource)
|
|
82
82
|
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Sets the working directory for the Javonet SDK.
|
|
86
|
+
*
|
|
87
|
+
* @param {string} path - The working directory.
|
|
88
|
+
*/
|
|
89
|
+
static setJavonetWorkingDirectory(path) {
|
|
90
|
+
path = path.replace(/\\/g, "/");
|
|
91
|
+
if (!path.endsWith("/")) {
|
|
92
|
+
path += "/";
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
mkdirSync(path, { recursive: true, mode: 0o700 });
|
|
96
|
+
Transmitter.setJavonetWorkingDirectory(path)
|
|
97
|
+
}
|
|
98
|
+
|
|
83
99
|
}
|
|
84
100
|
|
|
85
101
|
module.exports = {
|
|
@@ -103,6 +103,9 @@ class RuntimeContext {
|
|
|
103
103
|
execute() {
|
|
104
104
|
this.#responseCommand = this.#interpreter.execute(this.#currentCommand, this.connectionData)
|
|
105
105
|
this.#currentCommand = null
|
|
106
|
+
if (this.#responseCommand === undefined) {
|
|
107
|
+
throw new Error('responseCommand is undefined in Runtime Context execute method')
|
|
108
|
+
}
|
|
106
109
|
if (this.#responseCommand.commandType === CommandType.Exception) {
|
|
107
110
|
throw ExceptionThrower.throwException(this.#responseCommand)
|
|
108
111
|
}
|
|
@@ -233,6 +236,30 @@ class RuntimeContext {
|
|
|
233
236
|
return new InvocationContext(this.runtimeName, this.connectionData, this.#buildCommand(localCommand))
|
|
234
237
|
}
|
|
235
238
|
|
|
239
|
+
/**
|
|
240
|
+
* Invokes a function from the called runtime. This method is used when working with functions from the called runtime.
|
|
241
|
+
* The arguments include the function name and the arguments to be passed to the function.
|
|
242
|
+
* After invoking the function, the result can be used for further operations.
|
|
243
|
+
* @param {string} functionName - The name of the function to invoke.
|
|
244
|
+
* @param {...any} args - The arguments to be passed to the function.
|
|
245
|
+
* @returns {InvocationContext} InvocationContext instance that wraps the command to invoke the function.
|
|
246
|
+
* @see [Invoking Functions Guide](https://www.javonet.com/guides/v2/csharp/functions/invoking-functions)
|
|
247
|
+
* @method
|
|
248
|
+
*/
|
|
249
|
+
invokeGlobalFunction(functionName, ...args) {
|
|
250
|
+
let localCommand = new Command(this.runtimeName, CommandType.InvokeGlobalFunction, [functionName, ...args]);
|
|
251
|
+
this.#currentCommand = null;
|
|
252
|
+
if (this.connectionData.connectionType === ConnectionType.WEB_SOCKET) {
|
|
253
|
+
return new InvocationWsContext(
|
|
254
|
+
this.runtimeName,
|
|
255
|
+
this.connectionData,
|
|
256
|
+
this.#buildCommand(localCommand)
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
return new InvocationContext(this.runtimeName, this.connectionData, this.#buildCommand(localCommand));
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
|
|
236
263
|
#buildCommand = function (command) {
|
|
237
264
|
for (let i = 0; i < command.payload.length; i++) {
|
|
238
265
|
command.payload[i] = this.#encapsulatePayloadItem(command.payload[i])
|
|
@@ -16,7 +16,7 @@ const CommandType = /** @type {const} */ ({
|
|
|
16
16
|
GetInstanceField: 13,
|
|
17
17
|
Optimize: 14,
|
|
18
18
|
GenerateLib: 15,
|
|
19
|
-
|
|
19
|
+
InvokeGlobalFunction: 16,
|
|
20
20
|
DestructReference: 17,
|
|
21
21
|
ArrayReference: 18,
|
|
22
22
|
ArrayGetItem: 19,
|
|
@@ -42,7 +42,6 @@ const CommandType = /** @type {const} */ ({
|
|
|
42
42
|
PassDelegate: 39,
|
|
43
43
|
InvokeDelegate: 40,
|
|
44
44
|
ConvertType: 41,
|
|
45
|
-
InvokeStandaloneMethod: 42,
|
|
46
45
|
})
|
|
47
46
|
|
|
48
47
|
module.exports = CommandType
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
const { CommandType, Command, ExceptionSerializer } = require('@javonet/core')
|
|
2
|
+
const ReferencesCache = require('../referenceCache/ReferencesCache')
|
|
3
|
+
|
|
1
4
|
const ValueHandler = require('./ValueHandler')
|
|
2
5
|
const LoadLibraryHandler = require('./LoadLibraryHandler')
|
|
3
6
|
const GetTypeHandler = require('./GetTypeHandler')
|
|
@@ -11,7 +14,6 @@ const SetInstanceFieldHandler = require('./SetInstanceFieldHandler')
|
|
|
11
14
|
const InvokeInstanceMethodHandler = require('./InvokeInstanceMethodHandler')
|
|
12
15
|
const DestructReferenceHandler = require('./DestructReferenceHandler')
|
|
13
16
|
const CastHandler = require('./CastingHandler')
|
|
14
|
-
const InvokeGlobalMethodHandler = require('./InvokeGlobalMethodHandler')
|
|
15
17
|
const ArrayGetItemHandler = require('./ArrayGetItemHandler')
|
|
16
18
|
const ArrayGetSizeHandler = require('./ArrayGetSizeHandler')
|
|
17
19
|
const ArrayGetRankHandler = require('./ArrayGetRankHandler')
|
|
@@ -19,15 +21,11 @@ const ArraySetItemHandler = require('./ArraySetItemHandler')
|
|
|
19
21
|
const ArrayHandler = require('./ArrayHandler')
|
|
20
22
|
const EnableNamespaceHandler = require('./EnableNamespaceHandler')
|
|
21
23
|
const EnableTypeHandler = require('./EnableTypeHandler')
|
|
22
|
-
|
|
23
|
-
const { CommandType, Command, ExceptionSerializer } = require('@javonet/core')
|
|
24
|
-
const ReferencesCache = require('../referenceCache/ReferencesCache')
|
|
25
|
-
const InvokeStandaloneMethodHandler = require('./InvokeStandaloneMethodHandler')
|
|
26
24
|
const GetStaticMethodAsDelegateHandler = require('./GetStaticMethodAsDelegateHandler')
|
|
27
25
|
const GetInstanceMethodAsDelegateHandler = require('./GetInstanceMethodAsDelegateHandler')
|
|
28
26
|
const PassDelegateHandler = require('./PassDelegateHandler')
|
|
29
27
|
const InvokeDelegateHandler = require('./InvokeDelegateHandler')
|
|
30
|
-
const
|
|
28
|
+
const InvokeGlobalFunctionHandler = require('./InvokeGlobalFunctionHandler')
|
|
31
29
|
|
|
32
30
|
function isResponseSimpleType(response) {
|
|
33
31
|
let type = typeof response
|
|
@@ -51,8 +49,6 @@ const handlers = {
|
|
|
51
49
|
[CommandType.GetInstanceField]: GetInstanceFieldHandler,
|
|
52
50
|
[CommandType.SetInstanceField]: SetInstanceFieldHandler,
|
|
53
51
|
[CommandType.InvokeInstanceMethod]: InvokeInstanceMethodHandler,
|
|
54
|
-
[CommandType.InvokeStandaloneMethod]: InvokeStandaloneMethodHandler,
|
|
55
|
-
[CommandType.InvokeGlobalMethod]: InvokeGlobalMethodHandler,
|
|
56
52
|
[CommandType.DestructReference]: DestructReferenceHandler,
|
|
57
53
|
[CommandType.ArrayGetItem]: ArrayGetItemHandler,
|
|
58
54
|
[CommandType.ArrayGetSize]: ArrayGetSizeHandler,
|
|
@@ -65,7 +61,8 @@ const handlers = {
|
|
|
65
61
|
[CommandType.GetInstanceMethodAsDelegate]: GetInstanceMethodAsDelegateHandler,
|
|
66
62
|
[CommandType.PassDelegate]: PassDelegateHandler,
|
|
67
63
|
[CommandType.InvokeDelegate]: InvokeDelegateHandler,
|
|
68
|
-
[CommandType.ConvertType]: ConvertTypeHandler,
|
|
64
|
+
// [CommandType.ConvertType]: ConvertTypeHandler,
|
|
65
|
+
[CommandType.InvokeGlobalFunction]: InvokeGlobalFunctionHandler,
|
|
69
66
|
}
|
|
70
67
|
|
|
71
68
|
Object.keys(handlers).forEach((commandTypeHandler) => {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const AbstractHandler = require('./AbstractHandler')
|
|
2
|
+
|
|
3
|
+
class InvokeGlobalFunctionHandler extends AbstractHandler {
|
|
4
|
+
requiredParametersCount = 1
|
|
5
|
+
|
|
6
|
+
constructor() {
|
|
7
|
+
super()
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
process(command) {
|
|
11
|
+
try {
|
|
12
|
+
if (command.payload.length < this.requiredParametersCount) {
|
|
13
|
+
throw new Error('Invoke Global Function parameters mismatch')
|
|
14
|
+
}
|
|
15
|
+
const { payload } = command
|
|
16
|
+
const functionName = payload[0]
|
|
17
|
+
const args = payload.slice(1)
|
|
18
|
+
|
|
19
|
+
if (typeof global[functionName] === 'function') {
|
|
20
|
+
return Reflect.apply(global[functionName], undefined, args)
|
|
21
|
+
} else {
|
|
22
|
+
let methods = Object.getOwnPropertyNames(global).filter(function(property) {
|
|
23
|
+
return typeof global[property] === 'function'
|
|
24
|
+
})
|
|
25
|
+
let message = `Method ${functionName} not found in global. Available methods:\n`
|
|
26
|
+
methods.forEach((methodIter) => {
|
|
27
|
+
message += `${methodIter}\n`
|
|
28
|
+
})
|
|
29
|
+
throw new Error(message)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
} catch (error) {
|
|
34
|
+
throw this.process_stack_trace(error, this.constructor.name)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
module.exports = new InvokeGlobalFunctionHandler()
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
const wrapper = require('./TransmitterWrapper')
|
|
2
2
|
|
|
3
3
|
class Transmitter {
|
|
4
|
-
static initialize() {
|
|
5
|
-
return wrapper.initialize()
|
|
6
|
-
}
|
|
7
|
-
|
|
8
4
|
static sendCommand(messageArray) {
|
|
9
5
|
return wrapper.sendCommand(messageArray)
|
|
10
6
|
}
|
|
@@ -16,6 +12,10 @@ class Transmitter {
|
|
|
16
12
|
static setConfigSource(configSource) {
|
|
17
13
|
return wrapper.setConfigSource(configSource)
|
|
18
14
|
}
|
|
15
|
+
|
|
16
|
+
static setJavonetWorkingDirectory(workingDirectory) {
|
|
17
|
+
return wrapper.setJavonetWorkingDirectory(workingDirectory)
|
|
18
|
+
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
module.exports = Transmitter
|
|
@@ -1,34 +1,47 @@
|
|
|
1
1
|
let library
|
|
2
2
|
|
|
3
3
|
class TransmitterWrapper {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
library = require(
|
|
15
|
-
`${require('path').resolve(__dirname, '../../../../')}/build/Release/JavonetNodejsRuntimeAddon.node`
|
|
16
|
-
)
|
|
4
|
+
|
|
5
|
+
static isNativeLibraryLoaded() {
|
|
6
|
+
return library !== undefined
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
static loadNativeLibrary() {
|
|
10
|
+
if (this.isNativeLibraryLoaded()) {
|
|
11
|
+
return
|
|
12
|
+
}
|
|
13
|
+
|
|
17
14
|
let binariesRootPath = String(`${require('path').resolve(__dirname, '../../../../')}`)
|
|
18
|
-
|
|
15
|
+
|
|
16
|
+
const nativeAddonPath = `${binariesRootPath}/build/Release/JavonetNodejsRuntimeAddon.node`
|
|
17
|
+
|
|
18
|
+
library = require(nativeAddonPath)
|
|
19
|
+
|
|
20
|
+
library.initializeTransmitter(binariesRootPath)
|
|
21
|
+
// eslint-disable-next-line no-unused-vars
|
|
22
|
+
const ReceiverNative = require('../receiver/ReceiverNative')
|
|
23
|
+
library.setReceiverNative(global.ReceiverNative)
|
|
19
24
|
}
|
|
20
25
|
|
|
21
26
|
static activate(licenseKey) {
|
|
27
|
+
this.loadNativeLibrary()
|
|
22
28
|
return library.activate(licenseKey)
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
static sendCommand(messageArray) {
|
|
32
|
+
this.loadNativeLibrary()
|
|
26
33
|
return library.sendCommand(messageArray)
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
static setConfigSource(configSource) {
|
|
37
|
+
this.loadNativeLibrary()
|
|
30
38
|
return library.setConfigSource(configSource)
|
|
31
39
|
}
|
|
40
|
+
|
|
41
|
+
static setJavonetWorkingDirectory(path) {
|
|
42
|
+
this.loadNativeLibrary()
|
|
43
|
+
library.setJavonetWorkingDirectory(path)
|
|
44
|
+
}
|
|
32
45
|
}
|
|
33
46
|
|
|
34
47
|
module.exports = TransmitterWrapper
|
|
@@ -127,7 +127,7 @@ class ConfigRuntimeFactory {
|
|
|
127
127
|
#loadModules(runtime, configName, jfr, rtmCtx) {
|
|
128
128
|
const modules = jfr
|
|
129
129
|
.getModules(RuntimeNameHandler.getName(runtime), configName)
|
|
130
|
-
.split('
|
|
130
|
+
.split(',')
|
|
131
131
|
.filter((module) => module.trim() !== '')
|
|
132
132
|
|
|
133
133
|
const configDirectoryAbsolutePath = require('path').dirname(this.path)
|
package/lib/sdk/Javonet.js
CHANGED
|
@@ -4,6 +4,7 @@ const Transmitter = require('../core/transmitter/Transmitter')
|
|
|
4
4
|
const ConfigRuntimeFactory = require('./ConfigRuntimeFactory')
|
|
5
5
|
const RuntimeLogger = require('../utils/RuntimeLogger')
|
|
6
6
|
const TcpConnectionData = require('../utils/connectionData/TcpConnectionData')
|
|
7
|
+
const { mkdirSync } = require('node:fs')
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* The Javonet class is a singleton class that serves as the entry point for interacting with Javonet.
|
|
@@ -14,7 +15,6 @@ const TcpConnectionData = require('../utils/connectionData/TcpConnectionData')
|
|
|
14
15
|
class Javonet {
|
|
15
16
|
// Static block to initialize the Transmitter
|
|
16
17
|
static {
|
|
17
|
-
Transmitter.initialize()
|
|
18
18
|
//SDKExceptionHelper.sendExceptionToAppInsights("SdkMessage", "Javonet SDK initialized");
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -80,6 +80,22 @@ class Javonet {
|
|
|
80
80
|
static setConfigSource(configSource) {
|
|
81
81
|
Transmitter.setConfigSource(configSource)
|
|
82
82
|
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Sets the working directory for the Javonet SDK.
|
|
86
|
+
*
|
|
87
|
+
* @param {string} path - The working directory.
|
|
88
|
+
*/
|
|
89
|
+
static setJavonetWorkingDirectory(path) {
|
|
90
|
+
path = path.replace(/\\/g, "/");
|
|
91
|
+
if (!path.endsWith("/")) {
|
|
92
|
+
path += "/";
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
mkdirSync(path, { recursive: true, mode: 0o700 });
|
|
96
|
+
Transmitter.setJavonetWorkingDirectory(path)
|
|
97
|
+
}
|
|
98
|
+
|
|
83
99
|
}
|
|
84
100
|
|
|
85
101
|
module.exports = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "javonet-nodejs-sdk",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.12",
|
|
4
4
|
"description": "Javonet allows you to reference and use modules or packages written in (Java/Kotlin/Groovy/Clojure, C#/VB.NET, Ruby, Perl, Python, JavaScript/TypeScript) like they were created in your technology. It works on Linux/Windows and MacOS for applications created in JVM, CLR/Netcore, Perl, Python, Ruby, NodeJS, C++ or GoLang and gives you unparalleled freedom and flexibility with native performance in building your mixed-technologies products. Let it be accessing best AI or cryptography libraries, devices SDKs, legacy client modules, internal custom packages or anything from public repositories available on NPM, Nuget, PyPI, Maven/Gradle, RubyGems or GitHub. Get free from programming languages barriers today! For more information check out our guides at https://www.javonet.com/guides/v2/",
|
|
5
5
|
"main": "dist/lib/sdk/Javonet.js",
|
|
6
6
|
"types": "dist/types/dist/lib/sdk/Javonet.d.ts",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
class AbstractGeneratorHandler {
|
|
2
|
-
generate_command(analyzed_object, parent_command, handlers) {
|
|
3
|
-
throw NotImplementedError('subclasses must override generate_command()!')
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
generate_code(existing_string_builder, common_command, used_object, handlers) {
|
|
7
|
-
throw NotImplementedError('subclasses must override generate_command()!')
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
module.exports = AbstractGeneratorHandler
|