@dittolive/ditto 4.5.0 → 4.5.1-experimental.aarch64-linux.1.aarch64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/README.md +2 -2
  2. package/node/ditto.cjs.js +2 -9620
  3. package/node/{ditto.linux-x64.node → ditto.linux-arm64.node} +0 -0
  4. package/package.json +38 -34
  5. package/types/ditto.d.ts +0 -2
  6. package/web/ditto.es6.js +1 -1
  7. package/web/ditto.umd.js +1 -1
  8. package/web/ditto.wasm +0 -0
  9. package/DittoReactNative.podspec +0 -27
  10. package/node/ditto.darwin-arm64.node +0 -0
  11. package/node/ditto.darwin-x64.node +0 -0
  12. package/node/ditto.linux-arm.node +0 -0
  13. package/node/ditto.win32-x64.node +0 -0
  14. package/node/transports.darwin-arm64.node +0 -0
  15. package/node/transports.darwin-x64.node +0 -0
  16. package/react-native/android/CMakeLists.txt +0 -37
  17. package/react-native/android/build.gradle +0 -203
  18. package/react-native/android/cpp-adapter.cpp +0 -254
  19. package/react-native/android/gradle.properties +0 -5
  20. package/react-native/android/src/main/AndroidManifest.xml +0 -4
  21. package/react-native/android/src/main/java/com/dittolive/rnsdk/DittoRNSDKModule.java +0 -85
  22. package/react-native/android/src/main/java/com/dittolive/rnsdk/DittoRNSDKPackage.java +0 -28
  23. package/react-native/boost/boost/assert.hpp +0 -85
  24. package/react-native/boost/boost/config/abi/borland_prefix.hpp +0 -27
  25. package/react-native/boost/boost/config/abi/borland_suffix.hpp +0 -12
  26. package/react-native/boost/boost/config/abi/msvc_prefix.hpp +0 -22
  27. package/react-native/boost/boost/config/abi/msvc_suffix.hpp +0 -8
  28. package/react-native/boost/boost/config/abi_prefix.hpp +0 -25
  29. package/react-native/boost/boost/config/abi_suffix.hpp +0 -25
  30. package/react-native/boost/boost/config/assert_cxx03.hpp +0 -211
  31. package/react-native/boost/boost/config/assert_cxx11.hpp +0 -209
  32. package/react-native/boost/boost/config/assert_cxx14.hpp +0 -47
  33. package/react-native/boost/boost/config/assert_cxx17.hpp +0 -62
  34. package/react-native/boost/boost/config/assert_cxx20.hpp +0 -59
  35. package/react-native/boost/boost/config/assert_cxx98.hpp +0 -23
  36. package/react-native/boost/boost/config/auto_link.hpp +0 -525
  37. package/react-native/boost/boost/config/compiler/borland.hpp +0 -339
  38. package/react-native/boost/boost/config/compiler/clang.hpp +0 -366
  39. package/react-native/boost/boost/config/compiler/clang_version.hpp +0 -83
  40. package/react-native/boost/boost/config/compiler/codegear.hpp +0 -385
  41. package/react-native/boost/boost/config/compiler/comeau.hpp +0 -59
  42. package/react-native/boost/boost/config/compiler/common_edg.hpp +0 -183
  43. package/react-native/boost/boost/config/compiler/compaq_cxx.hpp +0 -19
  44. package/react-native/boost/boost/config/compiler/cray.hpp +0 -446
  45. package/react-native/boost/boost/config/compiler/diab.hpp +0 -26
  46. package/react-native/boost/boost/config/compiler/digitalmars.hpp +0 -143
  47. package/react-native/boost/boost/config/compiler/gcc.hpp +0 -383
  48. package/react-native/boost/boost/config/compiler/gcc_xml.hpp +0 -114
  49. package/react-native/boost/boost/config/compiler/greenhills.hpp +0 -28
  50. package/react-native/boost/boost/config/compiler/hp_acc.hpp +0 -149
  51. package/react-native/boost/boost/config/compiler/intel.hpp +0 -577
  52. package/react-native/boost/boost/config/compiler/kai.hpp +0 -33
  53. package/react-native/boost/boost/config/compiler/metrowerks.hpp +0 -198
  54. package/react-native/boost/boost/config/compiler/mpw.hpp +0 -140
  55. package/react-native/boost/boost/config/compiler/nvcc.hpp +0 -61
  56. package/react-native/boost/boost/config/compiler/pathscale.hpp +0 -138
  57. package/react-native/boost/boost/config/compiler/pgi.hpp +0 -23
  58. package/react-native/boost/boost/config/compiler/sgi_mipspro.hpp +0 -29
  59. package/react-native/boost/boost/config/compiler/sunpro_cc.hpp +0 -222
  60. package/react-native/boost/boost/config/compiler/vacpp.hpp +0 -186
  61. package/react-native/boost/boost/config/compiler/visualc.hpp +0 -391
  62. package/react-native/boost/boost/config/compiler/xlcpp.hpp +0 -299
  63. package/react-native/boost/boost/config/compiler/xlcpp_zos.hpp +0 -173
  64. package/react-native/boost/boost/config/detail/cxx_composite.hpp +0 -203
  65. package/react-native/boost/boost/config/detail/posix_features.hpp +0 -95
  66. package/react-native/boost/boost/config/detail/select_compiler_config.hpp +0 -157
  67. package/react-native/boost/boost/config/detail/select_platform_config.hpp +0 -147
  68. package/react-native/boost/boost/config/detail/select_stdlib_config.hpp +0 -121
  69. package/react-native/boost/boost/config/detail/suffix.hpp +0 -1294
  70. package/react-native/boost/boost/config/header_deprecated.hpp +0 -26
  71. package/react-native/boost/boost/config/helper_macros.hpp +0 -37
  72. package/react-native/boost/boost/config/no_tr1/cmath.hpp +0 -28
  73. package/react-native/boost/boost/config/no_tr1/complex.hpp +0 -28
  74. package/react-native/boost/boost/config/no_tr1/functional.hpp +0 -28
  75. package/react-native/boost/boost/config/no_tr1/memory.hpp +0 -28
  76. package/react-native/boost/boost/config/no_tr1/utility.hpp +0 -28
  77. package/react-native/boost/boost/config/platform/aix.hpp +0 -33
  78. package/react-native/boost/boost/config/platform/amigaos.hpp +0 -15
  79. package/react-native/boost/boost/config/platform/beos.hpp +0 -26
  80. package/react-native/boost/boost/config/platform/bsd.hpp +0 -83
  81. package/react-native/boost/boost/config/platform/cloudabi.hpp +0 -18
  82. package/react-native/boost/boost/config/platform/cray.hpp +0 -18
  83. package/react-native/boost/boost/config/platform/cygwin.hpp +0 -71
  84. package/react-native/boost/boost/config/platform/haiku.hpp +0 -31
  85. package/react-native/boost/boost/config/platform/hpux.hpp +0 -87
  86. package/react-native/boost/boost/config/platform/irix.hpp +0 -31
  87. package/react-native/boost/boost/config/platform/linux.hpp +0 -106
  88. package/react-native/boost/boost/config/platform/macos.hpp +0 -87
  89. package/react-native/boost/boost/config/platform/qnxnto.hpp +0 -31
  90. package/react-native/boost/boost/config/platform/solaris.hpp +0 -31
  91. package/react-native/boost/boost/config/platform/symbian.hpp +0 -97
  92. package/react-native/boost/boost/config/platform/vms.hpp +0 -25
  93. package/react-native/boost/boost/config/platform/vxworks.hpp +0 -422
  94. package/react-native/boost/boost/config/platform/wasm.hpp +0 -23
  95. package/react-native/boost/boost/config/platform/win32.hpp +0 -90
  96. package/react-native/boost/boost/config/platform/zos.hpp +0 -32
  97. package/react-native/boost/boost/config/pragma_message.hpp +0 -31
  98. package/react-native/boost/boost/config/requires_threads.hpp +0 -92
  99. package/react-native/boost/boost/config/stdlib/dinkumware.hpp +0 -324
  100. package/react-native/boost/boost/config/stdlib/libcomo.hpp +0 -93
  101. package/react-native/boost/boost/config/stdlib/libcpp.hpp +0 -180
  102. package/react-native/boost/boost/config/stdlib/libstdcpp3.hpp +0 -482
  103. package/react-native/boost/boost/config/stdlib/modena.hpp +0 -79
  104. package/react-native/boost/boost/config/stdlib/msl.hpp +0 -98
  105. package/react-native/boost/boost/config/stdlib/roguewave.hpp +0 -208
  106. package/react-native/boost/boost/config/stdlib/sgi.hpp +0 -168
  107. package/react-native/boost/boost/config/stdlib/stlport.hpp +0 -258
  108. package/react-native/boost/boost/config/stdlib/vacpp.hpp +0 -74
  109. package/react-native/boost/boost/config/stdlib/xlcpp_zos.hpp +0 -61
  110. package/react-native/boost/boost/config/user.hpp +0 -133
  111. package/react-native/boost/boost/config/warning_disable.hpp +0 -47
  112. package/react-native/boost/boost/config/workaround.hpp +0 -305
  113. package/react-native/boost/boost/config.hpp +0 -67
  114. package/react-native/boost/boost/cstdint.hpp +0 -556
  115. package/react-native/boost/boost/intrusive_ptr.hpp +0 -18
  116. package/react-native/boost/boost/smart_ptr/detail/atomic_count.hpp +0 -103
  117. package/react-native/boost/boost/smart_ptr/detail/atomic_count_gcc.hpp +0 -79
  118. package/react-native/boost/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp +0 -63
  119. package/react-native/boost/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp +0 -88
  120. package/react-native/boost/boost/smart_ptr/detail/atomic_count_nt.hpp +0 -66
  121. package/react-native/boost/boost/smart_ptr/detail/atomic_count_pt.hpp +0 -104
  122. package/react-native/boost/boost/smart_ptr/detail/atomic_count_spin.hpp +0 -69
  123. package/react-native/boost/boost/smart_ptr/detail/atomic_count_std_atomic.hpp +0 -67
  124. package/react-native/boost/boost/smart_ptr/detail/atomic_count_sync.hpp +0 -72
  125. package/react-native/boost/boost/smart_ptr/detail/atomic_count_win32.hpp +0 -70
  126. package/react-native/boost/boost/smart_ptr/detail/local_counted_base.hpp +0 -148
  127. package/react-native/boost/boost/smart_ptr/detail/local_sp_deleter.hpp +0 -91
  128. package/react-native/boost/boost/smart_ptr/detail/operator_bool.hpp +0 -64
  129. package/react-native/boost/boost/smart_ptr/detail/requires_cxx11.hpp +0 -23
  130. package/react-native/boost/boost/smart_ptr/detail/shared_count.hpp +0 -707
  131. package/react-native/boost/boost/smart_ptr/detail/sp_convertible.hpp +0 -92
  132. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base.hpp +0 -92
  133. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp +0 -163
  134. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_aix.hpp +0 -152
  135. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp +0 -185
  136. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp +0 -148
  137. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp +0 -170
  138. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp +0 -200
  139. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp +0 -194
  140. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp +0 -179
  141. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp +0 -186
  142. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_nt.hpp +0 -119
  143. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_pt.hpp +0 -147
  144. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp +0 -174
  145. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_spin.hpp +0 -141
  146. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp +0 -147
  147. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_sync.hpp +0 -165
  148. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp +0 -163
  149. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_w32.hpp +0 -140
  150. package/react-native/boost/boost/smart_ptr/detail/sp_counted_impl.hpp +0 -309
  151. package/react-native/boost/boost/smart_ptr/detail/sp_disable_deprecated.hpp +0 -40
  152. package/react-native/boost/boost/smart_ptr/detail/sp_forward.hpp +0 -52
  153. package/react-native/boost/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp +0 -27
  154. package/react-native/boost/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp +0 -69
  155. package/react-native/boost/boost/smart_ptr/detail/sp_interlocked.hpp +0 -173
  156. package/react-native/boost/boost/smart_ptr/detail/sp_noexcept.hpp +0 -48
  157. package/react-native/boost/boost/smart_ptr/detail/sp_nullptr_t.hpp +0 -45
  158. package/react-native/boost/boost/smart_ptr/detail/sp_obsolete.hpp +0 -32
  159. package/react-native/boost/boost/smart_ptr/detail/sp_thread_pause.hpp +0 -51
  160. package/react-native/boost/boost/smart_ptr/detail/sp_thread_sleep.hpp +0 -104
  161. package/react-native/boost/boost/smart_ptr/detail/sp_thread_yield.hpp +0 -100
  162. package/react-native/boost/boost/smart_ptr/detail/sp_typeinfo_.hpp +0 -58
  163. package/react-native/boost/boost/smart_ptr/detail/sp_win32_sleep.hpp +0 -49
  164. package/react-native/boost/boost/smart_ptr/intrusive_ptr.hpp +0 -409
  165. package/react-native/boost/boost/smart_ptr/intrusive_ref_counter.hpp +0 -188
  166. package/react-native/cpp/include/Attachment.h +0 -16
  167. package/react-native/cpp/include/Authentication.h +0 -23
  168. package/react-native/cpp/include/Collection.h +0 -13
  169. package/react-native/cpp/include/DQL.h +0 -21
  170. package/react-native/cpp/include/Document.h +0 -17
  171. package/react-native/cpp/include/Identity.h +0 -17
  172. package/react-native/cpp/include/Lifecycle.h +0 -16
  173. package/react-native/cpp/include/LiveQuery.h +0 -17
  174. package/react-native/cpp/include/Logger.h +0 -22
  175. package/react-native/cpp/include/Misc.h +0 -26
  176. package/react-native/cpp/include/Presence.h +0 -14
  177. package/react-native/cpp/include/RetainableState.h +0 -24
  178. package/react-native/cpp/include/SmallPeerInfo.h +0 -17
  179. package/react-native/cpp/include/Transports.h +0 -25
  180. package/react-native/cpp/include/TypedArray.hpp +0 -167
  181. package/react-native/cpp/include/Utils.h +0 -61
  182. package/react-native/cpp/include/main.h +0 -10
  183. package/react-native/cpp/src/Attachment.cpp +0 -86
  184. package/react-native/cpp/src/Authentication.cpp +0 -224
  185. package/react-native/cpp/src/Collection.cpp +0 -54
  186. package/react-native/cpp/src/DQL.cpp +0 -254
  187. package/react-native/cpp/src/Document.cpp +0 -146
  188. package/react-native/cpp/src/Identity.cpp +0 -123
  189. package/react-native/cpp/src/Lifecycle.cpp +0 -75
  190. package/react-native/cpp/src/LiveQuery.cpp +0 -64
  191. package/react-native/cpp/src/Logger.cpp +0 -200
  192. package/react-native/cpp/src/Misc.cpp +0 -271
  193. package/react-native/cpp/src/Presence.cpp +0 -77
  194. package/react-native/cpp/src/RetainableState.cpp +0 -15
  195. package/react-native/cpp/src/SmallPeerInfo.cpp +0 -108
  196. package/react-native/cpp/src/Transports.cpp +0 -270
  197. package/react-native/cpp/src/TypedArray.cpp +0 -303
  198. package/react-native/cpp/src/Utils.cpp +0 -138
  199. package/react-native/cpp/src/main.cpp +0 -149
  200. package/react-native/dittoffi/dittoffi.h +0 -4698
  201. package/react-native/dittoffi/ifaddrs.cpp +0 -385
  202. package/react-native/dittoffi/ifaddrs.h +0 -206
  203. package/react-native/ios/DittoRNSDK.h +0 -7
  204. package/react-native/ios/DittoRNSDK.mm +0 -107
  205. package/react-native/ios/YeetJSIUtils.h +0 -60
  206. package/react-native/ios/YeetJSIUtils.mm +0 -196
  207. package/react-native/lib/commonjs/ditto.rn.js +0 -93
  208. package/react-native/lib/commonjs/ditto.rn.js.map +0 -1
  209. package/react-native/lib/commonjs/index.js +0 -14
  210. package/react-native/lib/commonjs/index.js.map +0 -1
  211. package/react-native/lib/module/ditto.rn.js +0 -83
  212. package/react-native/lib/module/ditto.rn.js.map +0 -1
  213. package/react-native/lib/module/index.js +0 -13
  214. package/react-native/lib/module/index.js.map +0 -1
  215. package/react-native/lib/typescript/ditto.rn.d.ts +0 -15
  216. package/react-native/lib/typescript/ditto.rn.d.ts.map +0 -1
  217. package/react-native/lib/typescript/index.d.ts +0 -1
  218. package/react-native/lib/typescript/index.d.ts.map +0 -1
  219. package/react-native/scripts/ruby/include_local_boost.rb +0 -78
  220. package/react-native/src/ditto.rn.ts +0 -91
  221. package/react-native/src/environment/environment.fallback.ts +0 -4
  222. package/react-native/src/index.ts +0 -26
  223. package/react-native/src/sources/@cbor-redux.ts +0 -2
  224. package/react-native/src/sources/@ditto.core.ts +0 -1
  225. package/react-native/src/sources/@environment.ts +0 -2
  226. package/react-native/src/sources/attachment-fetch-event.ts +0 -54
  227. package/react-native/src/sources/attachment-fetcher-manager.ts +0 -129
  228. package/react-native/src/sources/attachment-fetcher.ts +0 -124
  229. package/react-native/src/sources/attachment-token.ts +0 -48
  230. package/react-native/src/sources/attachment.ts +0 -59
  231. package/react-native/src/sources/augment.ts +0 -89
  232. package/react-native/src/sources/authenticator.ts +0 -314
  233. package/react-native/src/sources/base-pending-cursor-operation.ts +0 -237
  234. package/react-native/src/sources/base-pending-id-specific-operation.ts +0 -109
  235. package/react-native/src/sources/bridge.ts +0 -549
  236. package/react-native/src/sources/build-time-constants.ts +0 -4
  237. package/react-native/src/sources/cbor.ts +0 -35
  238. package/react-native/src/sources/collection-interface.ts +0 -67
  239. package/react-native/src/sources/collection.ts +0 -212
  240. package/react-native/src/sources/collections-event.ts +0 -99
  241. package/react-native/src/sources/counter.ts +0 -77
  242. package/react-native/src/sources/ditto.ts +0 -945
  243. package/react-native/src/sources/document-id.ts +0 -159
  244. package/react-native/src/sources/document-path.ts +0 -303
  245. package/react-native/src/sources/document.ts +0 -192
  246. package/react-native/src/sources/epilogue.ts +0 -24
  247. package/react-native/src/sources/error-codes.ts +0 -52
  248. package/react-native/src/sources/error.ts +0 -203
  249. package/react-native/src/sources/essentials.ts +0 -53
  250. package/react-native/src/sources/ffi-error.ts +0 -117
  251. package/react-native/src/sources/ffi.ts +0 -1972
  252. package/react-native/src/sources/identity.ts +0 -163
  253. package/react-native/src/sources/init.ts +0 -70
  254. package/react-native/src/sources/internal.ts +0 -113
  255. package/react-native/src/sources/keep-alive.ts +0 -69
  256. package/react-native/src/sources/key-path.ts +0 -195
  257. package/react-native/src/sources/live-query-event.ts +0 -208
  258. package/react-native/src/sources/live-query-manager.ts +0 -101
  259. package/react-native/src/sources/live-query.ts +0 -164
  260. package/react-native/src/sources/logger.ts +0 -196
  261. package/react-native/src/sources/observer-manager.ts +0 -175
  262. package/react-native/src/sources/observer.ts +0 -77
  263. package/react-native/src/sources/pending-collections-operation.ts +0 -232
  264. package/react-native/src/sources/pending-cursor-operation.ts +0 -218
  265. package/react-native/src/sources/pending-id-specific-operation.ts +0 -216
  266. package/react-native/src/sources/presence-manager.ts +0 -160
  267. package/react-native/src/sources/presence.ts +0 -238
  268. package/react-native/src/sources/query-result-item.ts +0 -116
  269. package/react-native/src/sources/query-result.ts +0 -55
  270. package/react-native/src/sources/register.ts +0 -92
  271. package/react-native/src/sources/small-peer-info.ts +0 -176
  272. package/react-native/src/sources/static-tcp-client.ts +0 -6
  273. package/react-native/src/sources/store-observer.ts +0 -176
  274. package/react-native/src/sources/store.ts +0 -365
  275. package/react-native/src/sources/subscription-manager.ts +0 -98
  276. package/react-native/src/sources/subscription.ts +0 -88
  277. package/react-native/src/sources/sync-subscription.ts +0 -90
  278. package/react-native/src/sources/sync.ts +0 -495
  279. package/react-native/src/sources/test-helpers.ts +0 -24
  280. package/react-native/src/sources/transport-conditions-manager.ts +0 -104
  281. package/react-native/src/sources/transport-config.ts +0 -428
  282. package/react-native/src/sources/update-result.ts +0 -66
  283. package/react-native/src/sources/update-results-map.ts +0 -57
  284. package/react-native/src/sources/websocket-client.ts +0 -6
  285. package/react-native/src/sources/write-transaction-collection.ts +0 -122
  286. package/react-native/src/sources/write-transaction-pending-cursor-operation.ts +0 -101
  287. package/react-native/src/sources/write-transaction-pending-id-specific-operation.ts +0 -72
  288. package/react-native/src/sources/write-transaction.ts +0 -119
  289. package/react-native.config.js +0 -9
