@metarouter/react-native-sdk 0.1.16 → 0.1.17

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 (276) hide show
  1. package/README.md +49 -22
  2. package/lib/MetaRouter.d.ts +2 -24
  3. package/lib/MetaRouter.d.ts.map +1 -1
  4. package/lib/MetaRouter.js +5 -52
  5. package/lib/analytics/IdentityManager.d.ts +14 -0
  6. package/lib/analytics/IdentityManager.d.ts.map +1 -0
  7. package/lib/analytics/IdentityManager.js +38 -0
  8. package/lib/analytics/MetaRouterAnalyticsClient.d.ts +45 -0
  9. package/lib/analytics/MetaRouterAnalyticsClient.d.ts.map +1 -0
  10. package/lib/analytics/MetaRouterAnalyticsClient.js +127 -0
  11. package/lib/analytics/enrichEvent.d.ts +3 -0
  12. package/lib/analytics/enrichEvent.d.ts.map +1 -0
  13. package/lib/analytics/enrichEvent.js +14 -0
  14. package/lib/analytics/init.d.ts +5 -0
  15. package/lib/analytics/init.d.ts.map +1 -0
  16. package/lib/analytics/init.js +32 -0
  17. package/lib/analytics/proxy/proxyClient.d.ts +4 -0
  18. package/lib/analytics/proxy/proxyClient.d.ts.map +1 -0
  19. package/lib/{proxyClient.js → analytics/proxy/proxyClient.js} +3 -4
  20. package/lib/analytics/types.d.ts +52 -0
  21. package/lib/analytics/types.d.ts.map +1 -0
  22. package/lib/analytics/types.js +1 -0
  23. package/lib/analytics/utils/anonymousId.d.ts +2 -0
  24. package/lib/analytics/utils/anonymousId.d.ts.map +1 -0
  25. package/lib/analytics/utils/anonymousId.js +11 -0
  26. package/lib/analytics/utils/contextInfo.d.ts +19 -0
  27. package/lib/analytics/utils/contextInfo.d.ts.map +1 -0
  28. package/lib/analytics/utils/contextInfo.js +35 -0
  29. package/lib/analytics/utils/logger.d.ts +4 -0
  30. package/lib/analytics/utils/logger.d.ts.map +1 -0
  31. package/lib/analytics/utils/logger.js +12 -0
  32. package/lib/analytics/utils/retry.d.ts +2 -0
  33. package/lib/analytics/utils/retry.d.ts.map +1 -0
  34. package/lib/analytics/utils/retry.js +17 -0
  35. package/lib/analytics/utils/timezone.d.ts +2 -0
  36. package/lib/analytics/utils/timezone.d.ts.map +1 -0
  37. package/lib/analytics/utils/timezone.js +8 -0
  38. package/lib/index.d.ts +6 -2
  39. package/lib/index.d.ts.map +1 -1
  40. package/lib/index.js +4 -2
  41. package/lib/react/context.d.ts +9 -0
  42. package/lib/react/context.d.ts.map +1 -0
  43. package/lib/react/context.js +12 -0
  44. package/lib/react/useMetaRouter.d.ts +3 -0
  45. package/lib/react/useMetaRouter.d.ts.map +1 -0
  46. package/lib/react/useMetaRouter.js +8 -0
  47. package/lib/types.d.ts +9 -0
  48. package/lib/types.d.ts.map +1 -0
  49. package/lib/types.js +1 -0
  50. package/package.json +11 -12
  51. package/MetaRouterReactNativeSDK.podspec +0 -26
  52. package/android/build/generated/ksp/debug/java/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl.java +0 -244
  53. package/android/build/generated/ksp/debug/java/com/reactnativecommunity/asyncstorage/next/StorageDb_Impl.java +0 -165
  54. package/android/build/generated/source/buildConfig/debug/com/metarouter/reactnativesdk/BuildConfig.java +0 -10
  55. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -7
  56. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
  57. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
  58. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
  59. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  60. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  61. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  62. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
  63. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
  64. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/metarouter/reactnativesdk/BuildConfig.class +0 -0
  65. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/metarouter/reactnativesdk/MetaRouterReactNativeSDKPackage.class +0 -0
  66. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncLocalStorageUtil.class +0 -0
  67. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageErrorUtil.class +0 -0
  68. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageExpoMigration.class +0 -0
  69. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$1.class +0 -0
  70. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$2.class +0 -0
  71. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$3.class +0 -0
  72. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$4.class +0 -0
  73. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$5.class +0 -0
  74. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$6.class +0 -0
  75. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule.class +0 -0
  76. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStoragePackage$1.class +0 -0
  77. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStoragePackage.class +0 -0
  78. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/BuildConfig.class +0 -0
  79. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/NativeAsyncStorageModuleSpec.class +0 -0
  80. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/ReactDatabaseSupplier.class +0 -0
  81. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/SerialExecutor$1.class +0 -0
  82. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/SerialExecutor.class +0 -0
  83. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$1.class +0 -0
  84. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$2.class +0 -0
  85. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$3.class +0 -0
  86. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$4.class +0 -0
  87. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$5.class +0 -0
  88. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$6.class +0 -0
  89. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$7.class +0 -0
  90. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl.class +0 -0
  91. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDb_Impl$1.class +0 -0
  92. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDb_Impl.class +0 -0
  93. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/org/linusu/RNGetRandomValuesModule.class +0 -0
  94. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/org/linusu/RNGetRandomValuesPackage.class +0 -0
  95. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -2
  96. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -7
  97. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -7
  98. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
  99. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
  100. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -1
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  109. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  110. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  111. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  112. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  113. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  119. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  120. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  121. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  122. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  123. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  124. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  125. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  126. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  127. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  128. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  129. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  130. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  131. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  132. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  133. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  134. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  135. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  136. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab +0 -0
  137. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream +0 -0
  138. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream.len +0 -0
  139. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.len +0 -0
  140. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.values.at +0 -0
  141. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i +0 -0
  142. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i.len +0 -0
  143. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
  144. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream +0 -0
  145. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len +0 -0
  146. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len +0 -0
  147. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
  148. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i +0 -0
  149. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len +0 -0
  150. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  151. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  152. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  153. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  154. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  155. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  156. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  157. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  158. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  159. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  160. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  161. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  162. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  163. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  164. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  165. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  166. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  167. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  168. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  169. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  170. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  171. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  172. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  173. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  174. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  175. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  176. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  177. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  178. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
  179. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  180. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  181. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  182. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  183. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  184. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  185. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  186. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  187. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  188. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  189. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  190. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  191. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  192. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  193. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  194. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  195. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  196. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  197. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  198. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  199. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  200. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  201. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  202. package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -16
  203. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  204. package/android/build/tmp/kotlin-classes/debug/META-INF/metarouter_react-native-sdk_debug.kotlin_module +0 -0
  205. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/ArgumentHelpersKt.class +0 -0
  206. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/AsyncStorageAccess.class +0 -0
  207. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/AsyncStorageError$Companion.class +0 -0
  208. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/AsyncStorageError.class +0 -0
  209. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/Entry.class +0 -0
  210. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/ErrorHelpersKt$createExceptionHandler$$inlined$CoroutineExceptionHandler$1.class +0 -0
  211. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/ErrorHelpersKt.class +0 -0
  212. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/MIGRATION_TO_NEXT.class +0 -0
  213. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageDao$DefaultImpls.class +0 -0
  214. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageDao$mergeValues$1.class +0 -0
  215. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageDao.class +0 -0
  216. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageDb$Companion.class +0 -0
  217. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageDb.class +0 -0
  218. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$Companion.class +0 -0
  219. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$clear$1.class +0 -0
  220. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$getAllKeys$1.class +0 -0
  221. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$multiGet$1.class +0 -0
  222. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$multiMerge$1.class +0 -0
  223. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$multiRemove$1.class +0 -0
  224. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$multiSet$1.class +0 -0
  225. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule.class +0 -0
  226. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageSupplier$Companion.class +0 -0
  227. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageSupplier.class +0 -0
  228. package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageSupplierKt.class +0 -0
  229. package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/AnalyticsReactNativeModule$onInitialized$1.class +0 -0
  230. package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/AnalyticsReactNativeModule$toHexString$1.class +0 -0
  231. package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/AnalyticsReactNativeModule.class +0 -0
  232. package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/AnalyticsReactNativePackage$createNativeModules$1.class +0 -0
  233. package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/AnalyticsReactNativePackage.class +0 -0
  234. package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/ConnectionType.class +0 -0
  235. package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/Sovran$Action.class +0 -0
  236. package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/Sovran$createNativeModules$1.class +0 -0
  237. package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/Sovran.class +0 -0
  238. package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/SovranModule$Companion.class +0 -0
  239. package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/SovranModule$onInitialized$1.class +0 -0
  240. package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/SovranModule.class +0 -0
  241. package/android/build.gradle +0 -55
  242. package/android/consumer-rules.pro +0 -0
  243. package/android/src/main/java/com/metarouter/reactnativesdk/MetaRouterReactNativeSDKPackage.java +0 -54
  244. package/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncLocalStorageUtil.java +0 -178
  245. package/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageErrorUtil.java +0 -45
  246. package/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageExpoMigration.java +0 -154
  247. package/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageModule.java +0 -410
  248. package/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStoragePackage.java +0 -93
  249. package/android/src/main/java/com/reactnativecommunity/asyncstorage/BuildConfig.java +0 -8
  250. package/android/src/main/java/com/reactnativecommunity/asyncstorage/NativeAsyncStorageModuleSpec.java +0 -47
  251. package/android/src/main/java/com/reactnativecommunity/asyncstorage/ReactDatabaseSupplier.java +0 -163
  252. package/android/src/main/java/com/reactnativecommunity/asyncstorage/SerialExecutor.java +0 -40
  253. package/android/src/main/java/com/reactnativecommunity/asyncstorage/build.gradle +0 -122
  254. package/android/src/main/java/com/reactnativecommunity/asyncstorage/config.gradle +0 -125
  255. package/android/src/main/java/com/reactnativecommunity/asyncstorage/next/ArgumentHelpers.kt +0 -86
  256. package/android/src/main/java/com/reactnativecommunity/asyncstorage/next/ErrorHelpers.kt +0 -39
  257. package/android/src/main/java/com/reactnativecommunity/asyncstorage/next/StorageModule.kt +0 -94
  258. package/android/src/main/java/com/reactnativecommunity/asyncstorage/next/StorageSupplier.kt +0 -161
  259. package/android/src/main/java/com/segmentanalyticsreactnative/AnalyticsReactNativeModule.kt +0 -267
  260. package/android/src/main/java/com/segmentanalyticsreactnative/AnalyticsReactNativePackage.kt +0 -43
  261. package/android/src/main/java/com/sovranreactnative/Sovran.kt +0 -45
  262. package/android/src/main/java/com/sovranreactnative/SovranModule.kt +0 -55
  263. package/android/src/main/java/org/linusu/RNGetRandomValuesModule.java +0 -36
  264. package/android/src/main/java/org/linusu/RNGetRandomValuesPackage.java +0 -28
  265. package/lib/MetaRouterPlugin.d.ts +0 -10
  266. package/lib/MetaRouterPlugin.d.ts.map +0 -1
  267. package/lib/MetaRouterPlugin.js +0 -23
  268. package/lib/context.d.ts +0 -8
  269. package/lib/context.d.ts.map +0 -1
  270. package/lib/context.js +0 -9
  271. package/lib/createMetaRouterClient.d.ts +0 -3
  272. package/lib/createMetaRouterClient.d.ts.map +0 -1
  273. package/lib/createMetaRouterClient.js +0 -7
  274. package/lib/proxyClient.d.ts +0 -4
  275. package/lib/proxyClient.d.ts.map +0 -1
  276. package/react-native.config.js +0 -37
