@dittolive/ditto 4.4.5 → 4.5.1
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/DittoReactNative.podspec +28 -0
- package/README.md +68 -51
- package/node/ditto.cjs.js +1718 -897
- package/node/ditto.darwin-arm64.node +0 -0
- package/node/ditto.darwin-x64.node +0 -0
- package/node/ditto.linux-arm.node +0 -0
- package/node/ditto.linux-x64.node +0 -0
- package/node/ditto.win32-x64.node +0 -0
- package/node/transports.darwin-arm64.node +0 -0
- package/node/transports.darwin-x64.node +0 -0
- package/package.json +27 -31
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/.cmake/api/v1/query/client-agp/cache-v2 +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/.cmake/api/v1/query/client-agp/cmakeFiles-v1 +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/.cmake/api/v1/query/client-agp/codemodel-v2 +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/.cmake/api/v1/reply/cache-v2-970081f7c58ab1625a1a.json +1303 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/.cmake/api/v1/reply/cmakeFiles-v1-e1bacde094ce7e389294.json +203 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/.cmake/api/v1/reply/codemodel-v2-54964c7f44134b1cec4d.json +60 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/.cmake/api/v1/reply/directory-.-Debug-f5ebdc15457944623624.json +14 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/.cmake/api/v1/reply/index-2023-12-06T19-58-48-0479.json +92 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/.cmake/api/v1/reply/target-cpp-Debug-a438adda6ad6df71f898.json +314 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/.ninja_deps +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/.ninja_log +21 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeCache.txt +393 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake +79 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeCXXCompiler.cmake +90 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeDetermineCompilerABI_C.bin +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeDetermineCompilerABI_CXX.bin +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CMakeSystem.cmake +113 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.c +803 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CompilerIdCXX/CMakeCXXCompilerId.cpp +791 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/3.22.1-g37088a8/CompilerIdCXX/CMakeCXXCompilerId.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/CMakeOutput.log +320 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/TargetDirectories.txt +3 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cmake.check_cache +1 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Attachment.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Authentication.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Collection.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/DQL.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Document.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Identity.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Lifecycle.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/LiveQuery.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Logger.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Misc.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Presence.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/RetainableState.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/SmallPeerInfo.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Transports.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/TypedArray.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Utils.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/main.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/dittoffi/ifaddrs.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/cpp.dir/cpp-adapter.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/CMakeFiles/rules.ninja +64 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/additional_project_files.txt +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/android_gradle_build.json +42 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/android_gradle_build_mini.json +31 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/build.ninja +297 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/build_file_index.txt +3 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/cmake_install.cmake +54 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/compile_commands.json +97 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/compile_commands.json.bin +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/configure_fingerprint.bin +8755 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/metadata_generation_command.txt +21 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/prefab_config.json +8 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/arm64-v8a/symbol_folder_index.txt +1 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/.cmake/api/v1/query/client-agp/cache-v2 +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/.cmake/api/v1/query/client-agp/cmakeFiles-v1 +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/.cmake/api/v1/query/client-agp/codemodel-v2 +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/.cmake/api/v1/reply/cache-v2-0cc74b41e95a51ba0457.json +1303 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/.cmake/api/v1/reply/cmakeFiles-v1-ee90fea936bce5771631.json +203 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/.cmake/api/v1/reply/codemodel-v2-82fa8946198e6eba430b.json +60 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/.cmake/api/v1/reply/directory-.-Debug-f5ebdc15457944623624.json +14 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/.cmake/api/v1/reply/index-2023-12-06T19-58-48-0893.json +92 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/.cmake/api/v1/reply/target-cpp-Debug-1e9d0b1a457f7fe5c618.json +314 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/.ninja_deps +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/.ninja_log +21 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeCache.txt +393 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake +79 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/3.22.1-g37088a8/CMakeCXXCompiler.cmake +90 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/3.22.1-g37088a8/CMakeDetermineCompilerABI_C.bin +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/3.22.1-g37088a8/CMakeDetermineCompilerABI_CXX.bin +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/3.22.1-g37088a8/CMakeSystem.cmake +115 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.c +803 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/3.22.1-g37088a8/CompilerIdCXX/CMakeCXXCompilerId.cpp +791 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/3.22.1-g37088a8/CompilerIdCXX/CMakeCXXCompilerId.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/CMakeOutput.log +304 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/TargetDirectories.txt +3 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cmake.check_cache +1 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Attachment.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Authentication.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Collection.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/DQL.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Document.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Identity.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Lifecycle.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/LiveQuery.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Logger.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Misc.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Presence.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/RetainableState.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/SmallPeerInfo.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Transports.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/TypedArray.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Utils.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/main.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/dittoffi/ifaddrs.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/cpp.dir/cpp-adapter.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/CMakeFiles/rules.ninja +64 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/additional_project_files.txt +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/android_gradle_build.json +42 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/android_gradle_build_mini.json +31 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/build.ninja +297 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/build_file_index.txt +3 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/cmake_install.cmake +54 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/compile_commands.json +97 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/compile_commands.json.bin +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/configure_fingerprint.bin +8755 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/metadata_generation_command.txt +21 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/prefab_config.json +8 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/armeabi-v7a/symbol_folder_index.txt +1 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/hash_key.txt +28 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/prefab/arm64-v8a/prefab/lib/aarch64-linux-android/cmake/ReactAndroid/ReactAndroidConfig.cmake +261 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/prefab/arm64-v8a/prefab/lib/aarch64-linux-android/cmake/ReactAndroid/ReactAndroidConfigVersion.cmake +9 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/prefab/arm64-v8a/prefab/lib/aarch64-linux-android/cmake/fbjni/fbjniConfig.cmake +9 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/prefab/arm64-v8a/prefab/lib/aarch64-linux-android/cmake/fbjni/fbjniConfigVersion.cmake +9 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/prefab/armeabi-v7a/prefab/lib/arm-linux-androideabi/cmake/ReactAndroid/ReactAndroidConfig.cmake +261 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/prefab/armeabi-v7a/prefab/lib/arm-linux-androideabi/cmake/ReactAndroid/ReactAndroidConfigVersion.cmake +9 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/prefab/armeabi-v7a/prefab/lib/arm-linux-androideabi/cmake/fbjni/fbjniConfig.cmake +9 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/prefab/armeabi-v7a/prefab/lib/arm-linux-androideabi/cmake/fbjni/fbjniConfigVersion.cmake +9 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/prefab/x86/prefab/lib/i686-linux-android/cmake/ReactAndroid/ReactAndroidConfig.cmake +261 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/prefab/x86/prefab/lib/i686-linux-android/cmake/ReactAndroid/ReactAndroidConfigVersion.cmake +9 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/prefab/x86/prefab/lib/i686-linux-android/cmake/fbjni/fbjniConfig.cmake +9 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/prefab/x86/prefab/lib/i686-linux-android/cmake/fbjni/fbjniConfigVersion.cmake +9 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/prefab/x86_64/prefab/lib/x86_64-linux-android/cmake/ReactAndroid/ReactAndroidConfig.cmake +261 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/prefab/x86_64/prefab/lib/x86_64-linux-android/cmake/ReactAndroid/ReactAndroidConfigVersion.cmake +9 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/prefab/x86_64/prefab/lib/x86_64-linux-android/cmake/fbjni/fbjniConfig.cmake +9 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/prefab/x86_64/prefab/lib/x86_64-linux-android/cmake/fbjni/fbjniConfigVersion.cmake +9 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/.cmake/api/v1/query/client-agp/cache-v2 +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/.cmake/api/v1/query/client-agp/cmakeFiles-v1 +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/.cmake/api/v1/query/client-agp/codemodel-v2 +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/.cmake/api/v1/reply/cache-v2-6c4a25b4c6713ffdc5da.json +1303 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/.cmake/api/v1/reply/cmakeFiles-v1-f4200ba0f2ce507c91da.json +203 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/.cmake/api/v1/reply/codemodel-v2-9ea6ff99336eeb9a9ce9.json +60 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/.cmake/api/v1/reply/directory-.-Debug-f5ebdc15457944623624.json +14 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/.cmake/api/v1/reply/index-2023-12-06T19-58-49-0301.json +92 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/.cmake/api/v1/reply/target-cpp-Debug-a88e6d0219517e1d531b.json +314 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/.ninja_deps +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/.ninja_log +21 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeCache.txt +393 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake +79 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/3.22.1-g37088a8/CMakeCXXCompiler.cmake +90 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/3.22.1-g37088a8/CMakeDetermineCompilerABI_C.bin +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/3.22.1-g37088a8/CMakeDetermineCompilerABI_CXX.bin +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/3.22.1-g37088a8/CMakeSystem.cmake +113 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.c +803 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/3.22.1-g37088a8/CompilerIdCXX/CMakeCXXCompilerId.cpp +791 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/3.22.1-g37088a8/CompilerIdCXX/CMakeCXXCompilerId.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/CMakeOutput.log +322 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/TargetDirectories.txt +3 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cmake.check_cache +1 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Attachment.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Authentication.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Collection.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/DQL.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Document.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Identity.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Lifecycle.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/LiveQuery.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Logger.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Misc.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Presence.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/RetainableState.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/SmallPeerInfo.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Transports.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/TypedArray.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Utils.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/main.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/dittoffi/ifaddrs.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/cpp.dir/cpp-adapter.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/CMakeFiles/rules.ninja +64 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/additional_project_files.txt +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/android_gradle_build.json +42 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/android_gradle_build_mini.json +31 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/build.ninja +297 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/build_file_index.txt +3 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/cmake_install.cmake +54 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/compile_commands.json +97 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/compile_commands.json.bin +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/metadata_generation_command.txt +21 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/prefab_config.json +8 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86/symbol_folder_index.txt +1 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/.cmake/api/v1/query/client-agp/cache-v2 +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/.cmake/api/v1/query/client-agp/cmakeFiles-v1 +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/.cmake/api/v1/query/client-agp/codemodel-v2 +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/.cmake/api/v1/reply/cache-v2-dae9c0e6f8d6c826f86e.json +1303 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/.cmake/api/v1/reply/cmakeFiles-v1-77b66408bf04fa403cf4.json +203 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/.cmake/api/v1/reply/codemodel-v2-00d5bd5dc4a882f89004.json +60 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/.cmake/api/v1/reply/directory-.-Debug-f5ebdc15457944623624.json +14 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/.cmake/api/v1/reply/index-2023-12-06T19-58-49-0701.json +92 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/.cmake/api/v1/reply/target-cpp-Debug-ed2a7b63dedc1886a528.json +314 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/.ninja_deps +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/.ninja_log +21 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeCache.txt +393 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeCCompiler.cmake +79 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeCXXCompiler.cmake +90 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeDetermineCompilerABI_C.bin +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeDetermineCompilerABI_CXX.bin +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/3.22.1-g37088a8/CMakeSystem.cmake +113 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.c +803 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/3.22.1-g37088a8/CompilerIdC/CMakeCCompilerId.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/3.22.1-g37088a8/CompilerIdCXX/CMakeCXXCompilerId.cpp +791 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/3.22.1-g37088a8/CompilerIdCXX/CMakeCXXCompilerId.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/CMakeOutput.log +322 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/TargetDirectories.txt +3 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cmake.check_cache +1 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Attachment.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Authentication.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Collection.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/DQL.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Document.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Identity.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Lifecycle.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/LiveQuery.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Logger.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Misc.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Presence.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/RetainableState.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/SmallPeerInfo.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Transports.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/TypedArray.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/Utils.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/cpp/src/main.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/Users/teodorc/Projects/IntegrationTest/node_modules/@dittolive/ditto/react-native/dittoffi/ifaddrs.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/cpp.dir/cpp-adapter.cpp.o +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/CMakeFiles/rules.ninja +64 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/additional_project_files.txt +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/android_gradle_build.json +42 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/android_gradle_build_mini.json +31 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/build.ninja +297 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/build_file_index.txt +3 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/cmake_install.cmake +54 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/compile_commands.json +97 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/compile_commands.json.bin +0 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/configure_fingerprint.bin +8755 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/metadata_generation_command.txt +21 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/prefab_config.json +8 -0
- package/react-native/android/.cxx/Debug/6p5m3p3q/x86_64/symbol_folder_index.txt +1 -0
- package/react-native/android/.cxx/tools/debug/arm64-v8a/compile_commands.json +97 -0
- package/react-native/android/.cxx/tools/debug/armeabi-v7a/compile_commands.json +97 -0
- package/react-native/android/.cxx/tools/debug/x86/compile_commands.json +97 -0
- package/react-native/android/.cxx/tools/debug/x86_64/compile_commands.json +97 -0
- package/react-native/android/.gradle/8.5/checksums/checksums.lock +0 -0
- package/react-native/android/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/react-native/android/.gradle/8.5/dependencies-accessors/gc.properties +0 -0
- package/react-native/android/.gradle/8.5/fileChanges/last-build.bin +0 -0
- package/react-native/android/.gradle/8.5/fileHashes/fileHashes.lock +0 -0
- package/react-native/android/.gradle/8.5/gc.properties +0 -0
- package/react-native/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/react-native/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/react-native/android/.gradle/vcs-1/gc.properties +0 -0
- package/react-native/android/CMakeLists.txt +37 -0
- package/react-native/android/build.gradle +203 -0
- package/react-native/android/cpp-adapter.cpp +254 -0
- package/react-native/android/gradle.properties +5 -0
- package/react-native/android/src/main/AndroidManifest.xml +4 -0
- package/react-native/android/src/main/java/com/dittolive/rnsdk/DittoRNSDKModule.java +85 -0
- package/react-native/android/src/main/java/com/dittolive/rnsdk/DittoRNSDKPackage.java +28 -0
- package/react-native/boost/boost/assert.hpp +85 -0
- package/react-native/boost/boost/config/abi/borland_prefix.hpp +27 -0
- package/react-native/boost/boost/config/abi/borland_suffix.hpp +12 -0
- package/react-native/boost/boost/config/abi/msvc_prefix.hpp +22 -0
- package/react-native/boost/boost/config/abi/msvc_suffix.hpp +8 -0
- package/react-native/boost/boost/config/abi_prefix.hpp +25 -0
- package/react-native/boost/boost/config/abi_suffix.hpp +25 -0
- package/react-native/boost/boost/config/assert_cxx03.hpp +211 -0
- package/react-native/boost/boost/config/assert_cxx11.hpp +209 -0
- package/react-native/boost/boost/config/assert_cxx14.hpp +47 -0
- package/react-native/boost/boost/config/assert_cxx17.hpp +62 -0
- package/react-native/boost/boost/config/assert_cxx20.hpp +59 -0
- package/react-native/boost/boost/config/assert_cxx98.hpp +23 -0
- package/react-native/boost/boost/config/auto_link.hpp +525 -0
- package/react-native/boost/boost/config/compiler/borland.hpp +339 -0
- package/react-native/boost/boost/config/compiler/clang.hpp +366 -0
- package/react-native/boost/boost/config/compiler/clang_version.hpp +83 -0
- package/react-native/boost/boost/config/compiler/codegear.hpp +385 -0
- package/react-native/boost/boost/config/compiler/comeau.hpp +59 -0
- package/react-native/boost/boost/config/compiler/common_edg.hpp +183 -0
- package/react-native/boost/boost/config/compiler/compaq_cxx.hpp +19 -0
- package/react-native/boost/boost/config/compiler/cray.hpp +446 -0
- package/react-native/boost/boost/config/compiler/diab.hpp +26 -0
- package/react-native/boost/boost/config/compiler/digitalmars.hpp +143 -0
- package/react-native/boost/boost/config/compiler/gcc.hpp +383 -0
- package/react-native/boost/boost/config/compiler/gcc_xml.hpp +114 -0
- package/react-native/boost/boost/config/compiler/greenhills.hpp +28 -0
- package/react-native/boost/boost/config/compiler/hp_acc.hpp +149 -0
- package/react-native/boost/boost/config/compiler/intel.hpp +577 -0
- package/react-native/boost/boost/config/compiler/kai.hpp +33 -0
- package/react-native/boost/boost/config/compiler/metrowerks.hpp +198 -0
- package/react-native/boost/boost/config/compiler/mpw.hpp +140 -0
- package/react-native/boost/boost/config/compiler/nvcc.hpp +61 -0
- package/react-native/boost/boost/config/compiler/pathscale.hpp +138 -0
- package/react-native/boost/boost/config/compiler/pgi.hpp +23 -0
- package/react-native/boost/boost/config/compiler/sgi_mipspro.hpp +29 -0
- package/react-native/boost/boost/config/compiler/sunpro_cc.hpp +222 -0
- package/react-native/boost/boost/config/compiler/vacpp.hpp +186 -0
- package/react-native/boost/boost/config/compiler/visualc.hpp +391 -0
- package/react-native/boost/boost/config/compiler/xlcpp.hpp +299 -0
- package/react-native/boost/boost/config/compiler/xlcpp_zos.hpp +173 -0
- package/react-native/boost/boost/config/detail/cxx_composite.hpp +203 -0
- package/react-native/boost/boost/config/detail/posix_features.hpp +95 -0
- package/react-native/boost/boost/config/detail/select_compiler_config.hpp +157 -0
- package/react-native/boost/boost/config/detail/select_platform_config.hpp +147 -0
- package/react-native/boost/boost/config/detail/select_stdlib_config.hpp +121 -0
- package/react-native/boost/boost/config/detail/suffix.hpp +1294 -0
- package/react-native/boost/boost/config/header_deprecated.hpp +26 -0
- package/react-native/boost/boost/config/helper_macros.hpp +37 -0
- package/react-native/boost/boost/config/no_tr1/cmath.hpp +28 -0
- package/react-native/boost/boost/config/no_tr1/complex.hpp +28 -0
- package/react-native/boost/boost/config/no_tr1/functional.hpp +28 -0
- package/react-native/boost/boost/config/no_tr1/memory.hpp +28 -0
- package/react-native/boost/boost/config/no_tr1/utility.hpp +28 -0
- package/react-native/boost/boost/config/platform/aix.hpp +33 -0
- package/react-native/boost/boost/config/platform/amigaos.hpp +15 -0
- package/react-native/boost/boost/config/platform/beos.hpp +26 -0
- package/react-native/boost/boost/config/platform/bsd.hpp +83 -0
- package/react-native/boost/boost/config/platform/cloudabi.hpp +18 -0
- package/react-native/boost/boost/config/platform/cray.hpp +18 -0
- package/react-native/boost/boost/config/platform/cygwin.hpp +71 -0
- package/react-native/boost/boost/config/platform/haiku.hpp +31 -0
- package/react-native/boost/boost/config/platform/hpux.hpp +87 -0
- package/react-native/boost/boost/config/platform/irix.hpp +31 -0
- package/react-native/boost/boost/config/platform/linux.hpp +106 -0
- package/react-native/boost/boost/config/platform/macos.hpp +87 -0
- package/react-native/boost/boost/config/platform/qnxnto.hpp +31 -0
- package/react-native/boost/boost/config/platform/solaris.hpp +31 -0
- package/react-native/boost/boost/config/platform/symbian.hpp +97 -0
- package/react-native/boost/boost/config/platform/vms.hpp +25 -0
- package/react-native/boost/boost/config/platform/vxworks.hpp +422 -0
- package/react-native/boost/boost/config/platform/wasm.hpp +23 -0
- package/react-native/boost/boost/config/platform/win32.hpp +90 -0
- package/react-native/boost/boost/config/platform/zos.hpp +32 -0
- package/react-native/boost/boost/config/pragma_message.hpp +31 -0
- package/react-native/boost/boost/config/requires_threads.hpp +92 -0
- package/react-native/boost/boost/config/stdlib/dinkumware.hpp +324 -0
- package/react-native/boost/boost/config/stdlib/libcomo.hpp +93 -0
- package/react-native/boost/boost/config/stdlib/libcpp.hpp +180 -0
- package/react-native/boost/boost/config/stdlib/libstdcpp3.hpp +482 -0
- package/react-native/boost/boost/config/stdlib/modena.hpp +79 -0
- package/react-native/boost/boost/config/stdlib/msl.hpp +98 -0
- package/react-native/boost/boost/config/stdlib/roguewave.hpp +208 -0
- package/react-native/boost/boost/config/stdlib/sgi.hpp +168 -0
- package/react-native/boost/boost/config/stdlib/stlport.hpp +258 -0
- package/react-native/boost/boost/config/stdlib/vacpp.hpp +74 -0
- package/react-native/boost/boost/config/stdlib/xlcpp_zos.hpp +61 -0
- package/react-native/boost/boost/config/user.hpp +133 -0
- package/react-native/boost/boost/config/warning_disable.hpp +47 -0
- package/react-native/boost/boost/config/workaround.hpp +305 -0
- package/react-native/boost/boost/config.hpp +67 -0
- package/react-native/boost/boost/cstdint.hpp +556 -0
- package/react-native/boost/boost/intrusive_ptr.hpp +18 -0
- package/react-native/boost/boost/smart_ptr/detail/atomic_count.hpp +103 -0
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_gcc.hpp +79 -0
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp +63 -0
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp +88 -0
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_nt.hpp +66 -0
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_pt.hpp +104 -0
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_spin.hpp +69 -0
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_std_atomic.hpp +67 -0
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_sync.hpp +72 -0
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_win32.hpp +70 -0
- package/react-native/boost/boost/smart_ptr/detail/local_counted_base.hpp +148 -0
- package/react-native/boost/boost/smart_ptr/detail/local_sp_deleter.hpp +91 -0
- package/react-native/boost/boost/smart_ptr/detail/operator_bool.hpp +64 -0
- package/react-native/boost/boost/smart_ptr/detail/requires_cxx11.hpp +23 -0
- package/react-native/boost/boost/smart_ptr/detail/shared_count.hpp +707 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_convertible.hpp +92 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base.hpp +92 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp +163 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_aix.hpp +152 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp +185 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp +148 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp +170 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp +200 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp +194 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp +179 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp +186 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_nt.hpp +119 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_pt.hpp +147 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp +174 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_spin.hpp +141 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp +147 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_sync.hpp +165 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp +163 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_w32.hpp +140 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_impl.hpp +309 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_disable_deprecated.hpp +40 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_forward.hpp +52 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp +27 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp +69 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_interlocked.hpp +173 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_noexcept.hpp +48 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_nullptr_t.hpp +45 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_obsolete.hpp +32 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_thread_pause.hpp +51 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_thread_sleep.hpp +104 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_thread_yield.hpp +100 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_typeinfo_.hpp +58 -0
- package/react-native/boost/boost/smart_ptr/detail/sp_win32_sleep.hpp +49 -0
- package/react-native/boost/boost/smart_ptr/intrusive_ptr.hpp +409 -0
- package/react-native/boost/boost/smart_ptr/intrusive_ref_counter.hpp +188 -0
- package/react-native/cpp/include/Attachment.h +16 -0
- package/react-native/cpp/include/Authentication.h +23 -0
- package/react-native/cpp/include/Collection.h +13 -0
- package/react-native/cpp/include/DQL.h +21 -0
- package/react-native/cpp/include/Document.h +17 -0
- package/react-native/cpp/include/Identity.h +17 -0
- package/react-native/cpp/include/Lifecycle.h +16 -0
- package/react-native/cpp/include/LiveQuery.h +17 -0
- package/react-native/cpp/include/Logger.h +22 -0
- package/react-native/cpp/include/Misc.h +26 -0
- package/react-native/cpp/include/Presence.h +14 -0
- package/react-native/cpp/include/RetainableState.h +24 -0
- package/react-native/cpp/include/SmallPeerInfo.h +17 -0
- package/react-native/cpp/include/Transports.h +25 -0
- package/react-native/cpp/include/TypedArray.hpp +167 -0
- package/react-native/cpp/include/Utils.h +61 -0
- package/react-native/cpp/include/main.h +10 -0
- package/react-native/cpp/src/Attachment.cpp +86 -0
- package/react-native/cpp/src/Authentication.cpp +224 -0
- package/react-native/cpp/src/Collection.cpp +54 -0
- package/react-native/cpp/src/DQL.cpp +254 -0
- package/react-native/cpp/src/Document.cpp +146 -0
- package/react-native/cpp/src/Identity.cpp +123 -0
- package/react-native/cpp/src/Lifecycle.cpp +75 -0
- package/react-native/cpp/src/LiveQuery.cpp +64 -0
- package/react-native/cpp/src/Logger.cpp +200 -0
- package/react-native/cpp/src/Misc.cpp +271 -0
- package/react-native/cpp/src/Presence.cpp +77 -0
- package/react-native/cpp/src/RetainableState.cpp +15 -0
- package/react-native/cpp/src/SmallPeerInfo.cpp +108 -0
- package/react-native/cpp/src/Transports.cpp +270 -0
- package/react-native/cpp/src/TypedArray.cpp +303 -0
- package/react-native/cpp/src/Utils.cpp +138 -0
- package/react-native/cpp/src/main.cpp +149 -0
- package/react-native/dittoffi/dittoffi.h +4698 -0
- package/react-native/dittoffi/ifaddrs.cpp +385 -0
- package/react-native/dittoffi/ifaddrs.h +206 -0
- package/react-native/ios/DittoRNSDK.h +7 -0
- package/react-native/ios/DittoRNSDK.mm +107 -0
- package/react-native/ios/YeetJSIUtils.h +60 -0
- package/react-native/ios/YeetJSIUtils.mm +196 -0
- package/react-native/lib/commonjs/ditto.rn.js +93 -0
- package/react-native/lib/commonjs/ditto.rn.js.map +1 -0
- package/react-native/lib/commonjs/index.js +14 -0
- package/react-native/lib/commonjs/index.js.map +1 -0
- package/react-native/lib/module/ditto.rn.js +83 -0
- package/react-native/lib/module/ditto.rn.js.map +1 -0
- package/react-native/lib/module/index.js +13 -0
- package/react-native/lib/module/index.js.map +1 -0
- package/react-native/lib/typescript/ditto.rn.d.ts +15 -0
- package/react-native/lib/typescript/ditto.rn.d.ts.map +1 -0
- package/react-native/lib/typescript/index.d.ts +1 -0
- package/react-native/lib/typescript/index.d.ts.map +1 -0
- package/react-native/scripts/ruby/include_local_boost.rb +78 -0
- package/react-native/src/ditto.rn.ts +91 -0
- package/react-native/src/environment/environment.fallback.ts +4 -0
- package/react-native/src/index.ts +26 -0
- package/react-native/src/sources/@cbor-redux.ts +2 -0
- package/react-native/src/sources/@ditto.core.ts +1 -0
- package/react-native/src/sources/@environment.ts +2 -0
- package/react-native/src/sources/attachment-fetch-event.ts +54 -0
- package/react-native/src/sources/attachment-fetcher-manager.ts +129 -0
- package/react-native/src/sources/attachment-fetcher.ts +124 -0
- package/react-native/src/sources/attachment-token.ts +48 -0
- package/react-native/src/sources/attachment.ts +59 -0
- package/react-native/src/sources/augment.ts +89 -0
- package/react-native/src/sources/authenticator.ts +314 -0
- package/react-native/src/sources/base-pending-cursor-operation.ts +237 -0
- package/react-native/src/sources/base-pending-id-specific-operation.ts +109 -0
- package/react-native/src/sources/bridge.ts +549 -0
- package/react-native/src/sources/build-time-constants.ts +4 -0
- package/react-native/src/sources/cbor.ts +35 -0
- package/react-native/src/sources/collection-interface.ts +67 -0
- package/react-native/src/sources/collection.ts +212 -0
- package/react-native/src/sources/collections-event.ts +99 -0
- package/react-native/src/sources/counter.ts +77 -0
- package/react-native/src/sources/ditto.ts +945 -0
- package/react-native/src/sources/document-id.ts +159 -0
- package/react-native/src/sources/document-path.ts +303 -0
- package/react-native/src/sources/document.ts +192 -0
- package/react-native/src/sources/epilogue.ts +24 -0
- package/react-native/src/sources/error-codes.ts +52 -0
- package/react-native/src/sources/error.ts +203 -0
- package/react-native/src/sources/essentials.ts +53 -0
- package/react-native/src/sources/ffi-error.ts +117 -0
- package/react-native/src/sources/ffi.ts +1972 -0
- package/react-native/src/sources/identity.ts +163 -0
- package/react-native/src/sources/init.ts +70 -0
- package/react-native/src/sources/internal.ts +113 -0
- package/react-native/src/sources/keep-alive.ts +69 -0
- package/react-native/src/sources/key-path.ts +195 -0
- package/react-native/src/sources/live-query-event.ts +208 -0
- package/react-native/src/sources/live-query-manager.ts +101 -0
- package/react-native/src/sources/live-query.ts +164 -0
- package/react-native/src/sources/logger.ts +196 -0
- package/react-native/src/sources/observer-manager.ts +175 -0
- package/react-native/src/sources/observer.ts +77 -0
- package/react-native/src/sources/pending-collections-operation.ts +232 -0
- package/react-native/src/sources/pending-cursor-operation.ts +218 -0
- package/react-native/src/sources/pending-id-specific-operation.ts +216 -0
- package/react-native/src/sources/presence-manager.ts +160 -0
- package/react-native/src/sources/presence.ts +238 -0
- package/react-native/src/sources/query-result-item.ts +116 -0
- package/react-native/src/sources/query-result.ts +55 -0
- package/react-native/src/sources/register.ts +92 -0
- package/react-native/src/sources/small-peer-info.ts +176 -0
- package/react-native/src/sources/static-tcp-client.ts +6 -0
- package/react-native/src/sources/store-observer.ts +176 -0
- package/react-native/src/sources/store.ts +365 -0
- package/react-native/src/sources/subscription-manager.ts +98 -0
- package/react-native/src/sources/subscription.ts +88 -0
- package/react-native/src/sources/sync-subscription.ts +90 -0
- package/react-native/src/sources/sync.ts +495 -0
- package/react-native/src/sources/test-helpers.ts +24 -0
- package/react-native/src/sources/transport-conditions-manager.ts +104 -0
- package/react-native/src/sources/transport-config.ts +428 -0
- package/react-native/src/sources/update-result.ts +66 -0
- package/react-native/src/sources/update-results-map.ts +57 -0
- package/react-native/src/sources/websocket-client.ts +6 -0
- package/react-native/src/sources/write-transaction-collection.ts +122 -0
- package/react-native/src/sources/write-transaction-pending-cursor-operation.ts +101 -0
- package/react-native/src/sources/write-transaction-pending-id-specific-operation.ts +72 -0
- package/react-native/src/sources/write-transaction.ts +119 -0
- package/react-native.config.js +9 -0
- package/types/ditto.d.ts +1228 -798
- package/web/ditto.es6.js +1 -1
- package/web/ditto.umd.js +1 -1
- package/web/ditto.wasm +0 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright © 2021 DittoLive Incorporated. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as FFI from './ffi'
|
|
6
|
+
import { CBOR } from './cbor'
|
|
7
|
+
|
|
8
|
+
/** Represents a unique identifier for a {@link Document}. */
|
|
9
|
+
export type DocumentIDValue = any // REFACTOR: get rid of any.
|
|
10
|
+
|
|
11
|
+
/** Represents a unique identifier for a {@link Document}. */
|
|
12
|
+
export class DocumentID {
|
|
13
|
+
/**
|
|
14
|
+
* Returns the value of the receiver, lazily decoded from its CBOR
|
|
15
|
+
* representation if needed.
|
|
16
|
+
*/
|
|
17
|
+
get value(): any {
|
|
18
|
+
let value = this['@ditto.value']
|
|
19
|
+
if (typeof value === 'undefined') {
|
|
20
|
+
value = CBOR.decode(this['@ditto.cbor'])
|
|
21
|
+
this['@ditto.value'] = value
|
|
22
|
+
}
|
|
23
|
+
return value
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Returns `false` if validation has been skipped at construction time,
|
|
28
|
+
* otherwise returns `true`. This is mostly for internal use only, you
|
|
29
|
+
* shouldn't need this in client code.
|
|
30
|
+
*/
|
|
31
|
+
readonly isValidated: boolean
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Creates a new `DocumentID`.
|
|
35
|
+
*
|
|
36
|
+
* A document ID can be created from any of the following:
|
|
37
|
+
*
|
|
38
|
+
* - `string`
|
|
39
|
+
* - `number` (integer)
|
|
40
|
+
* - `boolean`
|
|
41
|
+
* - `null`
|
|
42
|
+
* - raw data in the form of a JS [Typed Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays)
|
|
43
|
+
* - `Array` (containing any of the items in this list)
|
|
44
|
+
* - Map (a raw JS `object`, where the keys must be strings and the values
|
|
45
|
+
* can be made up of any of the items in this list)
|
|
46
|
+
*
|
|
47
|
+
* Note that you cannot use floats or other custom types to create a document
|
|
48
|
+
* ID.
|
|
49
|
+
*
|
|
50
|
+
* Document IDs are also limited in size, based on their serialized
|
|
51
|
+
* representation, to 256 bytes. You will receive an error if you try to
|
|
52
|
+
* create a document ID that exceeds the size limit.
|
|
53
|
+
*
|
|
54
|
+
* @param value The value that represents the document identifier.
|
|
55
|
+
* @param skipCBOREncoding If `true, skips CBOR encoding and assumes
|
|
56
|
+
* the passed in `value` is already CBOR encoded. You shouldn't need to ever
|
|
57
|
+
* pass this parameter, it's only used internally for certain edge cases.
|
|
58
|
+
* @param skipValidation If `true, skips validation of the passed in value or
|
|
59
|
+
* CBOR. You shouldn't need to ever pass this parameter, it's only used
|
|
60
|
+
* internally for certain edge cases.
|
|
61
|
+
*/
|
|
62
|
+
constructor(value: any, skipCBOREncoding: boolean = false, skipValidation: boolean = false) {
|
|
63
|
+
const cbor = skipCBOREncoding ? value : CBOR.encode(value)
|
|
64
|
+
const validatedCBOR = skipValidation ? cbor : validateDocumentIDCBOR(cbor)
|
|
65
|
+
|
|
66
|
+
if (!validatedCBOR) {
|
|
67
|
+
throw new Error(`Can't create DocumentID, passed in value is not valid: ${value}`)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
this.isValidated = !skipValidation
|
|
71
|
+
this['@ditto.cbor'] = validatedCBOR
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Returns `true` if passed in `documentID` is equal to the receiver,
|
|
76
|
+
* otherwise returns `false`.
|
|
77
|
+
*/
|
|
78
|
+
equals(documentID: DocumentID): boolean {
|
|
79
|
+
const left = this['@ditto.cbor']
|
|
80
|
+
const right = documentID['@ditto.cbor']
|
|
81
|
+
|
|
82
|
+
if (left === right) {
|
|
83
|
+
return true
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (!(left instanceof Uint8Array)) {
|
|
87
|
+
return false
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (!(right instanceof Uint8Array)) {
|
|
91
|
+
return false
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (left.length !== right.length) {
|
|
95
|
+
return false
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
for (let i = 0; i < left.length; i += 1) {
|
|
99
|
+
if (left[i] !== right[i]) return false
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return true
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Returns a string representation of the receiver.
|
|
107
|
+
*
|
|
108
|
+
* If you need a string representation to be used directly in a query,
|
|
109
|
+
* please use `toQueryCompatibleString()` instead.
|
|
110
|
+
*/
|
|
111
|
+
toString(): string {
|
|
112
|
+
return FFI.documentIDQueryCompatible(this['@ditto.cbor'], 'WithoutQuotes')
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Returns a byte representation of the document ID value as base64 string.
|
|
117
|
+
*/
|
|
118
|
+
toBase64String(): string {
|
|
119
|
+
const bytes = this['@ditto.cbor']
|
|
120
|
+
return btoa(String.fromCharCode.apply(null, bytes))
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Returns a query compatible string representation of the receiver.
|
|
125
|
+
*
|
|
126
|
+
* The returned string can be used directly in queries that you use with
|
|
127
|
+
* other Ditto functions. For example you could create a query that was like
|
|
128
|
+
* this:
|
|
129
|
+
*
|
|
130
|
+
* ``` TypeScript
|
|
131
|
+
* collection.find(`_id == ${documentID.toQueryCompatibleString()}`)
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
toQueryCompatibleString(): string {
|
|
135
|
+
return FFI.documentIDQueryCompatible(this['@ditto.cbor'], 'WithQuotes')
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/** @internal */
|
|
139
|
+
toCBOR(): Uint8Array {
|
|
140
|
+
return this['@ditto.cbor']
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// -----------------------------------------------------------------------------
|
|
145
|
+
|
|
146
|
+
/** @internal */
|
|
147
|
+
export function validateDocumentIDValue(id: DocumentIDValue): DocumentIDValue {
|
|
148
|
+
if (typeof id === 'undefined') {
|
|
149
|
+
throw new Error(`Invalid document ID: ${id}`)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return id
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** @internal */
|
|
156
|
+
export function validateDocumentIDCBOR(idCBOR: Uint8Array): Uint8Array {
|
|
157
|
+
const validatedIDCBOROrNull = FFI.validateDocumentID(idCBOR)
|
|
158
|
+
return validatedIDCBOROrNull ?? idCBOR
|
|
159
|
+
}
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright © 2021 DittoLive Incorporated. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as FFI from './ffi'
|
|
6
|
+
import { CBOR } from './cbor'
|
|
7
|
+
import { Bridge } from './bridge'
|
|
8
|
+
import { Counter, MutableCounter } from './counter'
|
|
9
|
+
import { Register, MutableRegister } from './register'
|
|
10
|
+
import { AttachmentToken } from './attachment-token'
|
|
11
|
+
import { UpdateResult } from './update-result'
|
|
12
|
+
import { desugarJSObject, augmentJSONValue } from './augment'
|
|
13
|
+
import { validateNumber } from './internal'
|
|
14
|
+
import { KeyPath } from './key-path'
|
|
15
|
+
import type { Document, MutableDocument } from './document'
|
|
16
|
+
|
|
17
|
+
// -----------------------------------------------------------------------------
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Represents a portion of the document at a specific key-path.
|
|
21
|
+
*
|
|
22
|
+
* Provides an interface to specify a path to a key in a document that you can
|
|
23
|
+
* then call a function on to get the value at the specified key as a specific
|
|
24
|
+
* type. You don't create a `DocumentPath` directly but obtain one via the
|
|
25
|
+
* {@link Document.path | path} property or the {@link Document.at | at()}
|
|
26
|
+
* method of {@link Document}.
|
|
27
|
+
*/
|
|
28
|
+
export class DocumentPath {
|
|
29
|
+
/** The document this path belongs to. */
|
|
30
|
+
readonly document: Document
|
|
31
|
+
|
|
32
|
+
/** The full document path so far. */
|
|
33
|
+
readonly path: string
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Returns a new document path instance with the passed in key-path or
|
|
37
|
+
* index appended.
|
|
38
|
+
*
|
|
39
|
+
* A key-path can be a single property name or multiple property names
|
|
40
|
+
* separated by a dot. Indexes can also be specified as part of the key
|
|
41
|
+
* path using the square bracket syntax. The empty string returns a document
|
|
42
|
+
* path representing the same portion of the document as the receiver. If a
|
|
43
|
+
* key-path starts with a property name and is prefixed by a dot, the dot is
|
|
44
|
+
* ignored.
|
|
45
|
+
*
|
|
46
|
+
* Examples:
|
|
47
|
+
*
|
|
48
|
+
* - `documentPath.at('mileage')`
|
|
49
|
+
* - `documentPath.at('driver.name')`
|
|
50
|
+
* - `documentPath.at('passengers[2]')`
|
|
51
|
+
* - `documentPath.at('passengers[2].belongings[1].kind')`
|
|
52
|
+
* - `documentPath.at('.mileage')`
|
|
53
|
+
*/
|
|
54
|
+
at(keyPathOrIndex: string | number): DocumentPath {
|
|
55
|
+
if (typeof keyPathOrIndex === 'string') {
|
|
56
|
+
const keyPath: string = keyPathOrIndex
|
|
57
|
+
const validatedKeyPath = KeyPath.validate(keyPath)
|
|
58
|
+
const absoluteKeyPath = KeyPath.withoutLeadingDot(`${this.path}${validatedKeyPath}`)
|
|
59
|
+
return new DocumentPath(this.document, absoluteKeyPath, false)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (typeof keyPathOrIndex === 'number') {
|
|
63
|
+
const index: number = keyPathOrIndex
|
|
64
|
+
const validatedIndex = validateNumber(index, { integer: true, min: 0, errorMessagePrefix: 'DocumentPath.at() validation failed index:' })
|
|
65
|
+
return new DocumentPath(this.document, `${this.path}[${validatedIndex.toString()}]`, false)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
throw new Error(`Can't return document path at key-path or index, string or number expected but got ${typeof keyPathOrIndex}: ${keyPathOrIndex}`)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Traverses the document with the key-path represented by the receiver and
|
|
73
|
+
* returns the corresponding object or value.
|
|
74
|
+
*/
|
|
75
|
+
get value(): any | undefined {
|
|
76
|
+
return this.underlyingValueForPathType('Any')
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Returns the value at the previously specified key in the document as a
|
|
81
|
+
* {@link Counter} if possible, otherwise returns `null`.
|
|
82
|
+
*/
|
|
83
|
+
get counter(): Counter | null {
|
|
84
|
+
const underlyingValue = this.underlyingValueForPathType('Counter')
|
|
85
|
+
return typeof underlyingValue !== 'undefined' ? Counter['@ditto.create'](null, this.path, underlyingValue) : null
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Returns the value at the previously specified key in the document as a
|
|
90
|
+
* {@link Register} if possible, otherwise returns `null`.
|
|
91
|
+
*/
|
|
92
|
+
get register(): Register | null {
|
|
93
|
+
const underlyingValue = this.underlyingValueForPathType('Register')
|
|
94
|
+
return typeof underlyingValue !== 'undefined' ? Register['@ditto.create'](null, this.path, underlyingValue) : null
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Returns the value at the previously specified key in the document as an
|
|
99
|
+
* {@link AttachmentToken} if possible, otherwise returns `null`.
|
|
100
|
+
*/
|
|
101
|
+
get attachmentToken(): AttachmentToken | null {
|
|
102
|
+
const underlyingValue = this.underlyingValueForPathType('Attachment')
|
|
103
|
+
return typeof underlyingValue !== 'undefined' ? new AttachmentToken(underlyingValue) : null
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** @internal */
|
|
107
|
+
constructor(document: Document, path: string, validate: boolean) {
|
|
108
|
+
this.document = document
|
|
109
|
+
this.path = validate ? KeyPath.validate(path, { isInitial: true }) : path
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** @internal */
|
|
113
|
+
underlyingValueForPathType(pathType: FFI.PathAccessorType): any | undefined {
|
|
114
|
+
const path = this.path
|
|
115
|
+
const document = this.document
|
|
116
|
+
const documentHandle = Bridge.document.handleFor(document)
|
|
117
|
+
const cborPathResult = FFI.documentGetCBORWithPathType(documentHandle.deref(), path, pathType)
|
|
118
|
+
return cborPathResult.cbor !== null ? CBOR.decode(cborPathResult.cbor) : undefined
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// -----------------------------------------------------------------------------
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Mutable version of {@link DocumentPath} allowing you to mutate a document at
|
|
126
|
+
* a specific key-path. You don't create a `MutableDocumentPath` directly but
|
|
127
|
+
* obtain one via the {@link MutableDocument.path | path} property or the
|
|
128
|
+
* {@link MutableDocument.at | at()} method of {@link MutableDocument}.
|
|
129
|
+
*/
|
|
130
|
+
export class MutableDocumentPath {
|
|
131
|
+
/** The (mutable) document this path belongs to. */
|
|
132
|
+
readonly mutableDocument: MutableDocument
|
|
133
|
+
|
|
134
|
+
/** The full document path so far. */
|
|
135
|
+
readonly path: string
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Returns a new mutable document path instance with the passed in key-path or
|
|
139
|
+
* index appended.
|
|
140
|
+
*
|
|
141
|
+
* A key-path can be a single property name or multiple property names
|
|
142
|
+
* separated by a dot. Indexes can also be specified as part of the key
|
|
143
|
+
* path using square brackets syntax. The empty string returns a document path
|
|
144
|
+
* representing the same portion of the document as the receiver. If a key
|
|
145
|
+
* path starts with a property name and is prefixed by a dot, the dot is
|
|
146
|
+
* ignored.
|
|
147
|
+
*
|
|
148
|
+
* Examples:
|
|
149
|
+
*
|
|
150
|
+
* - `mutableDocumentPath.at('mileage')`
|
|
151
|
+
* - `mutableDocumentPath.at('driver.name')`
|
|
152
|
+
* - `mutableDocumentPath.at('passengers[2]')`
|
|
153
|
+
* - `mutableDocumentPath.at('passengers[2].belongings[1].kind')`
|
|
154
|
+
* - `mutableDocumentPath.at('.mileage')`
|
|
155
|
+
*/
|
|
156
|
+
at(keyPathOrIndex: string | number): MutableDocumentPath {
|
|
157
|
+
if (typeof keyPathOrIndex === 'string') {
|
|
158
|
+
const keyPath: string = keyPathOrIndex
|
|
159
|
+
const validatedKeyPath = KeyPath.validate(keyPath)
|
|
160
|
+
const absoluteKeyPath = KeyPath.withoutLeadingDot(`${this.path}${validatedKeyPath}`)
|
|
161
|
+
return new MutableDocumentPath(this.mutableDocument, absoluteKeyPath, false)
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (typeof keyPathOrIndex === 'number') {
|
|
165
|
+
const index: number = keyPathOrIndex
|
|
166
|
+
const validatedIndex = validateNumber(index, { integer: true, min: 0, errorMessagePrefix: 'MutableDocumentPath.at() validation failed index:' })
|
|
167
|
+
return new MutableDocumentPath(this.mutableDocument, `${this.path}[${validatedIndex.toString()}]`, false)
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
throw new Error(`Can't return mutable document path at key-path or index, string or number expected but got ${typeof keyPathOrIndex}: ${keyPathOrIndex}`)
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Traverses the document with the key-path represented by the receiver and
|
|
175
|
+
* returns the corresponding object or value.
|
|
176
|
+
*/
|
|
177
|
+
get value(): any | undefined {
|
|
178
|
+
return this.underlyingValueForPathType('Any')
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Returns the value at the previously specified key in the document as a
|
|
183
|
+
* {@link MutableCounter} if possible, otherwise returns `null`.
|
|
184
|
+
*/
|
|
185
|
+
get counter(): MutableCounter | null {
|
|
186
|
+
const underlyingValue = this.underlyingValueForPathType('Counter')
|
|
187
|
+
return typeof underlyingValue !== 'undefined' ? Counter['@ditto.create'](this.mutableDocument, this.path, underlyingValue) : null
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Returns the value at the previously specified key in the document as a
|
|
192
|
+
* {@link MutableRegister} if possible, otherwise returns `null`.
|
|
193
|
+
*/
|
|
194
|
+
get register(): MutableRegister | null {
|
|
195
|
+
const underlyingValue = this.underlyingValueForPathType('Register')
|
|
196
|
+
return typeof underlyingValue !== 'undefined' ? Register['@ditto.create'](this.mutableDocument, this.path, underlyingValue) : null
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Returns the value at the previously specified key in the document as a
|
|
201
|
+
* {@link AttachmentToken} if possible, otherwise returns `null`.
|
|
202
|
+
*/
|
|
203
|
+
get attachmentToken(): AttachmentToken | null {
|
|
204
|
+
const underlyingValue = this.underlyingValueForPathType('Attachment')
|
|
205
|
+
return typeof underlyingValue !== 'undefined' ? new AttachmentToken(underlyingValue) : null
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Sets a value at the document's key-path defined by the receiver.
|
|
210
|
+
*
|
|
211
|
+
* @param isDefault Represents whether or not the value should be set as a
|
|
212
|
+
* default value. Set this to `true` if you want to set a default value that
|
|
213
|
+
* you expect to be overwritten by other devices in the network. The default
|
|
214
|
+
* value is `false`.
|
|
215
|
+
*/
|
|
216
|
+
set(value: any, isDefault?: boolean) {
|
|
217
|
+
return this['@ditto.set'](value, isDefault)
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Removes a value at the document's key-path defined by the receiver.
|
|
222
|
+
*/
|
|
223
|
+
remove() {
|
|
224
|
+
return this['@ditto.remove']()
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/** @internal */
|
|
228
|
+
constructor(mutableDocument: MutableDocument, path: string, validate: boolean) {
|
|
229
|
+
this.mutableDocument = mutableDocument
|
|
230
|
+
this.path = validate ? KeyPath.validate(path, { isInitial: true }) : path
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/** @internal */
|
|
234
|
+
underlyingValueForPathType(pathType: FFI.PathAccessorType): any | null {
|
|
235
|
+
const path = this.path
|
|
236
|
+
const document = this.mutableDocument
|
|
237
|
+
const documentHandle = Bridge.mutableDocument.handleFor(document)
|
|
238
|
+
const cborPathResult = FFI.documentGetCBORWithPathType(documentHandle.deref(), path, pathType)
|
|
239
|
+
return cborPathResult.cbor !== null ? CBOR.decode(cborPathResult.cbor) : undefined
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/** @internal */
|
|
243
|
+
'@ditto.increment'(amount: number) {
|
|
244
|
+
|
|
245
|
+
const documentHandle = Bridge.mutableDocument.handleFor(this.mutableDocument)
|
|
246
|
+
FFI.documentIncrementCounter(documentHandle.deref(), this.path, amount)
|
|
247
|
+
|
|
248
|
+
const updateResult = UpdateResult.incremented(this.mutableDocument.id, this.path, amount)
|
|
249
|
+
this.recordUpdateResult(updateResult)
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/** @internal */
|
|
253
|
+
'@ditto.set'(value: any, isDefault?: boolean) {
|
|
254
|
+
const documentHandle = Bridge.mutableDocument.handleFor(this.mutableDocument)
|
|
255
|
+
const valueJSON = desugarJSObject(value, false)
|
|
256
|
+
const valueCBOR = CBOR.encode(valueJSON)
|
|
257
|
+
|
|
258
|
+
if (isDefault) {
|
|
259
|
+
FFI.documentSetCBORWithTimestamp(documentHandle.deref(), this.path, valueCBOR, 0)
|
|
260
|
+
} else {
|
|
261
|
+
FFI.documentSetCBOR(documentHandle.deref(), this.path, valueCBOR)
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
const valueJSONCopy = CBOR.decode(valueCBOR)
|
|
265
|
+
const valueCopy = augmentJSONValue(valueJSONCopy, this.mutableDocument, this.path)
|
|
266
|
+
|
|
267
|
+
const updateResult = UpdateResult.set(this.mutableDocument.id, this.path, valueCopy)
|
|
268
|
+
this.recordUpdateResult(updateResult)
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/** @internal */
|
|
272
|
+
'@ditto.remove'() {
|
|
273
|
+
const documentHandle = Bridge.mutableDocument.handleFor(this.mutableDocument)
|
|
274
|
+
FFI.documentRemove(documentHandle.deref(), this.path)
|
|
275
|
+
|
|
276
|
+
this.updateInMemory((container, lastPathComponent) => {
|
|
277
|
+
if (Array.isArray(container) && typeof lastPathComponent === 'number') {
|
|
278
|
+
container.splice(lastPathComponent, 1)
|
|
279
|
+
} else {
|
|
280
|
+
delete container[lastPathComponent]
|
|
281
|
+
}
|
|
282
|
+
})
|
|
283
|
+
|
|
284
|
+
const updateResult = UpdateResult.removed(this.mutableDocument.id, this.path)
|
|
285
|
+
this.recordUpdateResult(updateResult)
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/** @private */
|
|
289
|
+
private updateInMemory(block: (container: any, lastPathComponent: any) => void) {
|
|
290
|
+
const mutableDocumentValue = this.mutableDocument.value
|
|
291
|
+
const evaluationResult = KeyPath.evaluate(this.path, mutableDocumentValue, { stopAtLastContainer: true })
|
|
292
|
+
block(evaluationResult.value, evaluationResult.nextPathComponent)
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/** @private */
|
|
296
|
+
private recordUpdateResult(updateResult: UpdateResult) {
|
|
297
|
+
|
|
298
|
+
const updateResults = this.mutableDocument['@ditto.updateResults'].slice()
|
|
299
|
+
updateResults.push(updateResult)
|
|
300
|
+
Object.freeze(updateResults)
|
|
301
|
+
this.mutableDocument['@ditto.updateResults' as any] = updateResults
|
|
302
|
+
}
|
|
303
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright © 2021 DittoLive Incorporated. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as FFI from './ffi'
|
|
6
|
+
import { Bridge } from './bridge'
|
|
7
|
+
import { DocumentID } from './document-id'
|
|
8
|
+
import { validateDocumentIDCBOR } from './document-id'
|
|
9
|
+
import { DocumentPath, MutableDocumentPath } from './document-path'
|
|
10
|
+
|
|
11
|
+
import type { UpdateResult } from './update-result'
|
|
12
|
+
|
|
13
|
+
// -----------------------------------------------------------------------------
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A document value is a JavaScript object containing values for keys that
|
|
17
|
+
* can be serialized via CBOR.
|
|
18
|
+
*/
|
|
19
|
+
export type DocumentValue = Record<string, any>
|
|
20
|
+
|
|
21
|
+
// -----------------------------------------------------------------------------
|
|
22
|
+
|
|
23
|
+
/** A document belonging to a {@link Collection} with an inner value. */
|
|
24
|
+
export class Document {
|
|
25
|
+
/**
|
|
26
|
+
* Returns a hash that represents the passed in document(s).
|
|
27
|
+
*/
|
|
28
|
+
static hash(documentOrMany: Document | Document[]): BigInt {
|
|
29
|
+
const documents = documentsFrom(documentOrMany)
|
|
30
|
+
const documentHandles = documents.map((doc) => Bridge.document.handleFor(doc))
|
|
31
|
+
return FFI.documentsHash(documentHandles.map((handle) => handle.deref()))
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Returns a pattern of words that together create a mnemonic, which
|
|
36
|
+
* represents the passed in document(s).
|
|
37
|
+
*/
|
|
38
|
+
static hashMnemonic(documentOrMany: Document | Document[]): string {
|
|
39
|
+
const documents = documentsFrom(documentOrMany)
|
|
40
|
+
const documentHandles = Bridge.document.handlesFor(documents)
|
|
41
|
+
return FFI.documentsHashMnemonic(documentHandles.deref())
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Returns the document ID.
|
|
46
|
+
*/
|
|
47
|
+
get id(): DocumentID {
|
|
48
|
+
let id = this['@ditto.id']
|
|
49
|
+
if (typeof id === 'undefined') {
|
|
50
|
+
const documentHandle = Bridge.document.handleFor(this)
|
|
51
|
+
const documentIDCBOR = FFI.documentID(documentHandle.deref())
|
|
52
|
+
id = new DocumentID(documentIDCBOR, true)
|
|
53
|
+
this['@ditto.id'] = id
|
|
54
|
+
}
|
|
55
|
+
return id
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Returns the document path at the root of the document.
|
|
60
|
+
*/
|
|
61
|
+
get path(): DocumentPath {
|
|
62
|
+
return new DocumentPath(this, '', false)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Convenience property, same as calling `path.value`. The value is cached on
|
|
67
|
+
* first access and returned on subsequent calls without calling `path.value`
|
|
68
|
+
* again.
|
|
69
|
+
*/
|
|
70
|
+
get value(): DocumentValue {
|
|
71
|
+
let value = this['@ditto.value']
|
|
72
|
+
if (typeof value === 'undefined') {
|
|
73
|
+
value = this.path.value
|
|
74
|
+
this['@ditto.value'] = value
|
|
75
|
+
}
|
|
76
|
+
return value
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Convenience method, same as calling `path.at()`.
|
|
81
|
+
*/
|
|
82
|
+
at(keyPathOrIndex: string | number): DocumentPath {
|
|
83
|
+
return this.path.at(keyPathOrIndex)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
constructor() {}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
static idCBOR(document: Document): Uint8Array {
|
|
92
|
+
const documentHandle = Bridge.document.handleFor(document)
|
|
93
|
+
return FFI.documentID(documentHandle.deref())
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** @internal */
|
|
97
|
+
static canonicalizedIDCBOR(idCBOR: Uint8Array): Uint8Array {
|
|
98
|
+
return validateDocumentIDCBOR(idCBOR)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
static isIDCBORCanonical(idCBOR: Uint8Array): boolean {
|
|
103
|
+
const canonicalIDCBOR = this.canonicalizedIDCBOR(idCBOR)
|
|
104
|
+
return idCBOR === canonicalIDCBOR
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// -----------------------------------------------------------------------------
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* A representation of a {@link Document} that can be mutated via
|
|
113
|
+
* {@link MutableDocumentPath}. You don't create or interact with
|
|
114
|
+
* a `MutableDocument` directly but rather through our proxy-based
|
|
115
|
+
* subscripting API exposed within the `update()` methods of
|
|
116
|
+
* {@link PendingCursorOperation.update | PendingCursorOperation} and
|
|
117
|
+
* {@link PendingIDSpecificOperation.update | PendingIDSpecificOperation}.
|
|
118
|
+
*/
|
|
119
|
+
export class MutableDocument {
|
|
120
|
+
/**
|
|
121
|
+
* Returns the ID of the document.
|
|
122
|
+
*/
|
|
123
|
+
get id(): DocumentID {
|
|
124
|
+
let id = this['@ditto.id']
|
|
125
|
+
if (typeof id === 'undefined') {
|
|
126
|
+
const documentHandle = Bridge.mutableDocument.handleFor(this)
|
|
127
|
+
const documentIDCBOR = FFI.documentID(documentHandle.deref())
|
|
128
|
+
id = new DocumentID(documentIDCBOR, true)
|
|
129
|
+
this['@ditto.id'] = id
|
|
130
|
+
}
|
|
131
|
+
return id
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Returns the document path at the root of the document.
|
|
136
|
+
*/
|
|
137
|
+
get path(): MutableDocumentPath {
|
|
138
|
+
return new MutableDocumentPath(this, '', false)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Convenience property, same as `path.value`.
|
|
143
|
+
*/
|
|
144
|
+
get value(): DocumentValue {
|
|
145
|
+
return this.path.value
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Convenience method, same as calling `path.at()`.
|
|
150
|
+
*/
|
|
151
|
+
at(keyPathOrIndex: string | number): MutableDocumentPath {
|
|
152
|
+
return this.path.at(keyPathOrIndex)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** @internal */
|
|
156
|
+
constructor() {}
|
|
157
|
+
|
|
158
|
+
/** @internal */
|
|
159
|
+
readonly '@ditto.updateResults': UpdateResult[] = []
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
/** @internal */
|
|
163
|
+
static idCBOR(mutableDocument: MutableDocument): Uint8Array {
|
|
164
|
+
const documentHandle = Bridge.mutableDocument.handleFor(mutableDocument)
|
|
165
|
+
return FFI.documentID(documentHandle.deref())
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/** @internal */
|
|
169
|
+
static canonicalizedIDCBOR = Document.canonicalizedIDCBOR
|
|
170
|
+
|
|
171
|
+
/** @internal */
|
|
172
|
+
static isIDCBORCanonical = Document.isIDCBORCanonical
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// -----------------------------------------------------------------------------
|
|
176
|
+
|
|
177
|
+
/** @private */
|
|
178
|
+
function documentsFrom(documentOrMany: Document | Document[] | null): Document[] {
|
|
179
|
+
if (!documentOrMany) {
|
|
180
|
+
return []
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if (documentOrMany instanceof Document) {
|
|
184
|
+
return [documentOrMany]
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (documentOrMany instanceof Array) {
|
|
188
|
+
return documentOrMany as Document[]
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
throw new Error(`Expected null, a single document, or an array of documents but got value of type ${typeof documentOrMany}: ${documentOrMany}`)
|
|
192
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright © 2021 DittoLive Incorporated. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
import { Attachment } from './attachment'
|
|
7
|
+
import { Document, MutableDocument } from './document'
|
|
8
|
+
|
|
9
|
+
import { StaticTCPClient } from './static-tcp-client'
|
|
10
|
+
import { WebsocketClient } from './websocket-client'
|
|
11
|
+
|
|
12
|
+
import { Ditto } from './ditto'
|
|
13
|
+
import { Bridge } from './bridge'
|
|
14
|
+
import { QueryResult } from './query-result'
|
|
15
|
+
import { QueryResultItem } from './query-result-item'
|
|
16
|
+
|
|
17
|
+
Bridge.attachment.registerType(Attachment)
|
|
18
|
+
Bridge.document.registerType(Document)
|
|
19
|
+
Bridge.dqlResult.registerType(QueryResultItem)
|
|
20
|
+
Bridge.dqlResponse.registerType(QueryResult)
|
|
21
|
+
Bridge.mutableDocument.registerType(MutableDocument)
|
|
22
|
+
Bridge.staticTCPClient.registerType(StaticTCPClient)
|
|
23
|
+
Bridge.websocketClient.registerType(WebsocketClient)
|
|
24
|
+
Bridge.ditto.registerType(Ditto)
|