@appsonair.ir/react-native 1.0.0

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 (209) hide show
  1. package/android/build/.transforms/200c703f56cba8293fae35d5b35891b9/results.bin +1 -0
  2. package/android/build/.transforms/200c703f56cba8293fae35d5b35891b9/transformed/classes/classes_dex/classes.dex +0 -0
  3. package/android/build/.transforms/258459e9c210bd80984731dbf1be5d94/results.bin +1 -0
  4. package/android/build/.transforms/258459e9c210bd80984731dbf1be5d94/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/otaupdater/BuildConfig.dex +0 -0
  5. package/android/build/.transforms/258459e9c210bd80984731dbf1be5d94/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/otaupdater/OTAApkInstallHelper.dex +0 -0
  6. package/android/build/.transforms/258459e9c210bd80984731dbf1be5d94/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/otaupdater/OTAReactHostFactory.dex +0 -0
  7. package/android/build/.transforms/258459e9c210bd80984731dbf1be5d94/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/otaupdater/OTARestartActivity.dex +0 -0
  8. package/android/build/.transforms/258459e9c210bd80984731dbf1be5d94/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/otaupdater/OTARestartHelper.dex +0 -0
  9. package/android/build/.transforms/258459e9c210bd80984731dbf1be5d94/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/otaupdater/OTAUpdaterModule$1.dex +0 -0
  10. package/android/build/.transforms/258459e9c210bd80984731dbf1be5d94/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/otaupdater/OTAUpdaterModule$Companion.dex +0 -0
  11. package/android/build/.transforms/258459e9c210bd80984731dbf1be5d94/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/otaupdater/OTAUpdaterModule.dex +0 -0
  12. package/android/build/.transforms/258459e9c210bd80984731dbf1be5d94/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/otaupdater/OTAUpdaterPackage.dex +0 -0
  13. package/android/build/.transforms/258459e9c210bd80984731dbf1be5d94/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/otaupdater/OTAUpdaterStorage$NativeInfo.dex +0 -0
  14. package/android/build/.transforms/258459e9c210bd80984731dbf1be5d94/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/otaupdater/OTAUpdaterStorage.dex +0 -0
  15. package/android/build/.transforms/258459e9c210bd80984731dbf1be5d94/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/otaupdater/OTAZipExtractHelper.dex +0 -0
  16. package/android/build/.transforms/258459e9c210bd80984731dbf1be5d94/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  17. package/android/build/generated/source/buildConfig/debug/com/otaupdater/BuildConfig.java +10 -0
  18. package/android/build/generated/source/codegen/jni/CMakeLists.txt +28 -0
  19. package/android/build/generated/source/codegen/jni/OtaUpdaterSpec-generated.cpp +22 -0
  20. package/android/build/generated/source/codegen/jni/OtaUpdaterSpec.h +24 -0
  21. package/android/build/generated/source/codegen/jni/react/renderer/components/OtaUpdaterSpec/ComponentDescriptors.cpp +22 -0
  22. package/android/build/generated/source/codegen/jni/react/renderer/components/OtaUpdaterSpec/ComponentDescriptors.h +24 -0
  23. package/android/build/generated/source/codegen/jni/react/renderer/components/OtaUpdaterSpec/EventEmitters.cpp +16 -0
  24. package/android/build/generated/source/codegen/jni/react/renderer/components/OtaUpdaterSpec/EventEmitters.h +17 -0
  25. package/android/build/generated/source/codegen/jni/react/renderer/components/OtaUpdaterSpec/OtaUpdaterSpecJSI.h +19 -0
  26. package/android/build/generated/source/codegen/jni/react/renderer/components/OtaUpdaterSpec/Props.cpp +19 -0
  27. package/android/build/generated/source/codegen/jni/react/renderer/components/OtaUpdaterSpec/Props.h +18 -0
  28. package/android/build/generated/source/codegen/jni/react/renderer/components/OtaUpdaterSpec/ShadowNodes.cpp +17 -0
  29. package/android/build/generated/source/codegen/jni/react/renderer/components/OtaUpdaterSpec/ShadowNodes.h +23 -0
  30. package/android/build/generated/source/codegen/jni/react/renderer/components/OtaUpdaterSpec/States.cpp +16 -0
  31. package/android/build/generated/source/codegen/jni/react/renderer/components/OtaUpdaterSpec/States.h +20 -0
  32. package/android/build/generated/source/codegen/schema.json +1 -0
  33. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +27 -0
  34. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  35. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  36. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  37. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  38. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  39. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +1 -0
  40. package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/xml_ota_file_paths.xml.flat +0 -0
  41. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -0
  42. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  43. package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
  44. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  45. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  46. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/ota-updater_debug.kotlin_module +0 -0
  47. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/otaupdater/BuildConfig.class +0 -0
  48. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +3 -0
  49. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +43 -0
  50. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +27 -0
  51. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  52. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  53. package/android/build/intermediates/packaged_res/debug/packageDebugResources/xml/ota_file_paths.xml +6 -0
  54. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/ota-updater_debug.kotlin_module +0 -0
  55. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/otaupdater/BuildConfig.class +0 -0
  56. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/otaupdater/OTAApkInstallHelper.class +0 -0
  57. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/otaupdater/OTAReactHostFactory.class +0 -0
  58. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/otaupdater/OTARestartActivity.class +0 -0
  59. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/otaupdater/OTARestartHelper.class +0 -0
  60. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/otaupdater/OTAUpdaterModule$1.class +0 -0
  61. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/otaupdater/OTAUpdaterModule$Companion.class +0 -0
  62. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/otaupdater/OTAUpdaterModule.class +0 -0
  63. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/otaupdater/OTAUpdaterPackage.class +0 -0
  64. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/otaupdater/OTAUpdaterStorage$NativeInfo.class +0 -0
  65. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/otaupdater/OTAUpdaterStorage.class +0 -0
  66. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/otaupdater/OTAZipExtractHelper.class +0 -0
  67. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  68. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +2 -0
  69. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  70. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  71. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  72. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  73. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  74. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  75. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  76. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  77. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  78. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  79. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  80. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  81. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  82. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  83. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  84. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  85. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  86. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  87. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  88. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  89. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  90. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  91. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  95. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  97. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  99. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  109. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  110. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  111. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  112. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  113. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  119. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  120. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  121. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  122. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  123. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  124. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  125. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  126. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  127. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  128. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  129. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  130. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  131. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  132. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  133. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  134. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  135. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  136. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  137. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  138. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  139. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  140. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  141. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  142. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  143. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  144. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  145. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  146. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  147. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  148. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  149. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  150. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  151. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  152. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  153. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  154. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  155. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  156. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  157. package/android/build/outputs/logs/manifest-merger-debug-report.txt +48 -0
  158. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  159. package/android/build/tmp/kotlin-classes/debug/META-INF/ota-updater_debug.kotlin_module +0 -0
  160. package/android/build/tmp/kotlin-classes/debug/com/otaupdater/OTAApkInstallHelper.class +0 -0
  161. package/android/build/tmp/kotlin-classes/debug/com/otaupdater/OTAReactHostFactory.class +0 -0
  162. package/android/build/tmp/kotlin-classes/debug/com/otaupdater/OTARestartActivity.class +0 -0
  163. package/android/build/tmp/kotlin-classes/debug/com/otaupdater/OTARestartHelper.class +0 -0
  164. package/android/build/tmp/kotlin-classes/debug/com/otaupdater/OTAUpdaterModule$1.class +0 -0
  165. package/android/build/tmp/kotlin-classes/debug/com/otaupdater/OTAUpdaterModule$Companion.class +0 -0
  166. package/android/build/tmp/kotlin-classes/debug/com/otaupdater/OTAUpdaterModule.class +0 -0
  167. package/android/build/tmp/kotlin-classes/debug/com/otaupdater/OTAUpdaterPackage.class +0 -0
  168. package/android/build/tmp/kotlin-classes/debug/com/otaupdater/OTAUpdaterStorage$NativeInfo.class +0 -0
  169. package/android/build/tmp/kotlin-classes/debug/com/otaupdater/OTAUpdaterStorage.class +0 -0
  170. package/android/build/tmp/kotlin-classes/debug/com/otaupdater/OTAZipExtractHelper.class +0 -0
  171. package/android/build.gradle +68 -0
  172. package/android/src/main/AndroidManifest.xml +21 -0
  173. package/android/src/main/java/com/otaupdater/OTAApkInstallHelper.kt +88 -0
  174. package/android/src/main/java/com/otaupdater/OTARestartActivity.kt +49 -0
  175. package/android/src/main/java/com/otaupdater/OTARestartHelper.kt +45 -0
  176. package/android/src/main/java/com/otaupdater/OTAUpdaterModule.kt +159 -0
  177. package/android/src/main/java/com/otaupdater/OTAUpdaterPackage.kt +16 -0
  178. package/android/src/main/java/com/otaupdater/OTAUpdaterStorage.kt +196 -0
  179. package/android/src/main/java/com/otaupdater/OTAZipExtractHelper.kt +62 -0
  180. package/android/src/main/res/xml/ota_file_paths.xml +6 -0
  181. package/android/src/reacthost76/java/com/otaupdater/OTAReactHostFactory.kt +84 -0
  182. package/ios/OTAUpdaterNative.h +4 -0
  183. package/ios/OTAUpdaterNative.m +110 -0
  184. package/lib/api.d.ts +1 -0
  185. package/lib/api.js +8 -0
  186. package/lib/config.d.ts +3 -0
  187. package/lib/config.js +11 -0
  188. package/lib/debug.d.ts +4 -0
  189. package/lib/debug.js +23 -0
  190. package/lib/index.d.ts +26 -0
  191. package/lib/index.js +74 -0
  192. package/lib/progress.d.ts +2 -0
  193. package/lib/progress.js +11 -0
  194. package/lib/projectConfig.d.ts +6 -0
  195. package/lib/projectConfig.js +47 -0
  196. package/lib/storage.d.ts +1 -0
  197. package/lib/storage.js +10 -0
  198. package/lib/sync.d.ts +50 -0
  199. package/lib/sync.js +728 -0
  200. package/lib/types.d.ts +97 -0
  201. package/lib/types.js +15 -0
  202. package/lib/ui/OTAUpdateModal.d.ts +8 -0
  203. package/lib/ui/OTAUpdateModal.js +138 -0
  204. package/lib/ui/OTAUpdateProvider.d.ts +3 -0
  205. package/lib/ui/OTAUpdateProvider.js +102 -0
  206. package/lib/zipExtract.d.ts +1 -0
  207. package/lib/zipExtract.js +113 -0
  208. package/package.json +46 -0
  209. package/react-native.config.js +12 -0
