react-native-inapp-inspector 2.3.13 → 2.3.15

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 (284) hide show
  1. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  2. package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
  3. package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
  4. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  5. package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
  6. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  7. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  8. package/android/.gradle/8.9/gc.properties +0 -0
  9. package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
  10. package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
  11. package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
  12. package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
  13. package/android/.gradle/9.2.0/gc.properties +0 -0
  14. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  15. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  16. package/android/.gradle/vcs-1/gc.properties +0 -0
  17. package/android/build/.transforms/6683d6eeaa3e1dfa689c3385111a0386/results.bin +1 -0
  18. package/android/build/.transforms/6683d6eeaa3e1dfa689c3385111a0386/transformed/classes/classes_dex/classes.dex +0 -0
  19. package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/results.bin +1 -0
  20. package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/BuildConfig.dex +0 -0
  21. package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/InAppInspectorFloatingView$iconView$1.dex +0 -0
  22. package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/InAppInspectorFloatingView.dex +0 -0
  23. package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NativeNetworkInspectorSpec.dex +0 -0
  24. package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$Companion.dex +0 -0
  25. package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$frameCallback$1.dex +0 -0
  26. package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$shakeListener$1.dex +0 -0
  27. package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule.dex +0 -0
  28. package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorPackage.dex +0 -0
  29. package/android/build/.transforms/9d2a3e5e0f0ea07cafb0c0bf290630ee/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  30. package/android/build/generated/source/buildConfig/debug/com/inappinspector/BuildConfig.java +10 -0
  31. package/android/build/generated/source/codegen/java/com/inappinspector/NativeNetworkInspectorSpec.java +104 -0
  32. package/android/build/generated/source/codegen/jni/CMakeLists.txt +28 -0
  33. package/android/build/generated/source/codegen/jni/RNInAppInspectorSpec-generated.cpp +128 -0
  34. package/android/build/generated/source/codegen/jni/RNInAppInspectorSpec.h +31 -0
  35. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ComponentDescriptors.cpp +22 -0
  36. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ComponentDescriptors.h +24 -0
  37. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/EventEmitters.cpp +16 -0
  38. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/EventEmitters.h +17 -0
  39. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/Props.cpp +19 -0
  40. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/Props.h +18 -0
  41. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/RNInAppInspectorSpecJSI.h +177 -0
  42. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ShadowNodes.cpp +17 -0
  43. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ShadowNodes.h +23 -0
  44. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/States.cpp +16 -0
  45. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/States.h +20 -0
  46. package/android/build/generated/source/codegen/schema.json +1 -0
  47. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
  48. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  49. package/android/build/intermediates/aar_main_jar/debug/syncDebugLibJars/classes.jar +0 -0
  50. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  51. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  52. package/android/build/intermediates/annotations_typedef_file/debug/extractDebugAnnotations/typedefs.txt +0 -0
  53. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  54. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  55. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  56. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
  57. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  58. package/android/build/intermediates/incremental/debug-mergeJavaRes/merge-state +0 -0
  59. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  60. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  61. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  62. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
  63. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/inappinspector/BuildConfig.class +0 -0
  64. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/inappinspector/NativeNetworkInspectorSpec.class +0 -0
  65. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
  66. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
  67. package/android/build/intermediates/merged_java_res/debug/mergeDebugJavaResource/feature-react-native-inapp-inspector.jar +0 -0
  68. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
  69. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  70. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  71. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
  72. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/BuildConfig.class +0 -0
  73. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/InAppInspectorFloatingView$iconView$1.class +0 -0
  74. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/InAppInspectorFloatingView.class +0 -0
  75. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NativeNetworkInspectorSpec.class +0 -0
  76. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$Companion.class +0 -0
  77. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$frameCallback$1.class +0 -0
  78. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$shakeListener$1.class +0 -0
  79. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule.class +0 -0
  80. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorPackage.class +0 -0
  81. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  82. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
  83. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  84. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  85. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  86. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  87. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  88. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  89. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  90. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  91. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  95. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  97. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  99. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  109. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  110. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  111. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  112. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  113. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  119. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  120. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  121. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  122. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  123. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  124. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  125. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  126. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  127. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  128. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  129. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  130. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  131. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  132. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  133. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  134. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  135. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  136. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  137. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  138. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  139. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  140. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  141. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  142. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  143. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  144. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  145. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  146. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  147. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  148. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  149. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  150. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  151. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  152. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  153. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  154. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  155. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  156. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  157. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  158. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  159. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  160. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  161. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  162. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  163. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  164. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  165. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  166. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  167. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  168. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  169. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  170. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  171. package/android/build/outputs/aar/react-native-inapp-inspector-debug.aar +0 -0
  172. package/android/build/outputs/logs/manifest-merger-debug-report.txt +17 -0
  173. package/android/build/reports/problems/problems-report.html +659 -0
  174. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  175. package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
  176. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/InAppInspectorFloatingView$iconView$1.class +0 -0
  177. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/InAppInspectorFloatingView.class +0 -0
  178. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$Companion.class +0 -0
  179. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$frameCallback$1.class +0 -0
  180. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$shakeListener$1.class +0 -0
  181. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule.class +0 -0
  182. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorPackage.class +0 -0
  183. package/bin/cli.js +6 -0
  184. package/dist/commonjs/components/AnimatedEntrance.js +3 -3
  185. package/dist/commonjs/components/ConsoleLogCard.js +174 -100
  186. package/dist/commonjs/components/Inspector/ConsoleTab.js +25 -16
  187. package/dist/commonjs/components/Inspector/CrashTab.js +19 -5
  188. package/dist/commonjs/components/Inspector/DebuggingTab.js +741 -438
  189. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +198 -98
  190. package/dist/commonjs/components/Inspector/InspectorHeader.js +2 -2
  191. package/dist/commonjs/components/Inspector/MainScreen.js +58 -55
  192. package/dist/commonjs/components/Inspector/NetworkTab.js +1 -335
  193. package/dist/commonjs/components/Inspector/PerformanceTab.js +32 -6
  194. package/dist/commonjs/components/Inspector/ReduxTab.js +3 -1
  195. package/dist/commonjs/components/Inspector/SettingsPanel.js +6 -4
  196. package/dist/commonjs/components/Inspector/StorageTab.js +23 -5
  197. package/dist/commonjs/components/Inspector/TabBar.js +6 -2
  198. package/dist/commonjs/components/JsonViewer.js +14 -2
  199. package/dist/commonjs/components/LogCard.js +428 -227
  200. package/dist/commonjs/components/QRCodeView.js +1 -1
  201. package/dist/commonjs/constants/telemetryConfig.d.ts +3 -3
  202. package/dist/commonjs/constants/telemetryConfig.js +3 -3
  203. package/dist/commonjs/constants/version.d.ts +1 -1
  204. package/dist/commonjs/constants/version.js +1 -1
  205. package/dist/commonjs/customHooks/analyticsLogger.js +1 -1
  206. package/dist/commonjs/customHooks/consoleLogger.js +34 -2
  207. package/dist/commonjs/customHooks/crashHandler.js +1 -1
  208. package/dist/commonjs/customHooks/networkLogger.js +184 -26
  209. package/dist/commonjs/helpers/index.d.ts +1 -0
  210. package/dist/commonjs/helpers/index.js +11 -1
  211. package/dist/commonjs/helpers/qrGenerator.d.ts +1 -0
  212. package/dist/commonjs/helpers/qrGenerator.js +356 -33
  213. package/dist/commonjs/helpers/searchQueryParser.d.ts +1 -1
  214. package/dist/commonjs/helpers/searchQueryParser.js +37 -291
  215. package/dist/commonjs/index.d.ts +1 -0
  216. package/dist/commonjs/index.js +146 -30
  217. package/dist/commonjs/metro.d.ts +25 -0
  218. package/dist/commonjs/metro.js +478 -0
  219. package/dist/esm/components/AnimatedEntrance.js +3 -3
  220. package/dist/esm/components/ConsoleLogCard.js +141 -100
  221. package/dist/esm/components/Inspector/ConsoleTab.js +25 -16
  222. package/dist/esm/components/Inspector/CrashTab.js +19 -5
  223. package/dist/esm/components/Inspector/DebuggingTab.js +744 -441
  224. package/dist/esm/components/Inspector/DeviceInfoTab.js +198 -98
  225. package/dist/esm/components/Inspector/InspectorHeader.js +3 -3
  226. package/dist/esm/components/Inspector/MainScreen.js +58 -55
  227. package/dist/esm/components/Inspector/NetworkTab.js +2 -336
  228. package/dist/esm/components/Inspector/PerformanceTab.js +32 -6
  229. package/dist/esm/components/Inspector/ReduxTab.js +3 -1
  230. package/dist/esm/components/Inspector/SettingsPanel.js +7 -5
  231. package/dist/esm/components/Inspector/StorageTab.js +23 -5
  232. package/dist/esm/components/Inspector/TabBar.js +7 -3
  233. package/dist/esm/components/JsonViewer.js +14 -2
  234. package/dist/esm/components/LogCard.js +422 -221
  235. package/dist/esm/components/QRCodeView.js +1 -1
  236. package/dist/esm/constants/telemetryConfig.d.ts +3 -3
  237. package/dist/esm/constants/telemetryConfig.js +3 -3
  238. package/dist/esm/constants/version.d.ts +1 -1
  239. package/dist/esm/constants/version.js +1 -1
  240. package/dist/esm/customHooks/analyticsLogger.js +1 -1
  241. package/dist/esm/customHooks/consoleLogger.js +34 -2
  242. package/dist/esm/customHooks/crashHandler.js +1 -1
  243. package/dist/esm/customHooks/networkLogger.js +184 -26
  244. package/dist/esm/helpers/index.d.ts +1 -0
  245. package/dist/esm/helpers/index.js +9 -0
  246. package/dist/esm/helpers/qrGenerator.d.ts +1 -0
  247. package/dist/esm/helpers/qrGenerator.js +356 -30
  248. package/dist/esm/helpers/searchQueryParser.d.ts +1 -1
  249. package/dist/esm/helpers/searchQueryParser.js +37 -291
  250. package/dist/esm/index.d.ts +1 -0
  251. package/dist/esm/index.js +144 -29
  252. package/dist/esm/metro.d.ts +25 -0
  253. package/dist/esm/metro.js +469 -0
  254. package/metro.d.ts +1 -0
  255. package/metro.js +1 -0
  256. package/package.json +16 -5
  257. package/src/components/AnimatedEntrance.tsx +3 -3
  258. package/src/components/ConsoleLogCard.tsx +154 -103
  259. package/src/components/Inspector/ConsoleTab.tsx +27 -18
  260. package/src/components/Inspector/CrashTab.tsx +19 -5
  261. package/src/components/Inspector/DebuggingTab.tsx +842 -514
  262. package/src/components/Inspector/DeviceInfoTab.tsx +224 -102
  263. package/src/components/Inspector/InspectorHeader.tsx +5 -3
  264. package/src/components/Inspector/MainScreen.tsx +6 -4
  265. package/src/components/Inspector/NetworkTab.tsx +1 -402
  266. package/src/components/Inspector/PerformanceTab.tsx +36 -7
  267. package/src/components/Inspector/ReduxTab.tsx +9 -1
  268. package/src/components/Inspector/SettingsPanel.tsx +85 -75
  269. package/src/components/Inspector/StorageTab.tsx +27 -7
  270. package/src/components/Inspector/TabBar.tsx +16 -2
  271. package/src/components/JsonViewer.tsx +15 -2
  272. package/src/components/LogCard.tsx +528 -339
  273. package/src/components/QRCodeView.tsx +2 -2
  274. package/src/constants/telemetryConfig.ts +5 -3
  275. package/src/constants/version.ts +1 -1
  276. package/src/customHooks/analyticsLogger.ts +1 -1
  277. package/src/customHooks/consoleLogger.ts +36 -3
  278. package/src/customHooks/crashHandler.ts +1 -1
  279. package/src/customHooks/networkLogger.ts +214 -26
  280. package/src/helpers/index.ts +15 -0
  281. package/src/helpers/qrGenerator.ts +418 -37
  282. package/src/helpers/searchQueryParser.ts +40 -285
  283. package/src/index.tsx +337 -214
  284. package/src/metro.ts +598 -0