@@ -1,78 +0,0 @@
1
- # By default, Cocoapods bundle development pod source files under one single
2
- # folder. This forces us to change all the relative paths in the boost folder
3
- # (which is used by multiple people).
4
- #
5
- # In order not to do that, we will create a subspec for each folder in the
6
- # relative path. In the end, we will be able to call boost files like this
7
- # again:
8
- #
9
- # # main.cpp
10
- #
11
- # #include <boost/smart_ptr/intrusive_ref_counter.hpp>
12
- #
13
- # # instead of:
14
- #
15
- # #include "intrusive_ref_counter.hpp"
16
- #
17
- # Related: https://github.com/CocoaPods/CocoaPods/issues/8873
18
- def include_local_boost(s)
19
- s.subspec 'boost' do |boost|
20
- boost.source_files = "react-native/boost/boost/**/*.{h,cpp,hpp}"
21
- boost.public_header_files = 'react-native/boost/boost/**/*.hpp'
22
- boost.header_dir = 'boost'
23
-
24
- boost.subspec 'smart_ptr' do |smart_ptr|
25
- smart_ptr.source_files = "react-native/boost/boost/smart_ptr/**/*.{h,cpp,hpp}"
26
- smart_ptr.public_header_files = 'react-native/boost/boost/smart_ptr/**/*.hpp'
27
- smart_ptr.header_dir = 'boost/smart_ptr'
28
-
29
- smart_ptr.subspec 'detail' do |detail|
30
- detail.source_files = "react-native/boost/boost/smart_ptr/detail/**/*.{h,cpp,hpp}"
31
- detail.public_header_files = 'react-native/boost/boost/smart_ptr/detail/**/*.hpp'
32
- detail.header_dir = 'boost/smart_ptr/detail'
33
- end
34
- end
35
-
36
- boost.subspec 'config' do |config|
37
- config.source_files = "react-native/boost/boost/config/**/*.{h,cpp,hpp}"
38
- config.public_header_files = 'react-native/boost/boost/config/**/*.hpp'
39
- config.header_dir = 'boost/config'
40
-
41
- config.subspec 'abi' do |abi|
42
- abi.source_files = "react-native/boost/boost/config/abi/**/*.{h,cpp,hpp}"
43
- abi.public_header_files = 'react-native/boost/boost/config/abi/**/*.hpp'
44
- abi.header_dir = 'boost/config/abi'
45
- end
46
-
47
- config.subspec 'compiler' do |compiler|
48
- compiler.source_files = "react-native/boost/boost/config/compiler/**/*.{h,cpp,hpp}"
49
- compiler.public_header_files = 'react-native/boost/boost/config/compiler/**/*.hpp'
50
- compiler.header_dir = 'boost/config/compiler'
51
- end
52
-
53
- config.subspec 'detail' do |detail|
54
- detail.source_files = "react-native/boost/boost/config/detail/**/*.{h,cpp,hpp}"
55
- detail.public_header_files = 'react-native/boost/boost/config/detail/**/*.hpp'
56
- detail.header_dir = 'boost/config/detail'
57
- end
58
-
59
- config.subspec 'no_tr1' do |no_tr1|
60
- no_tr1.source_files = "react-native/boost/boost/config/no_tr1/**/*.{h,cpp,hpp}"
61
- no_tr1.public_header_files = 'react-native/boost/boost/config/no_tr1/**/*.hpp'
62
- no_tr1.header_dir = 'boost/config/no_tr1'
63
- end
64
-
65
- config.subspec 'platform' do |platform|
66
- platform.source_files = "react-native/boost/boost/config/platform/**/*.{h,cpp,hpp}"
67
- platform.public_header_files = 'react-native/boost/boost/config/platform/**/*.hpp'
68
- platform.header_dir = 'boost/config/platform'
69
- end
70
-
71
- config.subspec 'stdlib' do |stdlib|
72
- stdlib.source_files = "react-native/boost/boost/config/stdlib/**/*.{h,cpp,hpp}"
73
- stdlib.public_header_files = 'react-native/boost/boost/config/stdlib/**/*.hpp'
74
- stdlib.header_dir = 'boost/config/stdlib'
75
- end
76
- end
77
- end
78
- end
@@ -1,91 +0,0 @@
1
- import { NativeModules, Platform, type Permission } from 'react-native';
2
- import { FinalizationGroup } from '@ungap/weakrefs';
3
- import 'fastestsmallesttextencoderdecoder';
4
-
5
- interface JSSDKAPI {
6
- ditto_sdk_transports_init(transportsErrorPointer: any): boolean;
7
- }
8
- interface PlatformSpecificAPI {
9
- getRandomValues<T extends ArrayBufferView>(array: T): T;
10
- ditto_tick(): void;
11
- createDirectory(path: string): string;
12
- checkDirectoryExists(path: string): string;
13
- getDeviceName(): string;
14
-
15
- ditto_sdk_transports_set_android_context(): boolean;
16
- ditto_sdk_transports_android_missing_permissions(): string[];
17
- }
18
-
19
- type DittoCoreType = JSSDKAPI & PlatformSpecificAPI;
20
-
21
- const dittoCore = global as unknown as DittoCoreType;
22
- const isLoaded = typeof dittoCore.getDeviceName === 'function';
23
- if (!isLoaded) {
24
- const result = NativeModules.DittoRNSDK?.install();
25
-
26
- if (!result) {
27
- throw new Error('JSI bindings were not installed for: DittoRNSDK Module');
28
- }
29
-
30
- setInterval(() => {
31
- dittoCore.ditto_tick();
32
- }, 50);
33
-
34
- if (
35
- typeof global.FinalizationRegistry === 'undefined' &&
36
- typeof FinalizationGroup !== 'undefined'
37
- ) {
38
- global.FinalizationRegistry = FinalizationGroup;
39
- }
40
- }
41
-
42
- Object.keys(dittoCore)
43
- .filter((key) => key !== 'ditto_sdk_transports_init')
44
- .forEach((key) => {
45
- exports[key] = dittoCore[key as keyof DittoCoreType];
46
- });
47
-
48
- export function ditto_sdk_transports_init(
49
- transportsErrorPointer: any
50
- ): boolean {
51
- if (Platform.OS === 'android') {
52
- const res = dittoCore.ditto_sdk_transports_set_android_context();
53
- if (!res) {
54
- throw new Error(
55
- "Couldn't manage to set Android context with `ditto_sdk_transports_set_android_context()`"
56
- );
57
- }
58
- }
59
-
60
- return dittoCore.ditto_sdk_transports_init(transportsErrorPointer);
61
- }
62
-
63
- /**
64
- * Get the list of missing Android permissions for syncing. The returned value
65
- * can be passed directly to `PermissionsAndroid.requestMultiple()`.
66
- *
67
- * Returns an empty array on other platforms.
68
- */
69
- export function getMissingAndroidPermissions(): Permission[] {
70
- if (Platform.OS !== 'android') {
71
- return [];
72
- }
73
- return dittoCore.ditto_sdk_transports_android_missing_permissions() as Permission[];
74
- }
75
-
76
- export function boxCStringIntoString(something: any) {
77
- return something;
78
- }
79
-
80
- export function boxCBytesIntoBuffer(cborBytes: any) {
81
- const bytes = dittoCore.sliceBoxedToUInt8Array(cborBytes);
82
- return bytes ? new Uint8Array(bytes) : null;
83
- }
84
-
85
- export function getDeadlockTimeout(): number {
86
- return 0;
87
- }
88
-
89
- export function setDeadlockTimeout(something: any) {
90
- return something;
91
- }
@@ -1,4 +0,0 @@
1
- export const isReactNativeBuild = true
2
- export const isNodeBuild = false
3
- export const isWebBuild = false
4
-
@@ -1,26 +0,0 @@
1
-
2
- export { getMissingAndroidPermissions } from './ditto.rn';
3
-
4
- export * from './sources/essentials';
5
-
6
- export * from './sources/logger';
7
- export * from './sources/document-id';
8
- export * from './sources/observer';
9
-
10
- export * from './sources/authenticator';
11
- export * from './sources/identity';
12
- export * from './sources/ditto';
13
- export * from './sources/store-observer';
14
- export * from './sources/sync';
15
- export * from './sources/sync-subscription';
16
- export * from './sources/error';
17
- export * from './sources/error-codes';
18
- export * from './sources/query-result-item';
19
- export * from './sources/query-result';
20
-
21
- export * from './sources/small-peer-info';
22
- export * from './sources/store';
23
- export * from './sources/presence';
24
- export * from './sources/transport-config';
25
-
26
- export * from './sources/epilogue';
@@ -1,2 +0,0 @@
1
- import * as CBOR from 'cbor-js';
2
- export {CBOR};
@@ -1 +0,0 @@
1
- export * from '../ditto.rn';
@@ -1,2 +0,0 @@
1
-
2
- export * from '../environment/environment.fallback';
@@ -1,54 +0,0 @@
1
- //
2
- // Copyright © 2021 DittoLive Incorporated. All rights reserved.
3
- //
4
-
5
- import type { Attachment } from './attachment'
6
-
7
- /**
8
- * The types of attachment fetch events that can be delivered to an attachment
9
- * fetcher's `callback`.
10
- */
11
- export type AttachmentFetchEventType = 'Completed' | 'Progress' | 'Deleted'
12
-
13
- /**
14
- * An attachment fetch event used when the attachment's download has completed.
15
- */
16
- export type AttachmentFetchEventCompleted = {
17
- type: 'Completed'
18
- attachment: Attachment
19
- }
20
-
21
- /**
22
- * An attachment fetch event used when the attachment's download progressed but
23
- * is not yet complete.
24
- */
25
- export type AttachmentFetchEventProgress = {
26
- type: 'Progress'
27
- totalBytes: number | BigInt
28
- downloadedBytes: number | BigInt
29
- }
30
-
31
- /**
32
- * An attachment fetch event used when the attachment is deleted.
33
- */
34
- export type AttachmentFetchEventDeleted = {
35
- type: 'Deleted'
36
- }
37
-
38
- /**
39
- * A representation of the events that can occur in relation to an attachment
40
- * fetch.
41
- *
42
- * There are three different attachment fetch events: `Completed`, `Progress`,
43
- * or `Deleted`.
44
- *
45
- * There will be at most one `Completed` or `Deleted` event per attachment
46
- * fetch. There can be many `Progress` events delivered for each attachment
47
- * fetch.
48
- *
49
- * Updates relating to an attachment fetch are delivered by registering an
50
- * {@link AttachmentFetcher} through a call to
51
- * {@link Collection.fetchAttachment | fetchAttachment()} on a
52
- * {@link Collection} instance.
53
- */
54
- export type AttachmentFetchEvent = AttachmentFetchEventCompleted | AttachmentFetchEventProgress | AttachmentFetchEventDeleted
@@ -1,129 +0,0 @@
1
- import * as FFI from './ffi'
2
-
3
- import { AttachmentFetcher } from './attachment-fetcher'
4
- import { AttachmentToken } from './attachment-token'
5
- import { Bridge } from './bridge'
6
- import { Ditto } from './ditto'
7
-
8
- import type { AttachmentFetchEvent } from './attachment-fetch-event'
9
-
10
- /** @internal */
11
- type AttachmentFetcherContextInfo = {
12
- attachmentFetcher: WeakRef<AttachmentFetcher>
13
- attachmentTokenID: Uint8Array
14
- id: string
15
- cancelTokenPromise: Promise<unknown | null> | null
16
- }
17
-
18
- /**
19
- * Manages attachment fetchers to make sure we free all resources when the
20
- * fetcher is garbage collected and to allow us to wait for freeing of
21
- * ressources to be finished before the ditto instance is closed.
22
- *
23
- * @internal */
24
- export class AttachmentFetcherManager {
25
- readonly ditto: Ditto
26
-
27
- /** @internal */
28
- constructor(ditto: Ditto) {
29
- this.ditto = ditto
30
- }
31
-
32
- /**
33
- * Start an attachment fetcher.
34
- *
35
- * @internal */
36
- startAttachmentFetcher(token: AttachmentToken, eventHandler?: (attachmentFetchEvent: AttachmentFetchEvent) => void): AttachmentFetcher {
37
- return this.ditto.deferClose(() => {
38
- const attachmentFetcher = new AttachmentFetcher(this.ditto, token, this, eventHandler)
39
-
40
- const contextInfo: AttachmentFetcherContextInfo = {
41
- id: attachmentFetcher.id,
42
- attachmentTokenID: token.id,
43
- cancelTokenPromise: attachmentFetcher.cancelTokenPromise,
44
- attachmentFetcher: new WeakRef(attachmentFetcher),
45
- }
46
- this.finalizationRegistry.register(attachmentFetcher, contextInfo, attachmentFetcher)
47
-
48
- this.contextInfoByID[attachmentFetcher.id] = contextInfo
49
-
50
- const resetCancelToken = () => {
51
- if (this.contextInfoByID[attachmentFetcher.id] != null) {
52
- this.contextInfoByID[attachmentFetcher.id].cancelTokenPromise = null
53
- }
54
- }
55
- attachmentFetcher.attachment.then(
56
- (value) => {
57
- resetCancelToken()
58
- return value
59
- },
60
- (reason) => {
61
- resetCancelToken()
62
- return reason
63
- },
64
- )
65
-
66
- this.ditto.keepAlive.retain(`AttachmentFetcher.${attachmentFetcher.id})`)
67
-
68
- return attachmentFetcher
69
- })
70
- }
71
-
72
- /**
73
- * Stop an attachment fetcher and wait for it to be stopped.
74
- *
75
- * @internal */
76
- async stopAttachmentFetcher(attachmentFetcher: AttachmentFetcher): Promise<void> {
77
- this.finalizationRegistry.unregister(attachmentFetcher)
78
- const contextInfo = this.contextInfoByID[attachmentFetcher.id]
79
- if (contextInfo == null) {
80
- throw new Error(`Internal inconsistency: cannot stop attachment fetcher ${attachmentFetcher.id}, which is not registered.`)
81
- }
82
- await this.stopWithContextInfo(contextInfo)
83
- }
84
-
85
- /**
86
- * Closing the manager will cancel all attachment fetchers.
87
- *
88
- * @internal
89
- */
90
- close() {
91
- this.ditto.deferCloseAsync(async () => {
92
- const contextInfos = Object.values(this.contextInfoByID)
93
- const stopped = contextInfos.map(async (contextInfo) => {
94
- const attachmentFetcher = contextInfo.attachmentFetcher.deref()
95
- if (attachmentFetcher != null) {
96
- await this.stopAttachmentFetcher(attachmentFetcher)
97
- }
98
- })
99
- await Promise.all(stopped)
100
- })
101
- }
102
-
103
- // --- Private ---
104
-
105
- private contextInfoByID: { [attachmentFetcherID: string]: AttachmentFetcherContextInfo } = {}
106
-
107
- private finalizationRegistry: FinalizationRegistry<AttachmentFetcherContextInfo> = new FinalizationRegistry(this.stopWithContextInfo)
108
-
109
- /**
110
- * Stop the attachment fetcher without unregistering it from the finalization
111
- * registry.
112
- */
113
- private stopWithContextInfo(contextInfo: AttachmentFetcherContextInfo): Promise<void> {
114
- const dittoHandle = Bridge.ditto.handleFor(this.ditto)
115
- return this.ditto.deferCloseAsync(async () => {
116
- if (this.contextInfoByID[contextInfo.id] == null) {
117
- throw new Error(`Internal inconsistency: attachment fetcher ${contextInfo.id} not found in active attachment fetchers.`)
118
- }
119
- delete this.contextInfoByID[contextInfo.id]
120
-
121
- this.ditto.keepAlive.release(`AttachmentFetcher.${contextInfo.id})`)
122
-
123
- const cancelToken = await contextInfo.cancelTokenPromise
124
- if (cancelToken) {
125
- FFI.dittoCancelResolveAttachment(dittoHandle.deref(), contextInfo.attachmentTokenID, cancelToken)
126
- }
127
- })
128
- }
129
- }
@@ -1,124 +0,0 @@
1
- //
2
- // Copyright © 2021 DittoLive Incorporated. All rights reserved.
3
- //
4
-
5
- import * as FFI from './ffi'
6
- import { Bridge } from './bridge'
7
- import { Attachment } from './attachment'
8
- import { AttachmentToken } from './attachment-token'
9
- import { generateEphemeralToken, step } from './internal'
10
-
11
- import type { AttachmentFetchEvent } from './attachment-fetch-event'
12
- import type { Ditto } from './ditto'
13
- import type { AttachmentFetcherManager } from './attachment-fetcher-manager'
14
-
15
- /**
16
- * These objects are returned by calls to
17
- * {@link Collection.fetchAttachment | fetchAttachment()} on {@link Collection}
18
- * and allow you to stop an in-flight attachment fetch.
19
- */
20
- export class AttachmentFetcher implements PromiseLike<Attachment | null> {
21
- /**
22
- * Returns a promise for the attachment that you can `await`. The promise
23
- * resolves to either an attachment or `null` if the attachment has been
24
- * deleted meanwhile. The promise is rejected if an error occurs during
25
- * the fetch. Note that the `AttachmentFetcher` itself implementes
26
- * `PromiseLike`, so you can `await` it directly.
27
- */
28
- readonly attachment: Promise<Attachment | null>
29
-
30
- /**
31
- * Stops fetching the associated attachment and cleans up any associated
32
- * resources.
33
- *
34
- * Note that you are not required to call `stop()` once your attachment fetch
35
- * operation has finished. The method primarily exists to allow you to cancel
36
- * an attachment fetch request while it is ongoing if you no longer wish for
37
- * the attachment to be made available locally to the device.
38
- */
39
- stop() {
40
- step(async () => {
41
- await this.manager.stopAttachmentFetcher(this)
42
- if (this.rejectPendingFetch != null) {
43
- this.rejectPendingFetch()
44
- }
45
- })
46
- }
47
-
48
- // --------------------------------------- Internal ------------------------
49
-
50
- /** @internal */
51
- readonly cancelTokenPromise: Promise<unknown | null> | null = null
52
-
53
- /** @internal */
54
- readonly ditto: Ditto
55
-
56
- /** @internal */
57
- readonly id: string
58
-
59
- /** @internal */
60
- readonly manager: AttachmentFetcherManager
61
-
62
- /** @internal */
63
- readonly token: AttachmentToken
64
-
65
- /** @internal */
66
- then<TResult1 = any, TResult2 = never>(onfulfilled?: ((value: any) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): PromiseLike<TResult1 | TResult2> {
67
- return this.attachment.then(onfulfilled, onrejected)
68
- }
69
-
70
- /** @internal */
71
- constructor(ditto: Ditto, token: AttachmentToken, manager: AttachmentFetcherManager, eventHandler?: (attachmentFetchEvent: AttachmentFetchEvent) => void) {
72
- this.ditto = ditto
73
- this.token = token
74
- this.manager = manager
75
- this.id = generateEphemeralToken()
76
-
77
- const eventHandlerOrNoOp = eventHandler || function () {}
78
- const dittoHandle = Bridge.ditto.handleFor(ditto)
79
-
80
- this.attachment = new Promise((resolve, reject) => {
81
- const onComplete = (attachmentHandlePointer: FFI.Pointer<FFI.AttachmentHandle>) => {
82
- const attachment = new Attachment(this.ditto, this.token)
83
- Bridge.attachment.bridge(attachmentHandlePointer, () => attachment)
84
-
85
- eventHandlerOrNoOp({ type: 'Completed', attachment })
86
-
87
- this.rejectPendingFetch = null
88
- resolve(attachment)
89
- }
90
-
91
- const onProgress = (downloaded: number | BigInt, toDownload: number | BigInt) => {
92
- eventHandlerOrNoOp({ type: 'Progress', totalBytes: toDownload, downloadedBytes: downloaded })
93
- }
94
-
95
- const onDelete = () => {
96
- eventHandlerOrNoOp({ type: 'Deleted' })
97
-
98
- this.rejectPendingFetch = null
99
- resolve(null)
100
- }
101
-
102
- const onError = () => {
103
- ;(err: any) => {
104
- this.rejectPendingFetch = null
105
- reject(err)
106
- }
107
- }
108
-
109
- this.rejectPendingFetch = () => {
110
- reject(new Error('Attachment fetch was canceled'))
111
- }
112
-
113
- this.cancelTokenPromise = FFI.dittoResolveAttachment(dittoHandle.deref(), token.id, { onComplete, onProgress, onDelete }, onError)
114
- })
115
- }
116
-
117
- /**
118
- * This function is defined while a fetch is in progress and is used to reject
119
- * the promise `this.attachment` when the fetch is canceled.
120
- *
121
- * @internal
122
- */
123
- private rejectPendingFetch: (() => void) | null = null
124
- }
@@ -1,48 +0,0 @@
1
- //
2
- // Copyright © 2021 DittoLive Incorporated. All rights reserved.
3
- //
4
-
5
- import * as FFI from './ffi'
6
-
7
- /**
8
- * Serves as a token for a specific attachment that you can pass to a call to
9
- * {@link Collection.fetchAttachment | fetchAttachment()} on a
10
- * {@link Collection}.
11
- */
12
- export class AttachmentToken {
13
- /** @internal */
14
- readonly id: Uint8Array
15
-
16
- /** @internal */
17
- readonly len: number
18
-
19
- /** @internal */
20
- readonly metadata: { [key: string]: string }
21
-
22
- /** @internal */
23
- constructor(jsObj: object) {
24
- const type = jsObj[FFI.DittoCRDTTypeKey]
25
- if (type !== FFI.DittoCRDTType.attachment) {
26
- throw new Error('Invalid attachment token')
27
- }
28
-
29
- const id = jsObj['_id']
30
- if (!(id instanceof Uint8Array)) {
31
- throw new Error('Invalid attachment token id')
32
- }
33
-
34
- const len = jsObj['_len']
35
- if (typeof len !== 'number' || len < 0) {
36
- throw new Error('Invalid attachment token length')
37
- }
38
-
39
- const meta = jsObj['_meta']
40
- if (typeof meta !== 'object') {
41
- throw new Error('Invalid attachment token meta')
42
- }
43
-
44
- this.id = id
45
- this.len = len
46
- this.metadata = meta
47
- }
48
- }
@@ -1,59 +0,0 @@
1
- //
2
- // Copyright © 2021 DittoLive Incorporated. All rights reserved.
3
- //
4
-
5
- import * as FFI from './ffi'
6
- import { Bridge } from './bridge'
7
- import * as Environment from './@environment'
8
-
9
- import type { Ditto } from './ditto'
10
- import type { AttachmentToken } from './attachment-token'
11
-
12
- /**
13
- * Represents an attachment and can be used to insert the associated attachment
14
- * into a document at a specific key-path. You can't instantiate an attachment
15
- * directly, please use the {@link Collection.newAttachment | newAttachment()}
16
- * method of {@link Collection} instead.
17
- */
18
- export class Attachment {
19
- /** @internal */
20
- readonly ditto: Ditto
21
-
22
- /** @internal */
23
- readonly token: AttachmentToken
24
-
25
- /** The attachment's metadata. */
26
- get metadata(): { [key: string]: string } {
27
- return this.token.metadata
28
- }
29
-
30
- /**
31
- * Returns the attachment's data.
32
- */
33
- getData(): Promise<Uint8Array> {
34
- const ditto = this.ditto
35
- const dittoHandle = Bridge.ditto.handleFor(ditto)
36
- return this.ditto.deferCloseAsync(async () => {
37
- })
38
- }
39
-
40
- /**
41
- * Copies the attachment to the specified file path. Node-only,
42
- * throws in the browser.
43
- *
44
- * @param path The path that the attachment should be copied to.
45
- */
46
- copyToPath(path: string): Promise<void> {
47
- const ditto = this.ditto
48
- const dittoHandle = Bridge.ditto.handleFor(ditto)
49
- return this.ditto.deferCloseAsync(async () => {
50
-
51
- })
52
- }
53
-
54
- /** @internal */
55
- constructor(ditto: Ditto, token: AttachmentToken) {
56
- this.ditto = ditto
57
- this.token = token
58
- }
59
- }