package/lib/types.d.ts ADDED
@@ -0,0 +1,97 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface ProjectOtaConfig {
3
+ serverUrl: string;
4
+ entryFile?: string;
5
+ installMode?: OTAUpdaterConfig['installMode'];
6
+ deployments: {
7
+ staging: string;
8
+ production: string;
9
+ };
10
+ }
11
+ export interface OTAUpdaterConfig {
12
+ /** Base URL of your OTA server, e.g. https://ota.example.com */
13
+ serverUrl: string;
14
+ /** Deployment key from the OTA server (Staging or Production) */
15
+ deploymentKey: string;
16
+ /** When to apply downloaded updates (default: immediate) */
17
+ installMode?: 'immediate' | 'on-next-restart' | 'on-next-resume';
18
+ /** Check interval in milliseconds when using auto-check (default: disabled) */
19
+ checkFrequency?: number;
20
+ /** Show built-in progress popup during sync (default: false, enabled by OTAUpdateProvider) */
21
+ showProgressUI?: boolean;
22
+ /** Check for and offer native APK updates on Android (default: true) */
23
+ enableApkUpdates?: boolean;
24
+ }
25
+ export interface OTAProgressMessages {
26
+ title?: string;
27
+ checking?: string;
28
+ downloading?: string;
29
+ installing?: string;
30
+ restarting?: string;
31
+ error?: string;
32
+ upToDate?: string;
33
+ }
34
+ export interface OTAUpdateProviderProps {
35
+ children: ReactNode;
36
+ /** Project config from ota-updater.config.ts — auto-configures the SDK on mount */
37
+ projectConfig?: ProjectOtaConfig;
38
+ /** Automatically check and install updates on mount (default: true) */
39
+ autoSync?: boolean;
40
+ /** Skip auto sync in dev mode (default: true) */
41
+ skipInDev?: boolean;
42
+ /** Custom status messages */
43
+ messages?: OTAProgressMessages;
44
+ /** Modal title font (must be linked in the host app, e.g. Shabnam-FD) */
45
+ fontFamily?: string;
46
+ /** Passed to sync() */
47
+ syncOptions?: SyncOptions;
48
+ }
49
+ export interface UpdateCheckResult {
50
+ updateAvailable: boolean;
51
+ updateType?: 'bundle' | 'apk';
52
+ reason?: 'NATIVE_VERSION_MISMATCH' | 'ALREADY_INSTALLED' | 'ROLLOUT';
53
+ clientAppVersion?: string;
54
+ targetAppVersion?: string;
55
+ downloadUrl?: string;
56
+ label?: string;
57
+ description?: string;
58
+ isMandatory?: boolean;
59
+ appVersion?: string;
60
+ packageHash?: string;
61
+ buildNumber?: number;
62
+ deviceAbi?: string;
63
+ packageFormat?: 'bundle' | 'zip';
64
+ size?: number;
65
+ }
66
+ export interface SyncOptions {
67
+ /** When to apply the update (default: immediate, or value from configure()) */
68
+ installMode?: 'immediate' | 'on-next-restart' | 'on-next-resume';
69
+ /** Minimum background duration before checking on resume (ms) */
70
+ minimumBackgroundDuration?: number;
71
+ /** Show built-in progress popup (default: from configure() or false) */
72
+ showProgressUI?: boolean;
73
+ /** Check for native APK updates on Android (default: from configure() or true) */
74
+ enableApkUpdates?: boolean;
75
+ }
76
+ export declare enum SyncStatus {
77
+ UP_TO_DATE = "UP_TO_DATE",
78
+ UPDATE_INSTALLED = "UPDATE_INSTALLED",
79
+ UPDATE_IGNORED = "UPDATE_IGNORED",
80
+ APK_INSTALL_PENDING = "APK_INSTALL_PENDING",
81
+ ERROR = "ERROR",
82
+ CHECKING = "CHECKING",
83
+ DOWNLOADING = "DOWNLOADING",
84
+ INSTALLING = "INSTALLING",
85
+ RESTARTING = "RESTARTING"
86
+ }
87
+ export interface SyncResult {
88
+ status: SyncStatus;
89
+ label?: string;
90
+ description?: string;
91
+ error?: Error;
92
+ }
93
+ export interface StoredBundleMeta {
94
+ label: string;
95
+ packageHash: string;
96
+ installedAt: string;
97
+ }
package/lib/types.js ADDED
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SyncStatus = void 0;
4
+ var SyncStatus;
5
+ (function (SyncStatus) {
6
+ SyncStatus["UP_TO_DATE"] = "UP_TO_DATE";
7
+ SyncStatus["UPDATE_INSTALLED"] = "UPDATE_INSTALLED";
8
+ SyncStatus["UPDATE_IGNORED"] = "UPDATE_IGNORED";
9
+ SyncStatus["APK_INSTALL_PENDING"] = "APK_INSTALL_PENDING";
10
+ SyncStatus["ERROR"] = "ERROR";
11
+ SyncStatus["CHECKING"] = "CHECKING";
12
+ SyncStatus["DOWNLOADING"] = "DOWNLOADING";
13
+ SyncStatus["INSTALLING"] = "INSTALLING";
14
+ SyncStatus["RESTARTING"] = "RESTARTING";
15
+ })(SyncStatus || (exports.SyncStatus = SyncStatus = {}));
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { OTAProgressState } from '../progress';
3
+ interface OTAUpdateModalProps extends OTAProgressState {
4
+ title?: string;
5
+ fontFamily?: string;
6
+ }
7
+ export declare function OTAUpdateModal({ visible, status, progress, message, description, error, title, fontFamily, }: OTAUpdateModalProps): React.JSX.Element;
8
+ export {};
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.OTAUpdateModal = OTAUpdateModal;
37
+ const react_1 = __importStar(require("react"));
38
+ const react_native_1 = require("react-native");
39
+ const progress_1 = require("../progress");
40
+ const types_1 = require("../types");
41
+ function OTAUpdateModal({ visible, status, progress, message, description, error, title = progress_1.defaultMessages.title, fontFamily, }) {
42
+ const customFontStyle = (0, react_1.useMemo)(() => fontFamily
43
+ ? {
44
+ fontFamily,
45
+ fontWeight: 'normal',
46
+ }
47
+ : null, [fontFamily]);
48
+ const textStyle = (0, react_1.useMemo)(() => ({
49
+ ...(customFontStyle ?? null),
50
+ writingDirection: 'rtl',
51
+ }), [customFontStyle]);
52
+ if (!visible)
53
+ return null;
54
+ const progressPercent = Math.round(Math.min(Math.max(progress, 0), 1) * 100);
55
+ const showProgressBar = status === types_1.SyncStatus.DOWNLOADING;
56
+ return (<react_native_1.Modal visible transparent animationType="fade" statusBarTranslucent>
57
+ <react_native_1.View style={styles.overlay}>
58
+ <react_native_1.View style={styles.card}>
59
+ <react_native_1.Text style={[styles.title, !fontFamily && styles.titleBold, textStyle]}>
60
+ {title}
61
+ </react_native_1.Text>
62
+ <react_native_1.Text style={[styles.message, textStyle]}>{error ?? message}</react_native_1.Text>
63
+ {description && !error ? (<react_native_1.Text style={[styles.description, textStyle]}>{description}</react_native_1.Text>) : null}
64
+
65
+ {showProgressBar ? (<react_native_1.View style={styles.progressTrack}>
66
+ <react_native_1.View style={[styles.progressFill, { width: `${progressPercent}%` }]}/>
67
+ </react_native_1.View>) : (<react_native_1.ActivityIndicator size="large" color="#2563eb" style={styles.spinner}/>)}
68
+
69
+ {showProgressBar ? (<react_native_1.Text style={[styles.percent, !fontFamily && styles.percentBold, textStyle]}>
70
+ {progressPercent}٪
71
+ </react_native_1.Text>) : null}
72
+ </react_native_1.View>
73
+ </react_native_1.View>
74
+ </react_native_1.Modal>);
75
+ }
76
+ const styles = react_native_1.StyleSheet.create({
77
+ overlay: {
78
+ flex: 1,
79
+ backgroundColor: 'rgba(0, 0, 0, 0.55)',
80
+ alignItems: 'center',
81
+ justifyContent: 'center',
82
+ padding: 24,
83
+ },
84
+ card: {
85
+ width: '100%',
86
+ maxWidth: 320,
87
+ backgroundColor: '#fff',
88
+ borderRadius: 16,
89
+ padding: 24,
90
+ alignItems: 'center',
91
+ },
92
+ title: {
93
+ fontSize: 18,
94
+ color: '#111827',
95
+ marginBottom: 8,
96
+ textAlign: 'center',
97
+ },
98
+ titleBold: {
99
+ fontWeight: '700',
100
+ },
101
+ message: {
102
+ fontSize: 15,
103
+ color: '#374151',
104
+ textAlign: 'center',
105
+ marginBottom: 8,
106
+ },
107
+ description: {
108
+ fontSize: 13,
109
+ color: '#6b7280',
110
+ textAlign: 'center',
111
+ marginBottom: 16,
112
+ },
113
+ progressTrack: {
114
+ width: '100%',
115
+ height: 8,
116
+ backgroundColor: '#e5e7eb',
117
+ borderRadius: 999,
118
+ overflow: 'hidden',
119
+ marginTop: 8,
120
+ },
121
+ progressFill: {
122
+ height: '100%',
123
+ backgroundColor: '#2563eb',
124
+ borderRadius: 999,
125
+ },
126
+ percent: {
127
+ marginTop: 8,
128
+ fontSize: 13,
129
+ color: '#6b7280',
130
+ textAlign: 'center',
131
+ },
132
+ percentBold: {
133
+ fontWeight: '600',
134
+ },
135
+ spinner: {
136
+ marginTop: 12,
137
+ },
138
+ });
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { OTAUpdateProviderProps } from '../types';
3
+ export declare function OTAUpdateProvider({ children, projectConfig, autoSync, skipInDev, messages, fontFamily, syncOptions, }: OTAUpdateProviderProps): React.JSX.Element;
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.OTAUpdateProvider = OTAUpdateProvider;
37
+ const react_1 = __importStar(require("react"));
38
+ const react_native_1 = require("react-native");
39
+ const projectConfig_1 = require("../projectConfig");
40
+ const progress_1 = require("../progress");
41
+ const sync_1 = require("../sync");
42
+ const OTAUpdateModal_1 = require("./OTAUpdateModal");
43
+ const SYNC_DELAY_MS = 2500;
44
+ const FOREGROUND_SYNC_DEBOUNCE_MS = 30000;
45
+ function OTAUpdateProvider({ children, projectConfig, autoSync = true, skipInDev = true, messages, fontFamily, syncOptions, }) {
46
+ const [progress, setProgress] = (0, react_1.useState)((0, progress_1.getProgressState)());
47
+ const lastSyncAtRef = (0, react_1.useRef)(0);
48
+ const foregroundTimerRef = (0, react_1.useRef)(null);
49
+ const hasMountedSyncRef = (0, react_1.useRef)(false);
50
+ const modalTitle = (0, progress_1.getModalTitle)(messages);
51
+ (0, react_1.useEffect)(() => {
52
+ if (projectConfig) {
53
+ (0, projectConfig_1.configureFromProject)(projectConfig);
54
+ }
55
+ }, [projectConfig]);
56
+ (0, react_1.useEffect)(() => (0, progress_1.subscribeProgress)(setProgress), []);
57
+ (0, react_1.useEffect)(() => {
58
+ if (!autoSync)
59
+ return;
60
+ if (skipInDev && __DEV__)
61
+ return;
62
+ const runSync = () => {
63
+ if ((0, sync_1.isSyncInProgress)())
64
+ return;
65
+ lastSyncAtRef.current = Date.now();
66
+ (0, sync_1.sync)({ ...syncOptions, showProgressUI: true }, undefined, messages);
67
+ };
68
+ const mountTimer = setTimeout(() => {
69
+ hasMountedSyncRef.current = true;
70
+ runSync();
71
+ }, SYNC_DELAY_MS);
72
+ const onAppStateChange = (nextState) => {
73
+ if (nextState !== 'active')
74
+ return;
75
+ if (!hasMountedSyncRef.current)
76
+ return;
77
+ (0, sync_1.resumePendingApkInstall)().catch(() => {
78
+ // Native module may be unavailable on iOS — ignore.
79
+ });
80
+ const elapsed = Date.now() - lastSyncAtRef.current;
81
+ if (elapsed < FOREGROUND_SYNC_DEBOUNCE_MS)
82
+ return;
83
+ if (foregroundTimerRef.current) {
84
+ clearTimeout(foregroundTimerRef.current);
85
+ }
86
+ foregroundTimerRef.current = setTimeout(runSync, SYNC_DELAY_MS);
87
+ };
88
+ const subscription = react_native_1.AppState.addEventListener('change', onAppStateChange);
89
+ return () => {
90
+ clearTimeout(mountTimer);
91
+ if (foregroundTimerRef.current) {
92
+ clearTimeout(foregroundTimerRef.current);
93
+ }
94
+ subscription.remove();
95
+ };
96
+ // eslint-disable-next-line react-hooks/exhaustive-deps
97
+ }, []);
98
+ return (<>
99
+ {children}
100
+ <OTAUpdateModal_1.OTAUpdateModal {...progress} title={modalTitle} fontFamily={fontFamily}/>
101
+ </>);
102
+ }
@@ -0,0 +1 @@
1
+ export declare function extractZipToDirectory(zipPath: string, destDir: string): Promise<void>;
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.extractZipToDirectory = extractZipToDirectory;
4
+ const react_native_1 = require("react-native");
5
+ const fflate_1 = require("fflate");
6
+ const { OTAUpdaterNative } = react_native_1.NativeModules;
7
+ function normalizePath(path) {
8
+ return path.replace(/^file:\/\//, '');
9
+ }
10
+ function uint8ArrayToBase64(bytes) {
11
+ const ReactNativeBlobUtil = require('react-native-blob-util').default;
12
+ if (typeof ReactNativeBlobUtil.base64?.encode === 'function') {
13
+ let binary = '';
14
+ const chunkSize = 0x8000;
15
+ for (let i = 0; i < bytes.length; i += chunkSize) {
16
+ binary += String.fromCharCode(...bytes.subarray(i, i + chunkSize));
17
+ }
18
+ return ReactNativeBlobUtil.base64.encode(binary);
19
+ }
20
+ let binary = '';
21
+ const chunkSize = 0x8000;
22
+ for (let i = 0; i < bytes.length; i += chunkSize) {
23
+ binary += String.fromCharCode(...bytes.subarray(i, i + chunkSize));
24
+ }
25
+ return globalThis.btoa(binary);
26
+ }
27
+ function base64ToUint8Array(base64) {
28
+ const ReactNativeBlobUtil = require('react-native-blob-util').default;
29
+ const binary = typeof ReactNativeBlobUtil.base64?.decode === 'function'
30
+ ? ReactNativeBlobUtil.base64.decode(base64)
31
+ : globalThis.atob(base64);
32
+ const bytes = new Uint8Array(binary.length);
33
+ for (let i = 0; i < binary.length; i++) {
34
+ bytes[i] = binary.charCodeAt(i);
35
+ }
36
+ return bytes;
37
+ }
38
+ async function readFileAsBase64(path) {
39
+ const ReactNativeBlobUtil = require('react-native-blob-util').default;
40
+ const data = await ReactNativeBlobUtil.fs.readFile(path, 'base64');
41
+ if (typeof data === 'string') {
42
+ return data;
43
+ }
44
+ throw new Error(`readFile returned unexpected type: ${typeof data}`);
45
+ }
46
+ async function mkdirRecursive(dirPath) {
47
+ const ReactNativeBlobUtil = require('react-native-blob-util').default;
48
+ if (await ReactNativeBlobUtil.fs.exists(dirPath)) {
49
+ return;
50
+ }
51
+ const parent = dirPath.substring(0, dirPath.lastIndexOf('/'));
52
+ if (parent.length > 0) {
53
+ await mkdirRecursive(parent);
54
+ }
55
+ await ReactNativeBlobUtil.fs.mkdir(dirPath);
56
+ }
57
+ async function writeBinaryFile(outPath, content) {
58
+ const ReactNativeBlobUtil = require('react-native-blob-util').default;
59
+ const base64 = uint8ArrayToBase64(content);
60
+ const stream = await ReactNativeBlobUtil.fs.writeStream(outPath, 'base64', false);
61
+ await stream.write(base64);
62
+ await stream.close();
63
+ }
64
+ async function extractZipToDirectoryNative(zipPath, destDir) {
65
+ if (OTAUpdaterNative?.extractZipArchive) {
66
+ await OTAUpdaterNative.extractZipArchive(zipPath, destDir);
67
+ return true;
68
+ }
69
+ try {
70
+ const { unzip } = require('react-native-zip-archive');
71
+ if (typeof unzip === 'function') {
72
+ await unzip(zipPath, destDir);
73
+ return true;
74
+ }
75
+ }
76
+ catch {
77
+ // Optional peer dependency not installed.
78
+ }
79
+ return false;
80
+ }
81
+ async function extractZipToDirectoryJs(zipPath, destDir) {
82
+ const base64 = await readFileAsBase64(zipPath);
83
+ const entries = (0, fflate_1.unzipSync)(base64ToUint8Array(base64));
84
+ await mkdirRecursive(destDir);
85
+ for (const [relativePath, rawContent] of Object.entries(entries)) {
86
+ const normalized = relativePath.replace(/\\/g, '/');
87
+ if (normalized.endsWith('/')) {
88
+ await mkdirRecursive(`${destDir}/${normalized.slice(0, -1)}`);
89
+ continue;
90
+ }
91
+ const content = rawContent instanceof Uint8Array
92
+ ? rawContent
93
+ : new Uint8Array(rawContent);
94
+ const outPath = `${destDir}/${normalized}`;
95
+ const parent = outPath.substring(0, outPath.lastIndexOf('/'));
96
+ if (parent.length > 0) {
97
+ await mkdirRecursive(parent);
98
+ }
99
+ await writeBinaryFile(outPath, content);
100
+ }
101
+ }
102
+ async function extractZipToDirectory(zipPath, destDir) {
103
+ const normalizedZip = normalizePath(zipPath);
104
+ const normalizedDest = normalizePath(destDir);
105
+ const extractedNatively = await extractZipToDirectoryNative(normalizedZip, normalizedDest);
106
+ if (extractedNatively) {
107
+ return;
108
+ }
109
+ if (react_native_1.Platform.OS === 'android') {
110
+ throw new Error('OTA zip extraction requires rebuilding the Android app with the latest @appsonair.ir/react-native native module. Run: cd android && ./gradlew clean && cd .. && npx react-native run-android');
111
+ }
112
+ await extractZipToDirectoryJs(normalizedZip, normalizedDest);
113
+ }
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@appsonair.ir/react-native",
3
+ "version": "1.0.0",
4
+ "description": "React Native client SDK for self-hosted OTA updates",
5
+ "main": "lib/index.js",
6
+ "types": "lib/index.d.ts",
7
+ "react-native": "lib/index.js",
8
+ "files": [
9
+ "lib",
10
+ "android",
11
+ "ios",
12
+ "react-native.config.js"
13
+ ],
14
+ "scripts": {
15
+ "build": "tsc",
16
+ "prepublishOnly": "yarn build"
17
+ },
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "dependencies": {
22
+ "fflate": "^0.8.2"
23
+ },
24
+ "peerDependencies": {
25
+ "@react-native-async-storage/async-storage": ">=1.17.0",
26
+ "react": ">=18.0.0",
27
+ "react-native": ">=0.71.0",
28
+ "react-native-blob-util": ">=0.19.0",
29
+ "react-native-device-info": ">=10.0.0"
30
+ },
31
+ "peerDependenciesMeta": {
32
+ "react-native-blob-util": {
33
+ "optional": true
34
+ }
35
+ },
36
+ "devDependencies": {
37
+ "@react-native-async-storage/async-storage": "^2.1.0",
38
+ "@types/node": "^22.10.2",
39
+ "@types/react": "^18.3.12",
40
+ "react": "^18.3.1",
41
+ "react-native": "^0.76.3",
42
+ "react-native-blob-util": "^0.21.2",
43
+ "react-native-device-info": "^14.0.1",
44
+ "typescript": "^5.7.2"
45
+ }
46
+ }
@@ -0,0 +1,12 @@
1
+ module.exports = {
2
+ dependency: {
3
+ platforms: {
4
+ android: {
5
+ sourceDir: './android',
6
+ packageImportPath: 'import com.otaupdater.OTAUpdaterPackage;',
7
+ packageInstance: 'new OTAUpdaterPackage()',
8
+ },
9
+ ios: {},
10
+ },
11
+ },
12
+ };