@@ -0,0 +1,19 @@
1
+ export declare function getContextInfo(): {
2
+ library: {
3
+ name: string;
4
+ version: string;
5
+ };
6
+ locale: string;
7
+ timezone: string;
8
+ device: {
9
+ manufacturer: any;
10
+ model: any;
11
+ osName: any;
12
+ osVersion: any;
13
+ };
14
+ app: {
15
+ version: any;
16
+ build: any;
17
+ };
18
+ };
19
+ //# sourceMappingURL=contextInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contextInfo.d.ts","sourceRoot":"","sources":["../../../src/analytics/utils/contextInfo.ts"],"names":[],"mappings":"AAUA,wBAAgB,cAAc;;;;;;;;;;;;;;;;;EA0B7B"}
@@ -0,0 +1,35 @@
1
+ import { getTimeZone } from './timezone';
2
+ import pkg from '../../../package.json';
3
+ let DeviceInfo = null;
4
+ try {
5
+ DeviceInfo = require('react-native-device-info');
6
+ }
7
+ catch {
8
+ DeviceInfo = null;
9
+ }
10
+ export function getContextInfo() {
11
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
12
+ let locale = 'en-US';
13
+ if (typeof Intl !== 'undefined' && typeof Intl.DateTimeFormat === 'function') {
14
+ const resolved = Intl.DateTimeFormat().resolvedOptions();
15
+ locale = (_a = resolved.locale) !== null && _a !== void 0 ? _a : locale;
16
+ }
17
+ return {
18
+ library: {
19
+ name: 'metarouter-react-native-sdk',
20
+ version: (_b = pkg.version) !== null && _b !== void 0 ? _b : '0.0.0',
21
+ },
22
+ locale,
23
+ timezone: getTimeZone(),
24
+ device: {
25
+ manufacturer: (_d = (_c = DeviceInfo === null || DeviceInfo === void 0 ? void 0 : DeviceInfo.getManufacturer) === null || _c === void 0 ? void 0 : _c.call(DeviceInfo)) !== null && _d !== void 0 ? _d : 'unknown',
26
+ model: (_f = (_e = DeviceInfo === null || DeviceInfo === void 0 ? void 0 : DeviceInfo.getModel) === null || _e === void 0 ? void 0 : _e.call(DeviceInfo)) !== null && _f !== void 0 ? _f : 'unknown',
27
+ osName: (_h = (_g = DeviceInfo === null || DeviceInfo === void 0 ? void 0 : DeviceInfo.getSystemName) === null || _g === void 0 ? void 0 : _g.call(DeviceInfo)) !== null && _h !== void 0 ? _h : 'unknown',
28
+ osVersion: (_k = (_j = DeviceInfo === null || DeviceInfo === void 0 ? void 0 : DeviceInfo.getSystemVersion) === null || _j === void 0 ? void 0 : _j.call(DeviceInfo)) !== null && _k !== void 0 ? _k : 'unknown',
29
+ },
30
+ app: {
31
+ version: (_o = (_m = (_l = DeviceInfo === null || DeviceInfo === void 0 ? void 0 : DeviceInfo.getVersion) === null || _l === void 0 ? void 0 : _l.call(DeviceInfo)) !== null && _m !== void 0 ? _m : pkg.version) !== null && _o !== void 0 ? _o : 'unknown',
32
+ build: (_q = (_p = DeviceInfo === null || DeviceInfo === void 0 ? void 0 : DeviceInfo.getBuildNumber) === null || _p === void 0 ? void 0 : _p.call(DeviceInfo)) !== null && _q !== void 0 ? _q : 'unknown',
33
+ },
34
+ };
35
+ }
@@ -0,0 +1,4 @@
1
+ export declare function setDebugLogging(value: boolean): void;
2
+ export declare function log(...args: any[]): void;
3
+ export declare function warn(...args: any[]): void;
4
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/analytics/utils/logger.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,QAE7C;AAED,wBAAgB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,QAEjC;AAED,wBAAgB,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,QAElC"}
@@ -0,0 +1,12 @@
1
+ let enabled = false;
2
+ export function setDebugLogging(value) {
3
+ enabled = value;
4
+ }
5
+ export function log(...args) {
6
+ if (enabled)
7
+ console.log('[MetaRouter]', ...args);
8
+ }
9
+ export function warn(...args) {
10
+ if (enabled)
11
+ console.warn('[MetaRouter]', ...args);
12
+ }
@@ -0,0 +1,2 @@
1
+ export declare function retryWithBackoff<T>(fn: () => Promise<T>, retries?: number, baseDelayMs?: number, sleep?: (ms: number) => Promise<unknown>): Promise<T>;
2
+ //# sourceMappingURL=retry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../../src/analytics/utils/retry.ts"],"names":[],"mappings":"AAAA,wBAAsB,gBAAgB,CAAC,CAAC,EACpC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,OAAO,SAAI,EACX,WAAW,SAAO,EAClB,KAAK,IAAI,IAAI,MAAM,qBAA8C,GAChE,OAAO,CAAC,CAAC,CAAC,CAiBZ"}
@@ -0,0 +1,17 @@
1
+ export async function retryWithBackoff(fn, retries = 5, baseDelayMs = 1000, sleep = (ms) => new Promise((res) => setTimeout(res, ms))) {
2
+ let attempt = 0;
3
+ while (attempt < retries) {
4
+ try {
5
+ return await fn();
6
+ }
7
+ catch (err) {
8
+ attempt++;
9
+ if (attempt === retries)
10
+ throw err;
11
+ const jitter = Math.random() * 100;
12
+ const delay = baseDelayMs * 2 ** (attempt - 1) + jitter;
13
+ await sleep(delay);
14
+ }
15
+ }
16
+ throw new Error('Exhausted all retries');
17
+ }
@@ -0,0 +1,2 @@
1
+ export declare function getTimeZone(): string;
2
+ //# sourceMappingURL=timezone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timezone.d.ts","sourceRoot":"","sources":["../../../src/analytics/utils/timezone.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,IAAI,MAAM,CAMlC"}
@@ -0,0 +1,8 @@
1
+ export function getTimeZone() {
2
+ try {
3
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
4
+ }
5
+ catch {
6
+ return 'UTC';
7
+ }
8
+ }
package/lib/index.d.ts CHANGED
@@ -1,3 +1,7 @@
1
- export { createMetaRouterClient } from "./createMetaRouterClient";
2
- export { MetaRouterProvider, useMetaRouter } from "./context";
1
+ import { MetaRouter } from "./MetaRouter";
2
+ export default MetaRouter;
3
+ export { MetaRouter };
4
+ export { MetaRouterProvider, useMetaRouter } from "./react/context";
5
+ export type { InitOptions, AnalyticsInterface } from "./analytics/types";
6
+ export type { MetaRouterInterface } from "./types";
3
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACpE,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACzE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC"}
package/lib/index.js CHANGED
@@ -1,2 +1,4 @@
1
- export { createMetaRouterClient } from "./createMetaRouterClient";
2
- export { MetaRouterProvider, useMetaRouter } from "./context";
1
+ import { MetaRouter } from "./MetaRouter";
2
+ export default MetaRouter;
3
+ export { MetaRouter };
4
+ export { MetaRouterProvider, useMetaRouter } from "./react/context";
@@ -0,0 +1,9 @@
1
+ import React, { ReactNode } from "react";
2
+ import type { MetaRouterInterface } from "../types";
3
+ export declare const MetaRouterContext: React.Context<MetaRouterInterface | null>;
4
+ export declare const MetaRouterProvider: ({ children, instance, }: {
5
+ children: ReactNode;
6
+ instance: MetaRouterInterface;
7
+ }) => React.JSX.Element;
8
+ export declare const useMetaRouter: () => MetaRouterInterface;
9
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/react/context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,eAAO,MAAM,iBAAiB,2CAE7B,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,yBAGhC;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,mBAAmB,CAAC;CAC/B,sBAMA,CAAC;AAEF,eAAO,MAAM,aAAa,QAAO,mBAMhC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import React, { createContext, useContext } from "react";
2
+ export const MetaRouterContext = createContext(null);
3
+ export const MetaRouterProvider = ({ children, instance, }) => {
4
+ return (React.createElement(MetaRouterContext.Provider, { value: instance }, children));
5
+ };
6
+ export const useMetaRouter = () => {
7
+ const ctx = useContext(MetaRouterContext);
8
+ if (!ctx) {
9
+ throw new Error("useMetaRouter must be used within a MetaRouterProvider");
10
+ }
11
+ return ctx;
12
+ };
@@ -0,0 +1,3 @@
1
+ import { MetaRouter } from "../MetaRouter";
2
+ export declare const useMetaRouter: () => typeof MetaRouter;
3
+ //# sourceMappingURL=useMetaRouter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMetaRouter.d.ts","sourceRoot":"","sources":["../../src/react/useMetaRouter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,eAAO,MAAM,aAAa,QAAO,OAAO,UAKrC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { useContext } from "react";
2
+ import { MetaRouterContext } from "./context";
3
+ export const useMetaRouter = () => {
4
+ const ctx = useContext(MetaRouterContext);
5
+ if (!ctx)
6
+ throw new Error("useMetaRouter must be used within MetaRouterProvider");
7
+ return ctx;
8
+ };
package/lib/types.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ import type { InitOptions, AnalyticsInterface } from "./analytics/types";
2
+ export interface MetaRouterInterface {
3
+ analytics: {
4
+ init: (opts: InitOptions) => Promise<AnalyticsInterface>;
5
+ getClient: () => AnalyticsInterface;
6
+ reset: () => Promise<void>;
7
+ };
8
+ }
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE;QACT,IAAI,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;QACzD,SAAS,EAAE,MAAM,kBAAkB,CAAC;QACpC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;KAC5B,CAAC;CACH"}
package/lib/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metarouter/react-native-sdk",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "exports": {
@@ -8,20 +8,17 @@
8
8
  "import": "./lib/index.js",