package/src/metro.ts ADDED
@@ -0,0 +1,598 @@
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+ import os from 'os';
4
+ import { spawn } from 'child_process';
5
+
6
+ export interface InAppInspectorMetroOptions {
7
+ apkPath?: string;
8
+ endpoint?: string;
9
+ }
10
+
11
+ export interface BuildJob {
12
+ status: 'idle' | 'running' | 'completed' | 'failed';
13
+ scheme: string;
14
+ clean: boolean;
15
+ progress: number;
16
+ currentTask: string;
17
+ logs: string[];
18
+ error: string | null;
19
+ startedAt: string | null;
20
+ completedAt: string | null;
21
+ apkName: string | null;
22
+ apkSize: number | null;
23
+ }
24
+
25
+ let activeBuildJob: BuildJob = {
26
+ status: 'idle',
27
+ scheme: 'assembleRelease',
28
+ clean: true,
29
+ progress: 0,
30
+ currentTask: '',
31
+ logs: [],
32
+ error: null,
33
+ startedAt: null,
34
+ completedAt: null,
35
+ apkName: null,
36
+ apkSize: null,
37
+ };
38
+
39
+ /**
40
+ * Dynamically discovers all active LAN IPv4 addresses of this machine.
41
+ * Prioritizes Wi-Fi / Ethernet standard local subnets (192.168.x.x, 10.x.x.x, 172.16-31.x.x).
42
+ */
43
+ export function getLanIpAddresses(): { primary: string; all: string[] } {
44
+ const interfaces = os.networkInterfaces();
45
+ const validIps: string[] = [];
46
+
47
+ for (const name of Object.keys(interfaces)) {
48
+ const netList = interfaces[name];
49
+ if (!netList) continue;
50
+ for (const net of netList) {
51
+ if (
52
+ (net.family === 'IPv4' || (net as any).family === 4) &&
53
+ !net.internal &&
54
+ net.address
55
+ ) {
56
+ validIps.push(net.address);
57
+ }
58
+ }
59
+ }
60
+
61
+ const prioritized =
62
+ validIps.find(ip => ip.startsWith('192.168.')) ||
63
+ validIps.find(ip => ip.startsWith('10.')) ||
64
+ validIps.find(ip => /^172\.(1[6-9]|2\d|3[01])\./.test(ip)) ||
65
+ validIps[0] ||
66
+ '127.0.0.1';
67
+
68
+ return { primary: prioritized, all: validIps };
69
+ }
70
+
71
+ /**
72
+ * Searches common Android build output directories for any built APK dynamically.
73
+ */
74
+ function findDebugApk(customPath?: string): string | null {
75
+ if (customPath && fs.existsSync(customPath)) {
76
+ return customPath;
77
+ }
78
+
79
+ const root = process.cwd();
80
+ const searchCandidates = [
81
+ path.join(root, 'android', 'app', 'build', 'outputs', 'apk', 'release'),
82
+ path.join(root, 'android', 'app', 'build', 'outputs', 'apk', 'debug'),
83
+ path.join(root, 'example', 'android', 'app', 'build', 'outputs', 'apk', 'release'),
84
+ path.join(root, 'example', 'android', 'app', 'build', 'outputs', 'apk', 'debug'),
85
+ path.join(root, 'app', 'build', 'outputs', 'apk', 'release'),
86
+ path.join(root, 'app', 'build', 'outputs', 'apk', 'debug'),
87
+ path.join(root, 'build', 'outputs', 'apk', 'release'),
88
+ path.join(root, 'build', 'outputs', 'apk', 'debug'),
89
+ ];
90
+
91
+ for (const candidate of searchCandidates) {
92
+ if (fs.existsSync(candidate)) {
93
+ const stats = fs.statSync(candidate);
94
+ if (stats.isFile() && candidate.endsWith('.apk')) {
95
+ return candidate;
96
+ }
97
+ if (stats.isDirectory()) {
98
+ try {
99
+ const files = fs.readdirSync(candidate);
100
+ // Find newest APK in folder
101
+ const apkFiles = files
102
+ .filter(f => f.endsWith('.apk'))
103
+ .map(f => ({
104
+ file: path.join(candidate, f),
105
+ mtime: fs.statSync(path.join(candidate, f)).mtimeMs,
106
+ }))
107
+ .sort((a, b) => b.mtime - a.mtime);
108
+
109
+ if (apkFiles.length > 0 && apkFiles[0]) {
110
+ return apkFiles[0].file;
111
+ }
112
+ } catch {}
113
+ }
114
+ }
115
+ }
116
+
117
+ return null;
118
+ }
119
+
120
+ /**
121
+ * Dynamically discovers the project directory that contains Gradle wrapper (gradlew).
122
+ */
123
+ function findGradleDirectory(): { dir: string; cmd: string } {
124
+ const root = process.cwd();
125
+ const isWindows = process.platform === 'win32';
126
+ const gradlewName = isWindows ? 'gradlew.bat' : 'gradlew';
127
+
128
+ const candidates = [
129
+ path.join(root, 'android'),
130
+ path.join(root, 'example', 'android'),
131
+ path.join(root, '..', 'android'),
132
+ root,
133
+ ];
134
+
135
+ for (const candidate of candidates) {
136
+ const fullGradlew = path.join(candidate, gradlewName);
137
+ if (fs.existsSync(fullGradlew)) {
138
+ return { dir: candidate, cmd: fullGradlew };
139
+ }
140
+ }
141
+
142
+ return {
143
+ dir: path.join(root, 'android'),
144
+ cmd: isWindows ? 'gradlew.bat' : './gradlew',
145
+ };
146
+ }
147
+
148
+ let currentGradleProcess: any = null;
149
+
150
+ /**
151
+ * Spawns Gradle build process with live progress parsing.
152
+ */
153
+ function startGradleBuild(scheme = 'assembleRelease', clean = true): BuildJob {
154
+ if (activeBuildJob.status === 'running') {
155
+ return activeBuildJob;
156
+ }
157
+
158
+ const isWindows = process.platform === 'win32';
159
+ const { dir: androidDir, cmd: gradlewCmd } = findGradleDirectory();
160
+
161
+ // Ensure execution permissions on macOS/Linux
162
+ if (!isWindows && fs.existsSync(gradlewCmd)) {
163
+ try {
164
+ fs.chmodSync(gradlewCmd, '755');
165
+ } catch {}
166
+ }
167
+
168
+ const args = clean ? ['clean', scheme, '--console=plain'] : [scheme, '--console=plain'];
169
+
170
+ activeBuildJob = {
171
+ status: 'running',
172
+ scheme,
173
+ clean,
174
+ progress: 5,
175
+ currentTask: clean ? 'Cleaning build cache...' : 'Starting build...',
176
+ logs: [
177
+ `šŸš€ Initializing Gradle build (${scheme})...`,
178
+ `šŸ“ Working Directory: ${androidDir}`,
179
+ clean ? '🧹 Running: gradlew clean ' + scheme : '⚔ Running: gradlew ' + scheme,
180
+ ],
181
+ error: null,
182
+ startedAt: new Date().toISOString(),
183
+ completedAt: null,
184
+ apkName: null,
185
+ apkSize: null,
186
+ };
187
+
188
+ try {
189
+ const child = spawn(gradlewCmd, args, {
190
+ cwd: androidDir,
191
+ env: { ...process.env, CI: 'true' },
192
+ });
193
+ currentGradleProcess = child;
194
+
195
+ let taskCount = 0;
196
+ const estimatedTotalTasks = clean ? 42 : 32;
197
+
198
+ child.stdout.on('data', data => {
199
+ const output = data.toString();
200
+ const lines = output.split('\n');
201
+
202
+ for (const line of lines) {
203
+ const trimmed = line.trim();
204
+ if (trimmed) {
205
+ activeBuildJob.logs.push(trimmed);
206
+ if (activeBuildJob.logs.length > 150) {
207
+ activeBuildJob.logs.shift();
208
+ }
209
+ }
210
+ if (trimmed.startsWith('> Task :')) {
211
+ taskCount++;
212
+ const taskName = trimmed.replace('> Task ', '');
213
+ const calculatedProgress = Math.min(
214
+ 94,
215
+ Math.round(10 + (taskCount / estimatedTotalTasks) * 80),
216
+ );
217
+ activeBuildJob.progress = calculatedProgress;
218
+ activeBuildJob.currentTask = taskName;
219
+ } else if (trimmed.includes('BUILD SUCCESSFUL')) {
220
+ activeBuildJob.progress = 98;
221
+ activeBuildJob.currentTask = 'Finalizing APK package...';
222
+ }
223
+ }
224
+ });
225
+
226
+ child.stderr.on('data', data => {
227
+ const errStr = data.toString();
228
+ const lines = errStr.split('\n');
229
+ for (const line of lines) {
230
+ const trimmed = line.trim();
231
+ if (trimmed) {
232
+ activeBuildJob.logs.push(trimmed);
233
+ if (activeBuildJob.logs.length > 150) {
234
+ activeBuildJob.logs.shift();
235
+ }
236
+ }
237
+ }
238
+ if (errStr.includes('FAILURE') || errStr.includes('error:')) {
239
+ activeBuildJob.error = (activeBuildJob.error || '') + errStr.slice(0, 300);
240
+ }
241
+ });
242
+
243
+ child.on('close', code => {
244
+ currentGradleProcess = null;
245
+ activeBuildJob.completedAt = new Date().toISOString();
246
+ if (code === 0) {
247
+ activeBuildJob.status = 'completed';
248
+ activeBuildJob.progress = 100;
249
+ activeBuildJob.currentTask = 'Build finished successfully!';
250
+ activeBuildJob.logs.push('✨ BUILD SUCCESSFUL! APK generated.');
251
+ const apk = findDebugApk();
252
+ if (apk && fs.existsSync(apk)) {
253
+ const stats = fs.statSync(apk);
254
+ activeBuildJob.apkName = path.basename(apk);
255
+ activeBuildJob.apkSize = stats.size;
256
+ }
257
+ } else {
258
+ activeBuildJob.status = 'failed';
259
+ activeBuildJob.currentTask = 'Build failed';
260
+ activeBuildJob.logs.push(`āŒ Gradle build failed with exit code ${code}`);
261
+ if (!activeBuildJob.error) {
262
+ activeBuildJob.error = `Gradle exited with code ${code}`;
263
+ }
264
+ }
265
+ });
266
+
267
+ child.on('error', err => {
268
+ currentGradleProcess = null;
269
+ activeBuildJob.status = 'failed';
270
+ activeBuildJob.error = err.message;
271
+ activeBuildJob.currentTask = 'Failed to spawn Gradle';
272
+ activeBuildJob.logs.push(`āŒ Failed to spawn Gradle: ${err.message}`);
273
+ });
274
+ } catch (err: any) {
275
+ currentGradleProcess = null;
276
+ activeBuildJob.status = 'failed';
277
+ activeBuildJob.error = err?.message || 'Unknown spawn error';
278
+ activeBuildJob.currentTask = 'Error launching build';
279
+ activeBuildJob.logs.push(`āŒ Error: ${err?.message || 'Unknown spawn error'}`);
280
+ }
281
+
282
+ return activeBuildJob;
283
+ }
284
+
285
+ /**
286
+ * Stops any actively running Gradle build process.
287
+ */
288
+ export function stopGradleBuild(): BuildJob {
289
+ if (currentGradleProcess) {
290
+ try {
291
+ if (process.platform === 'win32') {
292
+ const { exec } = require('child_process');
293
+ exec(`taskkill /pid ${currentGradleProcess.pid} /T /F`);
294
+ } else {
295
+ currentGradleProcess.kill('SIGTERM');
296
+ setTimeout(() => {
297
+ try {
298
+ currentGradleProcess?.kill('SIGKILL');
299
+ } catch {}
300
+ }, 1000);
301
+ }
302
+ } catch {}
303
+ currentGradleProcess = null;
304
+ }
305
+
306
+ activeBuildJob.status = 'idle';
307
+ activeBuildJob.currentTask = 'Build cancelled';
308
+ activeBuildJob.error = 'Build cancelled by user';
309
+ activeBuildJob.logs.push('šŸ›‘ Build cancelled by user.');
310
+ activeBuildJob.completedAt = new Date().toISOString();
311
+ return activeBuildJob;
312
+ }
313
+
314
+ /**
315
+ * Metro Bundler Middleware for react-native-inapp-inspector.
316
+ * Automatically serves debug APK directly from Metro dev server (port 8081)
317
+ * with ZERO extra commands or servers needed.
318
+ * Dynamic IP, port, and APK filename detection included.
319
+ */
320
+ export function withInAppInspector(
321
+ metroConfig: any = {},
322
+ options: InAppInspectorMetroOptions = {},
323
+ ): any {
324
+ const customMiddleware = (req: any, res: any, next: any) => {
325
+ const url = req.url || '';
326
+ const cleanUrl = url.split('?')[0];
327
+ const serverPort = req.socket?.localPort || 8081;
328
+ const { primary: hostIp, all: allIps } = getLanIpAddresses();
329
+
330
+ // Build status endpoint
331
+ if (cleanUrl === '/__inapp_inspector/build-status') {
332
+ res.writeHead(200, {
333
+ 'Content-Type': 'application/json',
334
+ 'Access-Control-Allow-Origin': '*',
335
+ });
336
+ return res.end(JSON.stringify(activeBuildJob));
337
+ }
338
+
339
+ // Stop / Cancel Build endpoint
340
+ if (
341
+ cleanUrl === '/__inapp_inspector/stop-build' ||
342
+ cleanUrl === '/__inapp_inspector/cancel-build'
343
+ ) {
344
+ const job = stopGradleBuild();
345
+ res.writeHead(200, {
346
+ 'Content-Type': 'application/json',
347
+ 'Access-Control-Allow-Origin': '*',
348
+ });
349
+ return res.end(JSON.stringify(job));
350
+ }
351
+
352
+ // Build trigger endpoint (POST or GET with query params: scheme=assembleRelease&clean=true)
353
+ if (cleanUrl === '/__inapp_inspector/build-apk') {
354
+ res.writeHead(200, {
355
+ 'Content-Type': 'application/json',
356
+ 'Access-Control-Allow-Origin': '*',
357
+ });
358
+ const queryParams = new URLSearchParams(url.includes('?') ? url.split('?')[1] : '');
359
+ const scheme = queryParams.get('scheme') || 'assembleRelease';
360
+ const clean = queryParams.get('clean') !== 'false';
361
+
362
+ const job = startGradleBuild(scheme, clean);
363
+ return res.end(JSON.stringify(job));
364
+ }
365
+
366
+ // Status / Dynamic telemetry endpoint
367
+ if (
368
+ cleanUrl === '/__inapp_inspector/status' ||
369
+ cleanUrl === '/__inapp_inspector/apk-info'
370
+ ) {
371
+ const apk = findDebugApk(options.apkPath);
372
+ res.writeHead(200, {
373
+ 'Content-Type': 'application/json',
374
+ 'Access-Control-Allow-Origin': '*',
375
+ });
376
+ const apkName = apk ? path.basename(apk) : 'app-debug.apk';
377
+ const dynamicApkUrl = `http://${hostIp}:${serverPort}/${apkName}`;
378
+
379
+ if (apk && fs.existsSync(apk)) {
380
+ const stats = fs.statSync(apk);
381
+ return res.end(
382
+ JSON.stringify({
383
+ status: 'ready',
384
+ hasApk: true,
385
+ hostIp,
386
+ allIps,
387
+ port: serverPort,
388
+ apkName,
389
+ apkUrl: dynamicApkUrl,
390
+ apkSize: stats.size,
391
+ apkSizeBytes: stats.size,
392
+ modifiedAt: stats.mtime.toISOString(),
393
+ }),
394
+ );
395
+ } else {
396
+ return res.end(
397
+ JSON.stringify({
398
+ status: 'ready',
399
+ hasApk: false,
400
+ hostIp,
401
+ allIps,
402
+ port: serverPort,
403
+ apkName,
404
+ apkUrl: dynamicApkUrl,
405
+ message:
406
+ 'Debug APK not built yet. Run ./gradlew assembleDebug inside android directory.',
407
+ }),
408
+ );
409
+ }
410
+ }
411
+
412
+ // Direct APK download endpoint (matches /app-debug.apk, /__inapp_inspector/apk, or any *.apk)
413
+ if (
414
+ cleanUrl === '/app-debug.apk' ||
415
+ cleanUrl === '/__inapp_inspector/apk' ||
416
+ cleanUrl.endsWith('.apk') ||
417
+ (options.endpoint && cleanUrl === options.endpoint)
418
+ ) {
419
+ const apk = findDebugApk(options.apkPath);
420
+ if (apk && fs.existsSync(apk)) {
421
+ const stats = fs.statSync(apk);
422
+ const fileName = path.basename(apk);
423
+ res.writeHead(200, {
424
+ 'Content-Type': 'application/vnd.android.package-archive',
425
+ 'Content-Disposition': `attachment; filename="${fileName}"`,
426
+ 'Content-Length': stats.size,
427
+ 'Access-Control-Allow-Origin': '*',
428
+ });
429
+ return fs.createReadStream(apk).pipe(res);
430
+ } else {
431
+ res.writeHead(404, {
432
+ 'Content-Type': 'text/html; charset=utf-8',
433
+ 'Access-Control-Allow-Origin': '*',
434
+ });
435
+ return res.end(`
436
+ <!DOCTYPE html>
437
+ <html>
438
+ <head><title>Debug APK Not Found</title></head>
439
+ <body style="font-family: sans-serif; padding: 30px; text-align: center;">
440
+ <h2>Debug APK not built yet</h2>
441
+ <p>Please build the debug APK on your computer:</p>
442
+ <pre style="background: #f4f4f5; padding: 12px; display: inline-block; border-radius: 6px;">cd android && ./gradlew assembleDebug</pre>
443
+ <p>Once built, refresh this page or re-scan the QR code to install!</p>
444
+ </body>
445
+ </html>
446
+ `);
447
+ }
448
+ }
449
+
450
+ return next();
451
+ };
452
+
453
+ const prevEnhanceMiddleware = metroConfig.server?.enhanceMiddleware;
454
+ metroConfig.server = metroConfig.server || {};
455
+ metroConfig.server.enhanceMiddleware = (middleware: any, server: any) => {
456
+ const enhanced = prevEnhanceMiddleware
457
+ ? prevEnhanceMiddleware(middleware, server)
458
+ : middleware;
459
+ return (req: any, res: any, next: any) => {
460
+ customMiddleware(req, res, () => {
461
+ if (typeof enhanced === 'function') {
462
+ return enhanced(req, res, next);
463
+ }
464
+ return next();
465
+ });
466
+ };
467
+ };
468
+
469
+ return metroConfig;
470
+ }
471
+
472
+ /**
473
+ * Starts a standalone zero-config APK & telemetry HTTP server on any port (default: 8083).
474
+ * Perfect when you don't want to edit metro.config.js.
475
+ */
476
+ export function startStandaloneServer(port = 8083): any {
477
+ const http = require('http');
478
+ const { primary: hostIp, all: allIps } = getLanIpAddresses();
479
+
480
+ const server = http.createServer((req: any, res: any) => {
481
+ const url = req.url || '';
482
+ const cleanUrl = url.split('?')[0];
483
+ // Build status endpoint
484
+ if (cleanUrl === '/__inapp_inspector/build-status') {
485
+ res.writeHead(200, {
486
+ 'Content-Type': 'application/json',
487
+ 'Access-Control-Allow-Origin': '*',
488
+ });
489
+ return res.end(JSON.stringify(activeBuildJob));
490
+ }
491
+
492
+ // Stop / Cancel Build endpoint
493
+ if (
494
+ cleanUrl === '/__inapp_inspector/stop-build' ||
495
+ cleanUrl === '/__inapp_inspector/cancel-build'
496
+ ) {
497
+ const job = stopGradleBuild();
498
+ res.writeHead(200, {
499
+ 'Content-Type': 'application/json',
500
+ 'Access-Control-Allow-Origin': '*',
501
+ });
502
+ return res.end(JSON.stringify(job));
503
+ }
504
+
505
+ // Build trigger endpoint (POST or GET with query params: scheme=assembleRelease&clean=true)
506
+ if (cleanUrl === '/__inapp_inspector/build-apk') {
507
+ res.writeHead(200, {
508
+ 'Content-Type': 'application/json',
509
+ 'Access-Control-Allow-Origin': '*',
510
+ });
511
+ const queryParams = new URLSearchParams(url.includes('?') ? url.split('?')[1] : '');
512
+ const scheme = queryParams.get('scheme') || 'assembleRelease';
513
+ const clean = queryParams.get('clean') !== 'false';
514
+
515
+ const job = startGradleBuild(scheme, clean);
516
+ return res.end(JSON.stringify(job));
517
+ }
518
+
519
+ // Status / Health check
520
+ if (
521
+ cleanUrl === '/__inapp_inspector/status' ||
522
+ cleanUrl === '/__inapp_inspector/apk-info' ||
523
+ cleanUrl === '/apk-info'
524
+ ) {
525
+ const apk = findDebugApk();
526
+ res.writeHead(200, {
527
+ 'Content-Type': 'application/json',
528
+ 'Access-Control-Allow-Origin': '*',
529
+ });
530
+ const apkName = apk ? path.basename(apk) : 'app-debug.apk';
531
+ const dynamicApkUrl = `http://${hostIp}:${port}/${apkName}`;
532
+
533
+ if (apk && fs.existsSync(apk)) {
534
+ const stats = fs.statSync(apk);
535
+ return res.end(
536
+ JSON.stringify({
537
+ status: 'ready',
538
+ hasApk: true,
539
+ hostIp,
540
+ allIps,
541
+ port,
542
+ apkName,
543
+ apkUrl: dynamicApkUrl,
544
+ apkSize: stats.size,
545
+ apkSizeBytes: stats.size,
546
+ modifiedAt: stats.mtime.toISOString(),
547
+ }),
548
+ );
549
+ } else {
550
+ return res.end(
551
+ JSON.stringify({
552
+ status: 'ready',
553
+ hasApk: false,
554
+ hostIp,
555
+ allIps,
556
+ port,
557
+ apkName,
558
+ apkUrl: dynamicApkUrl,
559
+ message:
560
+ 'Debug APK not built yet. Run ./gradlew assembleDebug inside android directory.',
561
+ }),
562
+ );
563
+ }
564
+ }
565
+
566
+ // Direct APK download
567
+ if (
568
+ cleanUrl === '/app-debug.apk' ||
569
+ cleanUrl === '/__inapp_inspector/apk' ||
570
+ cleanUrl.endsWith('.apk')
571
+ ) {
572
+ const apk = findDebugApk();
573
+ if (apk && fs.existsSync(apk)) {
574
+ const stats = fs.statSync(apk);
575
+ const fileName = path.basename(apk);
576
+ res.writeHead(200, {
577
+ 'Content-Type': 'application/vnd.android.package-archive',
578
+ 'Content-Disposition': `attachment; filename="${fileName}"`,
579
+ 'Content-Length': stats.size,
580
+ 'Access-Control-Allow-Origin': '*',
581
+ });
582
+ return fs.createReadStream(apk).pipe(res);
583
+ }
584
+ }
585
+
586
+ res.writeHead(404, { 'Content-Type': 'text/plain', 'Access-Control-Allow-Origin': '*' });
587
+ return res.end('Not Found');
588
+ });
589
+
590
+ server.listen(port, '0.0.0.0', () => {
591
+ console.log(`\nšŸ“¦ [InAppInspector] APK Server listening at http://0.0.0.0:${port}`);
592
+ console.log(`šŸ“² Dynamic LAN IP: http://${hostIp}:${port}/app-debug.apk\n`);
593
+ });
594
+
595
+ return server;
596
+ }
597
+
598
+ export default withInAppInspector;