javonet-ruby-sdk 2.6.8 → 2.6.10
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Clr/Javonet.Clr.Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Clr/JavonetClrRuntime.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Jvm/JavonetJvmRuntime.jar +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetActivationService.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libUtils.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetActivationService.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libUtils.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/libJavonetActivationService.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/libUtils.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetActivationService.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejs2218RuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libUtils.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/Configs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetActivationService.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetCppRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetGoRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetJvmRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetNetcoreRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetPhpRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetPythonRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetRubyRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpTlsClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/version.txt +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/Configs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetActivationService.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetClrRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetCppRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetGoRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetJvmRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNetcoreRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejs2218RuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejsRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPerlRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPhp848RuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPhpRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPython2RuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPythonRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRubyRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpTlsClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/Configs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetActivationService.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetClrRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetCppRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetGoRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetJvmRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetNetcoreRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPhpRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPython2RuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPythonRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpTlsClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Core.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Plugins.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/Handler.cjs +49 -11
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/InvokeInstanceMethodHandler.cjs +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/InvokeStaticMethodHandler.cjs +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/RegisterForUpdateHandler.cjs +60 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/ValueForUpdateHandler.cjs +36 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/InvocationContext.cjs +108 -23
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/RuntimeContext.cjs +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/Handler.d.ts +7 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/RegisterForUpdateHandler.d.ts +17 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/ValueForUpdateHandler.d.ts +7 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/InvocationContext.d.ts +10 -13
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/CommandType.d.ts +2 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/CommandType.cjs +3 -1
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Class/Load/XS/XS.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Data/UUID/UUID.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/FFI/Platypus/Platypus.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/List/Util/Util.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Moose/Moose.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/PPI/XS/XS.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Package/Stash/XS/XS.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Params/Util/Util.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Want/Want.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/share/dist/FFI-Platypus/lib/libplfill.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod +94 -94
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Handler/CommandHandler/RegisterForUpdateHandler.pm +29 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Handler/PerlHandler.pm +16 -9
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Sdk/Core/PerlCommandType.pm +2 -1
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Data/UUID/UUID.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/PPI/XS/XS.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Scalar/Util/Numeric/Numeric.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Want/Want.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/autobox/autobox.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/perllocal.pod +26 -26
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Handler/CommandHandler/RegisterForUpdateHandler.pm +29 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Handler/PerlHandler.pm +16 -9
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Sdk/Core/PerlCommandType.pm +2 -1
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/delegateCache/__pycache__/DelegatesCache.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/delegateCache/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/AsOutHandler.py +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/CreateClassInstanceHandler.py +0 -2
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/Handler.py +26 -1
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/RegisterForUpdateHandler.py +38 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/ValueForUpdateHandler.py +6 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractCommandHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AddEventListenerHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetItemHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetRankHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetSizeHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayReferenceHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArraySetItemHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AsOutHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AsRefHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CastingHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ConvertTypeHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CreateClassInstanceHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CreateNullHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/DestructReferenceHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableNamespaceHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableTypeHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ExceptionHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GenerateLibHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetAsyncOperationResultHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumItemHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumNameHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumValueHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetGlobalFieldHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetInstanceFieldHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetInstanceMethodAsDelegateHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetKwargHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetModuleHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetRefValueHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetResultTypeHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetStaticFieldHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetStaticMethodAsDelegateHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetTypeHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/Handler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/HandlerDictionary.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/HeartBeatHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeDelegateHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeGenericMethodHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeGenericStaticMethodHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeGlobalFunctionHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeInstanceMethodHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeStaticMethodHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/LoadLibraryHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/OptimizeHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/PassDelegateHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/PluginWrapperHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/RegisterForUpdateHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ResolveInstanceHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/RetrieveArrayHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetInstanceFieldHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetStaticFieldHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ValueForUpdateHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ValueHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/Interpreter.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/NamespaceCache.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandDeserializer.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandSerializer.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeDeserializer.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeSerializer.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/Receiver.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/ReferencesCache.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/TypeCache.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/CommandType.py +3 -1
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Command.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/CommandType.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ConnectionType.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ExceptionType.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/LazyModuleLoader.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/RuntimeLogger.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/RuntimeName.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/StringEncodingMode.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Type.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/TypesHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/UtilsConst.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/IConnectionData.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/InMemoryConnectionData.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/ExceptionSerializer.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/ExceptionThrower.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/JavonetException.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/messageHelper/__pycache__/MessageHelper.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/messageHelper/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/version.txt +1 -1
- data/lib/javonet-ruby-sdk/core/handler/handler.rb +50 -9
- data/lib/javonet-ruby-sdk/core/handler/register_for_update_handler.rb +28 -0
- data/lib/javonet-ruby-sdk/core/handler/value_for_update_handler.rb +11 -0
- data/lib/javonet-ruby-sdk/utils/command_type.rb +6 -0
- metadata +14 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bd483c1827f1c74cb5fc63d48819267cf05fa9dad0be8776a602be8da4461048
|
|
4
|
+
data.tar.gz: 2fe10b5e45c087b9642d47d9ec7dd8cb422113a2a7c9b2a6f5ee5fa608849d4d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2adb3e843603f22ddb1656865fe6a9038856c40fe128a9db8590f4368afba23d4552b9bed5dcc8b5508f3567f683367c454a195327ba446bfa346ec9b0d43cae
|
|
7
|
+
data.tar.gz: 1f2166306bc0ba00930878fffe6434dcbe6819995268e12599911f48d5e54b20a9b499d82d84c635f6762c14915c8c6298d1ab209e6b6557006bbfebf01dea3c
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.6.
|
|
1
|
+
2.6.10
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
2.6.
|
|
1
|
+
2.6.10
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
2.6.
|
|
1
|
+
2.6.10
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
2.6.
|
|
1
|
+
2.6.10
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
2.6.
|
|
1
|
+
2.6.10
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'2.6.
|
|
1
|
+
'2.6.10'
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'2.6.
|
|
1
|
+
'2.6.10'
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -22,6 +22,11 @@ __export(Handler_exports, {
|
|
|
22
22
|
handlers: () => handlers
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(Handler_exports);
|
|
25
|
+
var import_CommandType = require("../../utils/CommandType.cjs");
|
|
26
|
+
var import_Command = require("../../utils/Command.cjs");
|
|
27
|
+
var import_TypesHandler = require("../../utils/TypesHandler.cjs");
|
|
28
|
+
var import_ExceptionSerializer = require("../../utils/exception/ExceptionSerializer.cjs");
|
|
29
|
+
var import_AbstractHandler = require("./AbstractHandler.cjs");
|
|
25
30
|
var import_ReferencesCache = require("../referenceCache/ReferencesCache.cjs");
|
|
26
31
|
var import_ValueHandler = require("./ValueHandler.cjs");
|
|
27
32
|
var import_LoadLibraryHandler = require("./LoadLibraryHandler.cjs");
|
|
@@ -71,11 +76,8 @@ var import_GetAsyncOperationResultHandler = require("./GetAsyncOperationResultHa
|
|
|
71
76
|
var import_AsKwargsHandler = require("./AsKwargsHandler.cjs");
|
|
72
77
|
var import_GetResultTypeHandler = require("./GetResultTypeHandler.cjs");
|
|
73
78
|
var import_GetGlobalFieldHandler = require("./GetGlobalFieldHandler.cjs");
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var import_TypesHandler = require("../../utils/TypesHandler.cjs");
|
|
77
|
-
var import_ExceptionSerializer = require("../../utils/exception/ExceptionSerializer.cjs");
|
|
78
|
-
var import_AbstractHandler = require("./AbstractHandler.cjs");
|
|
79
|
+
var import_RegisterForUpdateHandler = require("./RegisterForUpdateHandler.cjs");
|
|
80
|
+
var import_ValueForUpdateHandler = require("./ValueForUpdateHandler.cjs");
|
|
79
81
|
const handlers = {
|
|
80
82
|
[import_CommandType.CommandType.Value]: new import_ValueHandler.ValueHandler(),
|
|
81
83
|
[import_CommandType.CommandType.LoadLibrary]: new import_LoadLibraryHandler.LoadLibraryHandler(),
|
|
@@ -124,7 +126,9 @@ const handlers = {
|
|
|
124
126
|
[import_CommandType.CommandType.GetAsyncOperationResult]: new import_GetAsyncOperationResultHandler.GetAsyncOperationResultHandler(),
|
|
125
127
|
[import_CommandType.CommandType.AsKwargs]: new import_AsKwargsHandler.AsKwargsHandler(),
|
|
126
128
|
[import_CommandType.CommandType.GetResultType]: new import_GetResultTypeHandler.GetResultTypeHandler(),
|
|
127
|
-
[import_CommandType.CommandType.GetGlobalField]: new import_GetGlobalFieldHandler.GetGlobalFieldHandler()
|
|
129
|
+
[import_CommandType.CommandType.GetGlobalField]: new import_GetGlobalFieldHandler.GetGlobalFieldHandler(),
|
|
130
|
+
[import_CommandType.CommandType.RegisterForUpdate]: new import_RegisterForUpdateHandler.RegisterForUpdateHandler(),
|
|
131
|
+
[import_CommandType.CommandType.ValueForUpdate]: new import_ValueForUpdateHandler.ValueForUpdateHandler()
|
|
128
132
|
};
|
|
129
133
|
class Handler {
|
|
130
134
|
/**
|
|
@@ -153,9 +157,19 @@ class Handler {
|
|
|
153
157
|
const response = handlers[command.commandType].handleCommand(command);
|
|
154
158
|
return this.parseCommand(response, command.runtimeName);
|
|
155
159
|
} catch (e) {
|
|
156
|
-
return
|
|
160
|
+
return Handler.resolveException(e, command);
|
|
157
161
|
}
|
|
158
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* Prefer innerException (or cause) when available.
|
|
165
|
+
* @param {any} error
|
|
166
|
+
* @param {Command} command
|
|
167
|
+
* @returns {Command}
|
|
168
|
+
*/
|
|
169
|
+
static resolveException(error, command) {
|
|
170
|
+
const inner = error?.cause;
|
|
171
|
+
return import_ExceptionSerializer.ExceptionSerializer.serializeException(inner ?? error, command);
|
|
172
|
+
}
|
|
159
173
|
/**
|
|
160
174
|
* @param {any} response
|
|
161
175
|
* @param {RuntimeName} runtimeName
|
|
@@ -167,13 +181,37 @@ class Handler {
|
|
|
167
181
|
return this.parseCommand(resolvedResponse, runtimeName);
|
|
168
182
|
});
|
|
169
183
|
}
|
|
184
|
+
let responseCommand;
|
|
170
185
|
if (import_TypesHandler.TypesHandler.isPrimitiveOrNullOrUndefined(response)) {
|
|
171
|
-
|
|
186
|
+
responseCommand = import_Command.Command.createResponse(response, runtimeName);
|
|
172
187
|
} else {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
188
|
+
const refCache = import_ReferencesCache.ReferencesCache.getInstance();
|
|
189
|
+
const uuid = refCache.cacheReference(response);
|
|
190
|
+
responseCommand = import_Command.Command.createReference(uuid, runtimeName);
|
|
191
|
+
}
|
|
192
|
+
const invocationContexts = import_RegisterForUpdateHandler.RegisterForUpdateHandler._invocationContexts.Value;
|
|
193
|
+
if (invocationContexts && invocationContexts.size > 0) {
|
|
194
|
+
const refCache = import_ReferencesCache.ReferencesCache.getInstance();
|
|
195
|
+
for (const [contextKey, instance] of invocationContexts.entries()) {
|
|
196
|
+
const instanceGuid = refCache.cacheReference(instance);
|
|
197
|
+
const updateContextCommand = new import_Command.Command(
|
|
198
|
+
runtimeName,
|
|
199
|
+
import_CommandType.CommandType.ValueForUpdate,
|
|
200
|
+
[
|
|
201
|
+
contextKey.toString(),
|
|
202
|
+
instanceGuid
|
|
203
|
+
]
|
|
204
|
+
);
|
|
205
|
+
if (typeof responseCommand.addArgToPayload === "function") {
|
|
206
|
+
responseCommand = responseCommand.addArgToPayload(updateContextCommand);
|
|
207
|
+
} else {
|
|
208
|
+
responseCommand.payload = responseCommand.payload || [];
|
|
209
|
+
responseCommand.payload.push(updateContextCommand);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
invocationContexts.clear();
|
|
176
213
|
}
|
|
214
|
+
return responseCommand;
|
|
177
215
|
}
|
|
178
216
|
}
|
|
179
217
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -44,7 +44,7 @@ class InvokeInstanceMethodHandler extends import_AbstractHandler.AbstractHandler
|
|
|
44
44
|
let methods = Object.getOwnPropertyNames(instance.__proto__).filter(function(property) {
|
|
45
45
|
return typeof instance.__proto__[property] === "function";
|
|
46
46
|
});
|
|
47
|
-
let message = `Method ${methodName} not found in object. Available methods:
|
|
47
|
+
let message = `Method ${methodName} not found in object ${instance.constructor.name}. Available methods:
|
|
48
48
|
`;
|
|
49
49
|
methods.forEach((methodIter) => {
|
|
50
50
|
message += `${methodIter}
|
|
@@ -44,7 +44,7 @@ class InvokeStaticMethodHandler extends import_AbstractHandler.AbstractHandler {
|
|
|
44
44
|
let methods = Object.getOwnPropertyNames(type).filter(function(property) {
|
|
45
45
|
return typeof type[property] === "function";
|
|
46
46
|
});
|
|
47
|
-
let message = `Method ${methodName} not found in class. Available methods:
|
|
47
|
+
let message = `Method ${methodName} not found in class ${type.name}. Available methods:
|
|
48
48
|
`;
|
|
49
49
|
methods.forEach((methodIter) => {
|
|
50
50
|
message += `${methodIter}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var RegisterForUpdateHandler_exports = {};
|
|
20
|
+
__export(RegisterForUpdateHandler_exports, {
|
|
21
|
+
RegisterForUpdateHandler: () => RegisterForUpdateHandler
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(RegisterForUpdateHandler_exports);
|
|
24
|
+
var import_AbstractHandler = require("./AbstractHandler.cjs");
|
|
25
|
+
class RegisterForUpdateHandler extends import_AbstractHandler.AbstractHandler {
|
|
26
|
+
requiredParametersCount = 2;
|
|
27
|
+
/* type {Map<string, any>} */
|
|
28
|
+
static _invocationContexts = { Value: /* @__PURE__ */ new Map() };
|
|
29
|
+
/**
|
|
30
|
+
* Ensure context map exists and return it.
|
|
31
|
+
* @returns {Map<string, any>}
|
|
32
|
+
*/
|
|
33
|
+
static getOrCreateContextMap() {
|
|
34
|
+
const container = RegisterForUpdateHandler._invocationContexts;
|
|
35
|
+
if (!container.Value) {
|
|
36
|
+
container.Value = /* @__PURE__ */ new Map();
|
|
37
|
+
}
|
|
38
|
+
return container.Value;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @param {any} command
|
|
42
|
+
* @returns {any}
|
|
43
|
+
*/
|
|
44
|
+
process(command) {
|
|
45
|
+
if (command.payload.length < this.requiredParametersCount) {
|
|
46
|
+
throw new Error("RegisterForUpdateHandler parameters mismatch");
|
|
47
|
+
}
|
|
48
|
+
const objectToRegister = command.payload[0];
|
|
49
|
+
const guidToRegister = command.payload.length > 1 && typeof command.payload[1] === "string" ? command.payload[1] : "";
|
|
50
|
+
const contextMap = RegisterForUpdateHandler.getOrCreateContextMap();
|
|
51
|
+
if (!contextMap.has(guidToRegister)) {
|
|
52
|
+
contextMap.set(guidToRegister, objectToRegister);
|
|
53
|
+
}
|
|
54
|
+
return objectToRegister;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
58
|
+
0 && (module.exports = {
|
|
59
|
+
RegisterForUpdateHandler
|
|
60
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var ValueForUpdateHandler_exports = {};
|
|
20
|
+
__export(ValueForUpdateHandler_exports, {
|
|
21
|
+
ValueForUpdateHandler: () => ValueForUpdateHandler
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(ValueForUpdateHandler_exports);
|
|
24
|
+
var import_AbstractHandler = require("./AbstractHandler.cjs");
|
|
25
|
+
class ValueForUpdateHandler extends import_AbstractHandler.AbstractHandler {
|
|
26
|
+
/**
|
|
27
|
+
* @param {any} command
|
|
28
|
+
*/
|
|
29
|
+
process(command) {
|
|
30
|
+
throw new Error(`${this.constructor.name} is not implemented in Node.js`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
35
|
+
ValueForUpdateHandler
|
|
36
|
+
});
|
|
@@ -25,10 +25,22 @@ var import_DelegatesCache = require("../core/delegatesCache/DelegatesCache.cjs")
|
|
|
25
25
|
var import_Interpreter = require("../core/interpreter/Interpreter.cjs");
|
|
26
26
|
var import_Command = require("../utils/Command.cjs");
|
|
27
27
|
var import_CommandType = require("../utils/CommandType.cjs");
|
|
28
|
-
var import_ConnectionType = require("../utils/ConnectionType.cjs");
|
|
29
28
|
var import_ExceptionThrower = require("../utils/exception/ExceptionThrower.cjs");
|
|
30
29
|
var import_RuntimeName = require("../utils/RuntimeName.cjs");
|
|
31
30
|
var import_TypesHandler = require("../utils/TypesHandler.cjs");
|
|
31
|
+
var import_uuid = require("uuid");
|
|
32
|
+
class AsyncLock {
|
|
33
|
+
constructor() {
|
|
34
|
+
this._tail = Promise.resolve();
|
|
35
|
+
}
|
|
36
|
+
async lock() {
|
|
37
|
+
let release;
|
|
38
|
+
const prev = this._tail;
|
|
39
|
+
this._tail = new Promise((res) => release = res);
|
|
40
|
+
await prev;
|
|
41
|
+
return () => release(void 0);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
32
44
|
class InvocationContext {
|
|
33
45
|
/** @type {RuntimeNameType} */
|
|
34
46
|
#runtimeName;
|
|
@@ -42,6 +54,12 @@ class InvocationContext {
|
|
|
42
54
|
#isExecuted = false;
|
|
43
55
|
/** @type {Interpreter | null} */
|
|
44
56
|
#interpreter = null;
|
|
57
|
+
/** @type {string | null} */
|
|
58
|
+
#guid = null;
|
|
59
|
+
/** @type {AsyncLock} */
|
|
60
|
+
#materializationLock = new AsyncLock();
|
|
61
|
+
// Static map holding contexts waiting for materialization (guid -> InvocationContext)
|
|
62
|
+
static _invocationContexts = /* @__PURE__ */ new Map();
|
|
45
63
|
/**
|
|
46
64
|
*
|
|
47
65
|
* @param {RuntimeNameType} runtimeName
|
|
@@ -56,6 +74,13 @@ class InvocationContext {
|
|
|
56
74
|
this.#responseCommand = null;
|
|
57
75
|
this.#isExecuted = isExecuted;
|
|
58
76
|
this.#interpreter = null;
|
|
77
|
+
this.#guid = (0, import_uuid.v4)();
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* @returns {string} guid of this InvocationContext
|
|
81
|
+
*/
|
|
82
|
+
getGuid() {
|
|
83
|
+
return this.#guid;
|
|
59
84
|
}
|
|
60
85
|
/**
|
|
61
86
|
* @param {Command} localCommand
|
|
@@ -71,7 +96,7 @@ class InvocationContext {
|
|
|
71
96
|
/**
|
|
72
97
|
* @returns {Command|null}
|
|
73
98
|
*/
|
|
74
|
-
|
|
99
|
+
getCurrentCommand() {
|
|
75
100
|
return this.#currentCommand;
|
|
76
101
|
}
|
|
77
102
|
//destructor() {
|
|
@@ -101,13 +126,8 @@ class InvocationContext {
|
|
|
101
126
|
}
|
|
102
127
|
/**
|
|
103
128
|
* Executes the current command.
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* Commands are becoming nested through each invocation of methods on Invocation Context.
|
|
107
|
-
* Each invocation triggers the creation of new Invocation Context instance wrapping the current command with new parent command valid for invoked method.
|
|
108
|
-
* Developer can decide on any moment of the materialization for the context taking full control of the chunks of the expression being transferred and processed on target runtime.
|
|
109
|
-
* @returns {Promise<InvocationContext>} the InvocationContext after executing the command.
|
|
110
|
-
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/execute-method)
|
|
129
|
+
* Returns the InvocationContext after executing the command.
|
|
130
|
+
* @returns {Promise<InvocationContext>}
|
|
111
131
|
* @method
|
|
112
132
|
*/
|
|
113
133
|
async execute() {
|
|
@@ -117,19 +137,73 @@ class InvocationContext {
|
|
|
117
137
|
if (!this.#interpreter) {
|
|
118
138
|
this.#interpreter = new import_Interpreter.Interpreter();
|
|
119
139
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
140
|
+
const entries = Array.from(InvocationContext._invocationContexts.entries());
|
|
141
|
+
entries.sort((a, b) => String(a[0]).localeCompare(String(b[0])));
|
|
142
|
+
const releases = [];
|
|
143
|
+
for (const [, ic] of entries) {
|
|
144
|
+
const release = await ic.#materializationLock.lock();
|
|
145
|
+
releases.push(release);
|
|
123
146
|
}
|
|
124
|
-
|
|
125
|
-
|
|
147
|
+
try {
|
|
148
|
+
this.#responseCommand = await this.#interpreter.execute(this.#currentCommand, this.#connectionData);
|
|
149
|
+
if (!this.#responseCommand) {
|
|
150
|
+
throw new Error("responseCommand is undefined in Invocation Context execute method");
|
|
151
|
+
}
|
|
152
|
+
if (this.#responseCommand.commandType === import_CommandType.CommandType.Exception) {
|
|
153
|
+
throw import_ExceptionThrower.ExceptionThrower.throwException(this.#responseCommand);
|
|
154
|
+
}
|
|
155
|
+
this.#responseCommand = this.#processUpdateInvocationContextCommands(this.#responseCommand);
|
|
156
|
+
if (this.#responseCommand.commandType === import_CommandType.CommandType.CreateClassInstance) {
|
|
157
|
+
this.#currentCommand = this.#responseCommand;
|
|
158
|
+
this.#isExecuted = true;
|
|
159
|
+
return this;
|
|
160
|
+
}
|
|
161
|
+
return new InvocationContext(this.#runtimeName, this.#connectionData, this.#responseCommand, true);
|
|
162
|
+
} finally {
|
|
163
|
+
for (let i = releases.length - 1; i >= 0; i--) {
|
|
164
|
+
try {
|
|
165
|
+
releases[i]();
|
|
166
|
+
} catch {
|
|
167
|
+
}
|
|
168
|
+
}
|
|
126
169
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Process UpdateInvocationContext commands in the provided responseCommand payload.
|
|
173
|
+
* For each ValueForUpdate command, set the referenced InvocationContext's currentCommand to a Reference command,
|
|
174
|
+
* remove that InvocationContext from the static map and remove ValueForUpdate items from response payload.
|
|
175
|
+
* @param {Command} responseCommand
|
|
176
|
+
* @returns {Command}
|
|
177
|
+
*/
|
|
178
|
+
#processUpdateInvocationContextCommands(responseCommand) {
|
|
179
|
+
if (!responseCommand?.payload || responseCommand.payload.length === 0) {
|
|
180
|
+
return responseCommand;
|
|
181
|
+
}
|
|
182
|
+
const commandsToUpdate = [];
|
|
183
|
+
for (const item of responseCommand.payload) {
|
|
184
|
+
if (item instanceof import_Command.Command && item.commandType === import_CommandType.CommandType.ValueForUpdate) {
|
|
185
|
+
commandsToUpdate.push(item);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (commandsToUpdate.length === 0) {
|
|
189
|
+
return responseCommand;
|
|
190
|
+
}
|
|
191
|
+
const updatedPayload = Array.from(responseCommand.payload);
|
|
192
|
+
for (const cmd of commandsToUpdate) {
|
|
193
|
+
const cmdPayload = cmd.payload;
|
|
194
|
+
if (cmdPayload && cmdPayload.length >= 2) {
|
|
195
|
+
const contextGuid = String(cmdPayload[0]);
|
|
196
|
+
const instanceGuid = String(cmdPayload[1]);
|
|
197
|
+
const invCtx = InvocationContext._invocationContexts.get(contextGuid);
|
|
198
|
+
if (invCtx) {
|
|
199
|
+
invCtx.#currentCommand = new import_Command.Command(invCtx.#runtimeName, import_CommandType.CommandType.Reference, [instanceGuid]);
|
|
200
|
+
InvocationContext._invocationContexts.delete(contextGuid);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
const idx = updatedPayload.indexOf(cmd);
|
|
204
|
+
if (idx >= 0) updatedPayload.splice(idx, 1);
|
|
131
205
|
}
|
|
132
|
-
return new
|
|
206
|
+
return new import_Command.Command(responseCommand.runtimeName, responseCommand.commandType, updatedPayload);
|
|
133
207
|
}
|
|
134
208
|
/**
|
|
135
209
|
* Invokes a static method on the target runtime.
|
|
@@ -171,14 +245,25 @@ class InvocationContext {
|
|
|
171
245
|
}
|
|
172
246
|
/**
|
|
173
247
|
* Creates a new instance of a class in the target runtime.
|
|
248
|
+
* Adds the newly created context to the static invocation contexts map and
|
|
249
|
+
* includes the context GUID as the first argument of CreateClassInstance command payload.
|
|
174
250
|
* @param {...any} args - The arguments to pass to the class constructor
|
|
175
251
|
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to create the instance.
|
|
176
|
-
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/calling-methods/creating-instance-and-calling-instance-methods)
|
|
177
252
|
* @method
|
|
178
253
|
*/
|
|
179
254
|
createInstance(...args) {
|
|
180
|
-
|
|
181
|
-
|
|
255
|
+
const localCommand = new import_Command.Command(this.#runtimeName, import_CommandType.CommandType.CreateClassInstance, [...args]);
|
|
256
|
+
const createInstanceInvCtx = this.#createInstanceContext(localCommand);
|
|
257
|
+
return createInstanceInvCtx.#registerForUpdate();
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Registers the current InvocationContext for updates.
|
|
261
|
+
* @returns {InvocationContext}
|
|
262
|
+
*/
|
|
263
|
+
#registerForUpdate() {
|
|
264
|
+
this.#currentCommand = this.#buildCommand(new import_Command.Command(this.#runtimeName, import_CommandType.CommandType.RegisterForUpdate, [this.getGuid()]));
|
|
265
|
+
InvocationContext._invocationContexts.set(this.getGuid(), this);
|
|
266
|
+
return this;
|
|
182
267
|
}
|
|
183
268
|
/**
|
|
184
269
|
* Retrieves the value of an instance field from the target runtime.
|
|
@@ -450,7 +535,7 @@ class InvocationContext {
|
|
|
450
535
|
}
|
|
451
536
|
return payloadItem;
|
|
452
537
|
} else if (payloadItem instanceof InvocationContext) {
|
|
453
|
-
return payloadItem.
|
|
538
|
+
return payloadItem.getCurrentCommand();
|
|
454
539
|
} else if (payloadItem instanceof Array) {
|
|
455
540
|
const copiedArray = payloadItem.map((item) => this.#encapsulatePayloadItem(item));
|
|
456
541
|
return new import_Command.Command(this.#runtimeName, import_CommandType.CommandType.Array, copiedArray);
|
|
@@ -284,7 +284,7 @@ class RuntimeContext {
|
|
|
284
284
|
}
|
|
285
285
|
return payloadItem;
|
|
286
286
|
} else if (payloadItem instanceof import_InvocationContext.InvocationContext) {
|
|
287
|
-
const command = payloadItem?.
|
|
287
|
+
const command = payloadItem?.getCurrentCommand();
|
|
288
288
|
if (!command) {
|
|
289
289
|
throw new Error("Command not found");
|
|
290
290
|
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
export type RuntimeName = import("../../types.d.ts").RuntimeName;
|
|
2
2
|
export class Handler {
|
|
3
|
+
/**
|
|
4
|
+
* Prefer innerException (or cause) when available.
|
|
5
|
+
* @param {any} error
|
|
6
|
+
* @param {Command} command
|
|
7
|
+
* @returns {Command}
|
|
8
|
+
*/
|
|
9
|
+
static resolveException(error: any, command: Command): Command;
|
|
3
10
|
/**
|
|
4
11
|
* @param {import('../interpreter/Interpreter.js').Interpreter} interpreter
|
|
5
12
|
*/
|