@metarouter/react-native-sdk 0.1.15 → 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.
- package/README.md +49 -22
- package/lib/MetaRouter.d.ts +2 -24
- package/lib/MetaRouter.d.ts.map +1 -1
- package/lib/MetaRouter.js +5 -52
- package/lib/analytics/IdentityManager.d.ts +14 -0
- package/lib/analytics/IdentityManager.d.ts.map +1 -0
- package/lib/analytics/IdentityManager.js +38 -0
- package/lib/analytics/MetaRouterAnalyticsClient.d.ts +45 -0
- package/lib/analytics/MetaRouterAnalyticsClient.d.ts.map +1 -0
- package/lib/analytics/MetaRouterAnalyticsClient.js +127 -0
- package/lib/analytics/enrichEvent.d.ts +3 -0
- package/lib/analytics/enrichEvent.d.ts.map +1 -0
- package/lib/analytics/enrichEvent.js +14 -0
- package/lib/analytics/init.d.ts +5 -0
- package/lib/analytics/init.d.ts.map +1 -0
- package/lib/analytics/init.js +32 -0
- package/lib/analytics/proxy/proxyClient.d.ts +4 -0
- package/lib/analytics/proxy/proxyClient.d.ts.map +1 -0
- package/lib/{proxyClient.js → analytics/proxy/proxyClient.js} +3 -4
- package/lib/analytics/types.d.ts +52 -0
- package/lib/analytics/types.d.ts.map +1 -0
- package/lib/analytics/types.js +1 -0
- package/lib/analytics/utils/anonymousId.d.ts +2 -0
- package/lib/analytics/utils/anonymousId.d.ts.map +1 -0
- package/lib/analytics/utils/anonymousId.js +11 -0
- package/lib/analytics/utils/contextInfo.d.ts +19 -0
- package/lib/analytics/utils/contextInfo.d.ts.map +1 -0
- package/lib/analytics/utils/contextInfo.js +35 -0
- package/lib/analytics/utils/logger.d.ts +4 -0
- package/lib/analytics/utils/logger.d.ts.map +1 -0
- package/lib/analytics/utils/logger.js +12 -0
- package/lib/analytics/utils/retry.d.ts +2 -0
- package/lib/analytics/utils/retry.d.ts.map +1 -0
- package/lib/analytics/utils/retry.js +17 -0
- package/lib/analytics/utils/timezone.d.ts +2 -0
- package/lib/analytics/utils/timezone.d.ts.map +1 -0
- package/lib/analytics/utils/timezone.js +8 -0
- package/lib/index.d.ts +6 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -2
- package/lib/react/context.d.ts +9 -0
- package/lib/react/context.d.ts.map +1 -0
- package/lib/react/context.js +12 -0
- package/lib/react/useMetaRouter.d.ts +3 -0
- package/lib/react/useMetaRouter.d.ts.map +1 -0
- package/lib/react/useMetaRouter.js +8 -0
- package/lib/types.d.ts +9 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +1 -0
- package/package.json +11 -12
- package/MetaRouterReactNativeSDK.podspec +0 -28
- package/android/build/generated/ksp/debug/java/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl.java +0 -244
- package/android/build/generated/ksp/debug/java/com/reactnativecommunity/asyncstorage/next/StorageDb_Impl.java +0 -165
- package/android/build/generated/source/buildConfig/debug/com/metarouter/reactnativesdk/BuildConfig.java +0 -10
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -7
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/metarouter/reactnativesdk/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/metarouter/reactnativesdk/MetaRouterReactNativeSDKPackage.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncLocalStorageUtil.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageErrorUtil.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageExpoMigration.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$2.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$3.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$4.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$5.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$6.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStoragePackage$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStoragePackage.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/NativeAsyncStorageModuleSpec.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/ReactDatabaseSupplier.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/SerialExecutor$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/SerialExecutor.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$2.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$3.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$4.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$5.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$6.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$7.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDb_Impl$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDb_Impl.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/org/linusu/RNGetRandomValuesModule.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/org/linusu/RNGetRandomValuesPackage.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -2
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -7
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -7
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -1
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -16
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/metarouter_react-native-sdk_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/ArgumentHelpersKt.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/AsyncStorageAccess.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/AsyncStorageError$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/AsyncStorageError.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/Entry.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/ErrorHelpersKt$createExceptionHandler$$inlined$CoroutineExceptionHandler$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/ErrorHelpersKt.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/MIGRATION_TO_NEXT.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageDao$DefaultImpls.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageDao$mergeValues$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageDao.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageDb$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageDb.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$clear$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$getAllKeys$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$multiGet$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$multiMerge$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$multiRemove$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$multiSet$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageSupplier$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageSupplier.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageSupplierKt.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/AnalyticsReactNativeModule$onInitialized$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/AnalyticsReactNativeModule$toHexString$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/AnalyticsReactNativeModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/AnalyticsReactNativePackage$createNativeModules$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/AnalyticsReactNativePackage.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/ConnectionType.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/Sovran$Action.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/Sovran$createNativeModules$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/Sovran.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/SovranModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/SovranModule$onInitialized$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/SovranModule.class +0 -0
- package/android/build.gradle +0 -55
- package/android/consumer-rules.pro +0 -0
- package/android/src/main/java/com/metarouter/reactnativesdk/MetaRouterReactNativeSDKPackage.java +0 -54
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncLocalStorageUtil.java +0 -178
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageErrorUtil.java +0 -45
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageExpoMigration.java +0 -154
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageModule.java +0 -410
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStoragePackage.java +0 -93
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/BuildConfig.java +0 -8
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/NativeAsyncStorageModuleSpec.java +0 -47
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/ReactDatabaseSupplier.java +0 -163
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/SerialExecutor.java +0 -40
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/build.gradle +0 -122
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/config.gradle +0 -125
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/next/ArgumentHelpers.kt +0 -86
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/next/ErrorHelpers.kt +0 -39
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/next/StorageModule.kt +0 -94
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/next/StorageSupplier.kt +0 -161
- package/android/src/main/java/com/segmentanalyticsreactnative/AnalyticsReactNativeModule.kt +0 -267
- package/android/src/main/java/com/segmentanalyticsreactnative/AnalyticsReactNativePackage.kt +0 -43
- package/android/src/main/java/com/sovranreactnative/Sovran.kt +0 -45
- package/android/src/main/java/com/sovranreactnative/SovranModule.kt +0 -55
- package/android/src/main/java/org/linusu/RNGetRandomValuesModule.java +0 -36
- package/android/src/main/java/org/linusu/RNGetRandomValuesPackage.java +0 -28
- package/lib/MetaRouterPlugin.d.ts +0 -10
- package/lib/MetaRouterPlugin.d.ts.map +0 -1
- package/lib/MetaRouterPlugin.js +0 -23
- package/lib/context.d.ts +0 -8
- package/lib/context.d.ts.map +0 -1
- package/lib/context.js +0 -9
- package/lib/createMetaRouterClient.d.ts +0 -3
- package/lib/createMetaRouterClient.d.ts.map +0 -1
- package/lib/createMetaRouterClient.js +0 -7
- package/lib/proxyClient.d.ts +0 -4
- package/lib/proxyClient.d.ts.map +0 -1
- 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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
1
|
+
{"version":3,"file":"timezone.d.ts","sourceRoot":"","sources":["../../../src/analytics/utils/timezone.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,IAAI,MAAM,CAMlC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
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
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.
|
|
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
|
-
|
|
2
|
-
export
|
|
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 @@
|
|
|
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.
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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,28 +0,0 @@
|
|
|
1
|
-
Pod::Spec.new do |s|
|
|
2
|
-
s.name = 'MetaRouterReactNative'
|
|
3
|
-
s.version = '0.1.0'
|
|
4
|
-
s.summary = 'MetaRouter analytics wrapper for React Native'
|
|
5
|
-
s.description = 'MetaRouter analytics SDK that wraps Segment and 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
|
-
s.dependency 'React-RCTBridge'
|
|
21
|
-
s.dependency 'React-RCTUtils'
|
|
22
|
-
|
|
23
|
-
# Real native dependencies that you want CocoaPods to fetch and install
|
|
24
|
-
s.dependency 'AnalyticsReactNative', '~> 2.21.2'
|
|
25
|
-
s.dependency 'SovranReactNative', '~> 1.1.3'
|
|
26
|
-
s.dependency 'react-native-get-random-values', '~> 1.11.0'
|
|
27
|
-
s.dependency 'RNCAsyncStorage', '~> 2.2.0'
|
|
28
|
-
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
|
-
}
|