9
9
  "require": "./lib/index.js",
10
10
  "types": "./lib/index.d.ts"
11
- },
12
- "./react-native.config.js": "./react-native.config.js"
11
+ }
13
12
  },
14
13
  "files": [
15
14
  "lib",
16
- "react-native.config.js",
17
- "MetaRouterReactNativeSDK.podspec",
18
- "android"
15
+ "react-native.config.js"
19
16
  ],
20
17
  "scripts": {
21
18
  "clean": "rm -rf lib",
22
19
  "build": "tsc --project tsconfig.build.json",
23
20
  "prepare": "npm run build",
24
- "prePublish": "npm run clean && npm run build",
21
+ "prePublishOnly": "npm run clean && npm run build",
25
22
  "test": "jest"
26
23
  },
27
24
  "publishConfig": {
@@ -39,19 +36,21 @@
39
36
  "url": "https://github.com/metarouterio/react-native-sdk"
40
37
  },
41
38
  "dependencies": {
42
- "@react-native-async-storage/async-storage": "^2.2.0",
43
- "@segment/analytics-react-native": "^2.21.2",
44
- "@segment/sovran-react-native": "^1.1.3",
45
- "react-native-get-random-values": "^1.11.0"
39
+ "uuid": "^11.1.0"
46
40
  },
47
41
  "peerDependencies": {
42
+ "@react-native-async-storage/async-storage": ">=2.2.0",
48
43
  "react": "*",
49
- "react-native": "*"
44
+ "react-native": "*",
45
+ "react-native-device-info": "^14.0.4"
50
46
  },
51
47
  "devDependencies": {
48
+ "@react-native-async-storage/async-storage": ">=2.2.0",
49
+ "@types/jest": "^30.0.0",
52
50
  "@types/react": "^19.1.8",
53
51
  "jest": "^30.0.4",
54
52
  "metro-react-native-babel-preset": "^0.77.0",
53
+ "react-native-device-info": "^14.0.4",
55
54
  "typescript": "^5.8.3"
56
55
  },
57
56
  "react-native": "./lib/index.js"
@@ -1,26 +0,0 @@
1
- Pod::Spec.new do |s|
2
- s.name = 'MetaRouterReactNativeSDK'
3
- s.version = '0.1.0'
4
- s.summary = 'MetaRouter analytics wrapper for React Native'
5
- s.description = 'MetaRouter analytics SDK that handles event routing.'
6
- s.license = { :type => 'MIT', :file => 'LICENSE' }
7
- s.authors = { 'Chris Houdlette' => 'chris@example.com' }
8
- s.homepage = 'https://github.com/metarouterio/react-native-sdk'
9
- s.source = { :git => 'https://github.com/metarouterio/react-native-sdk.git', :tag => s.version.to_s }
10
-
11
- s.platform = :ios, '12.0'
12
- s.requires_arc = true
13
- s.swift_version = '5.0'
14
-
15
- # No need to manually specify source_files if your SDK has no native code
16
- # s.source_files = 'ios/**/*.{h,m,mm,swift}'
17
-
18
- # React Native internals
19
- s.dependency 'React-Core'
20
-
21
- # Real native dependencies that you want CocoaPods to fetch and install
22
- s.dependency 'AnalyticsReactNative', '~> 2.21.2'
23
- s.dependency 'SovranReactNative', '~> 1.1.3'
24
- s.dependency 'react-native-get-random-values', '~> 1.11.0'
25
- s.dependency 'RNCAsyncStorage', '~> 2.2.0'
26
- end
@@ -1,244 +0,0 @@
1
- package com.reactnativecommunity.asyncstorage.next;
2
-
3
- import android.database.Cursor;
4
- import android.os.CancellationSignal;
5
- import androidx.room.CoroutinesRoom;
6
- import androidx.room.EntityInsertionAdapter;
7
- import androidx.room.RoomDatabase;
8
- import androidx.room.RoomDatabaseKt;
9
- import androidx.room.RoomSQLiteQuery;
10
- import androidx.room.SharedSQLiteStatement;
11
- import androidx.room.util.CursorUtil;
12
- import androidx.room.util.DBUtil;
13
- import androidx.room.util.StringUtil;
14
- import androidx.sqlite.db.SupportSQLiteStatement;
15
- import java.lang.Class;
16
- import java.lang.Exception;
17
- import java.lang.Object;
18
- import java.lang.Override;
19
- import java.lang.String;
20
- import java.lang.StringBuilder;
21
- import java.lang.SuppressWarnings;
22
- import java.util.ArrayList;
23
- import java.util.Collections;
24
- import java.util.List;
25
- import java.util.concurrent.Callable;
26
- import kotlin.Unit;
27
- import kotlin.coroutines.Continuation;
28
-
29
- @SuppressWarnings({"unchecked", "deprecation"})
30
- public final class StorageDao_Impl implements StorageDao {
31
- private final RoomDatabase __db;
32
-
33
- private final EntityInsertionAdapter<Entry> __insertionAdapterOfEntry;
34
-
35
- private final SharedSQLiteStatement __preparedStmtOfClear;
36
-
37
- public StorageDao_Impl(RoomDatabase __db) {
38
- this.__db = __db;
39
- this.__insertionAdapterOfEntry = new EntityInsertionAdapter<Entry>(__db) {
40
- @Override
41
- public String createQuery() {
42
- return "INSERT OR REPLACE INTO `Storage` (`key`,`value`) VALUES (?,?)";
43
- }
44
-
45
- @Override
46
- public void bind(SupportSQLiteStatement stmt, Entry value) {
47
- if (value.getKey() == null) {
48
- stmt.bindNull(1);
49
- } else {
50
- stmt.bindString(1, value.getKey());
51
- }
52
- if (value.getValue() == null) {
53
- stmt.bindNull(2);
54
- } else {
55
- stmt.bindString(2, value.getValue());
56
- }
57
- }
58
- };
59
- this.__preparedStmtOfClear = new SharedSQLiteStatement(__db) {
60
- @Override
61
- public String createQuery() {
62
- final String _query = "DELETE FROM Storage";
63
- return _query;
64
- }
65
- };
66
- }
67
-
68
- @Override
69
- public Object setValues(final List<Entry> entries,
70
- final Continuation<? super Unit> continuation) {
71
- return CoroutinesRoom.execute(__db, true, new Callable<Unit>() {
72
- @Override
73
- public Unit call() throws Exception {
74
- __db.beginTransaction();
75
- try {
76
- __insertionAdapterOfEntry.insert(entries);
77
- __db.setTransactionSuccessful();
78
- return Unit.INSTANCE;
79
- } finally {
80
- __db.endTransaction();
81
- }
82
- }
83
- }, continuation);
84
- }
85
-
86
- @Override
87
- public Object mergeValues(final List<Entry> entries,
88
- final Continuation<? super Unit> continuation) {
89
- return RoomDatabaseKt.withTransaction(__db, (__cont) -> StorageDao.DefaultImpls.mergeValues(StorageDao_Impl.this, entries, __cont), continuation);
90
- }
91
-
92
- @Override
93
- public Object clear(final Continuation<? super Unit> continuation) {
94
- return CoroutinesRoom.execute(__db, true, new Callable<Unit>() {
95
- @Override
96
- public Unit call() throws Exception {
97
- final SupportSQLiteStatement _stmt = __preparedStmtOfClear.acquire();
98
- __db.beginTransaction();
99
- try {
100
- _stmt.executeUpdateDelete();
101
- __db.setTransactionSuccessful();
102
- return Unit.INSTANCE;
103
- } finally {
104
- __db.endTransaction();
105
- __preparedStmtOfClear.release(_stmt);
106
- }
107
- }
108
- }, continuation);
109
- }
110
-
111
- @Override
112
- public Object getValues(final List<String> keys,
113
- final Continuation<? super List<Entry>> continuation) {
114
- StringBuilder _stringBuilder = StringUtil.newStringBuilder();
115
- _stringBuilder.append("SELECT * FROM Storage WHERE `key` IN (");
116
- final int _inputSize = keys.size();
117
- StringUtil.appendPlaceholders(_stringBuilder, _inputSize);
118
- _stringBuilder.append(")");
119
- final String _sql = _stringBuilder.toString();
120
- final int _argCount = 0 + _inputSize;
121
- final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, _argCount);
122
- int _argIndex = 1;
123
- for (String _item : keys) {
124
- if (_item == null) {
125
- _statement.bindNull(_argIndex);
126
- } else {
127
- _statement.bindString(_argIndex, _item);
128
- }
129
- _argIndex ++;
130
- }
131
- final CancellationSignal _cancellationSignal = DBUtil.createCancellationSignal();
132
- return CoroutinesRoom.execute(__db, true, _cancellationSignal, new Callable<List<Entry>>() {
133
- @Override
134
- public List<Entry> call() throws Exception {
135
- __db.beginTransaction();
136
- try {
137
- final Cursor _cursor = DBUtil.query(__db, _statement, false, null);
138
- try {
139
- final int _cursorIndexOfKey = CursorUtil.getColumnIndexOrThrow(_cursor, "key");
140
- final int _cursorIndexOfValue = CursorUtil.getColumnIndexOrThrow(_cursor, "value");
141
- final List<Entry> _result = new ArrayList<Entry>(_cursor.getCount());
142
- while(_cursor.moveToNext()) {
143
- final Entry _item_1;
144
- final String _tmpKey;
145
- if (_cursor.isNull(_cursorIndexOfKey)) {
146
- _tmpKey = null;
147
- } else {
148
- _tmpKey = _cursor.getString(_cursorIndexOfKey);
149
- }
150
- final String _tmpValue;
151
- if (_cursor.isNull(_cursorIndexOfValue)) {
152
- _tmpValue = null;
153
- } else {
154
- _tmpValue = _cursor.getString(_cursorIndexOfValue);
155
- }
156
- _item_1 = new Entry(_tmpKey,_tmpValue);
157
- _result.add(_item_1);
158
- }
159
- __db.setTransactionSuccessful();
160
- return _result;
161
- } finally {
162
- _cursor.close();
163
- _statement.release();
164
- }
165
- } finally {
166
- __db.endTransaction();
167
- }
168
- }
169
- }, continuation);
170
- }
171
-
172
- @Override
173
- public Object getKeys(final Continuation<? super List<String>> continuation) {
174
- final String _sql = "SELECT `key` FROM Storage";
175
- final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, 0);
176
- final CancellationSignal _cancellationSignal = DBUtil.createCancellationSignal();
177
- return CoroutinesRoom.execute(__db, true, _cancellationSignal, new Callable<List<String>>() {
178
- @Override
179
- public List<String> call() throws Exception {
180
- __db.beginTransaction();
181
- try {
182
- final Cursor _cursor = DBUtil.query(__db, _statement, false, null);
183
- try {
184
- final List<String> _result = new ArrayList<String>(_cursor.getCount());
185
- while(_cursor.moveToNext()) {
186
- final String _item;
187
- if (_cursor.isNull(0)) {
188
- _item = null;
189
- } else {
190
- _item = _cursor.getString(0);
191
- }
192
- _result.add(_item);
193
- }
194
- __db.setTransactionSuccessful();
195
- return _result;
196
- } finally {
197
- _cursor.close();
198
- _statement.release();
199
- }
200
- } finally {
201
- __db.endTransaction();
202
- }
203
- }
204
- }, continuation);
205
- }
206
-
207
- @Override
208
- public Object removeValues(final List<String> keys,
209
- final Continuation<? super Unit> continuation) {
210
- return CoroutinesRoom.execute(__db, true, new Callable<Unit>() {
211
- @Override
212
- public Unit call() throws Exception {
213
- StringBuilder _stringBuilder = StringUtil.newStringBuilder();
214
- _stringBuilder.append("DELETE FROM Storage WHERE `key` in (");
215
- final int _inputSize = keys.size();
216
- StringUtil.appendPlaceholders(_stringBuilder, _inputSize);
217
- _stringBuilder.append(")");
218
- final String _sql = _stringBuilder.toString();
219
- final SupportSQLiteStatement _stmt = __db.compileStatement(_sql);
220
- int _argIndex = 1;
221
- for (String _item : keys) {
222
- if (_item == null) {
223
- _stmt.bindNull(_argIndex);
224
- } else {
225
- _stmt.bindString(_argIndex, _item);
226
- }
227
- _argIndex ++;
228
- }
229
- __db.beginTransaction();
230
- try {
231
- _stmt.executeUpdateDelete();
232
- __db.setTransactionSuccessful();
233
- return Unit.INSTANCE;
234
- } finally {
235
- __db.endTransaction();
236
- }
237
- }
238
- }, continuation);
239
- }
240
-
241
- public static List<Class<?>> getRequiredConverters() {
242
- return Collections.emptyList();
243
- }
244
- }