react-native-inapp-inspector 2.5.11 → 2.5.12
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.ar.md +0 -8
- package/README.de.md +0 -8
- package/README.es.md +0 -8
- package/README.fr.md +0 -8
- package/README.hi.md +0 -8
- package/README.ja.md +0 -8
- package/README.ko.md +0 -8
- package/README.md +54 -26
- package/README.pt-BR.md +0 -8
- package/README.ru.md +0 -8
- package/README.zh-CN.md +0 -8
- package/dist/commonjs/components/ConsoleLogCard.js +32 -26
- package/dist/commonjs/components/Inspector/AboutModal.js +1 -4
- package/dist/commonjs/components/Inspector/ConsoleTab.js +19 -14
- package/dist/commonjs/components/Inspector/InspectorHeader.js +6 -6
- package/dist/commonjs/components/Inspector/MainScreen.js +9 -6
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +187 -90
- package/dist/commonjs/components/Inspector/NetworkDetail.js +11 -8
- package/dist/commonjs/components/Inspector/NetworkTab.js +31 -32
- package/dist/commonjs/components/Inspector/PerformanceTab.d.ts +2 -0
- package/dist/commonjs/components/Inspector/PerformanceTab.js +652 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +256 -249
- package/dist/commonjs/components/Inspector/TabBar.js +17 -16
- package/dist/commonjs/components/LogCard.js +11 -8
- package/dist/commonjs/components/NetworkIcons.d.ts +6 -0
- package/dist/commonjs/components/NetworkIcons.js +35 -3
- package/dist/commonjs/constants/index.d.ts +1 -0
- package/dist/commonjs/constants/index.js +1 -1
- package/dist/commonjs/constants/telemetryConfig.d.ts +3 -3
- package/dist/commonjs/constants/telemetryConfig.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/helpers/index.d.ts +3 -0
- package/dist/commonjs/helpers/index.js +8 -6
- package/dist/commonjs/helpers/performanceSampler.d.ts +88 -0
- package/dist/commonjs/helpers/performanceSampler.js +1 -0
- package/dist/commonjs/helpers/remoteConfig.d.ts +0 -2
- package/dist/commonjs/helpers/remoteConfig.js +1 -1
- package/dist/commonjs/i18n/locales/ar.json +1 -1
- package/dist/commonjs/i18n/locales/bn.json +1 -1
- package/dist/commonjs/i18n/locales/de.json +1 -1
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/i18n/locales/es.json +1 -1
- package/dist/commonjs/i18n/locales/fr.json +1 -1
- package/dist/commonjs/i18n/locales/gu.json +1 -1
- package/dist/commonjs/i18n/locales/hi.json +1 -1
- package/dist/commonjs/i18n/locales/id.json +1 -1
- package/dist/commonjs/i18n/locales/it.json +1 -1
- package/dist/commonjs/i18n/locales/ja.json +1 -1
- package/dist/commonjs/i18n/locales/kn.json +1 -1
- package/dist/commonjs/i18n/locales/ko.json +1 -1
- package/dist/commonjs/i18n/locales/ml.json +1 -1
- package/dist/commonjs/i18n/locales/mr.json +1 -1
- package/dist/commonjs/i18n/locales/nl.json +1 -1
- package/dist/commonjs/i18n/locales/pa.json +1 -1
- package/dist/commonjs/i18n/locales/pl.json +1 -1
- package/dist/commonjs/i18n/locales/pt.json +1 -1
- package/dist/commonjs/i18n/locales/ru.json +1 -1
- package/dist/commonjs/i18n/locales/ta.json +1 -1
- package/dist/commonjs/i18n/locales/te.json +1 -1
- package/dist/commonjs/i18n/locales/tr.json +1 -1
- package/dist/commonjs/i18n/locales/vi.json +1 -1
- package/dist/commonjs/i18n/locales/zh.json +1 -1
- package/dist/commonjs/index.d.ts +3 -3
- package/dist/commonjs/index.js +3 -3
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/enums.d.ts +1 -0
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/interfaces.d.ts +8 -0
- package/dist/esm/components/ConsoleLogCard.js +67 -61
- package/dist/esm/components/Inspector/AboutModal.js +14 -17
- package/dist/esm/components/Inspector/ConsoleTab.js +33 -28
- package/dist/esm/components/Inspector/InspectorHeader.js +6 -6
- package/dist/esm/components/Inspector/MainScreen.js +61 -58
- package/dist/esm/components/Inspector/MediaGalleryTab.js +254 -157
- package/dist/esm/components/Inspector/NetworkDetail.js +62 -59
- package/dist/esm/components/Inspector/NetworkTab.js +101 -102
- package/dist/esm/components/Inspector/PerformanceTab.d.ts +2 -0
- package/dist/esm/components/Inspector/PerformanceTab.js +652 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +299 -292
- package/dist/esm/components/Inspector/TabBar.js +4 -3
- package/dist/esm/components/LogCard.js +37 -34
- package/dist/esm/components/NetworkIcons.d.ts +6 -0
- package/dist/esm/components/NetworkIcons.js +32 -0
- package/dist/esm/constants/index.d.ts +1 -0
- package/dist/esm/constants/index.js +1 -1
- package/dist/esm/constants/telemetryConfig.d.ts +3 -3
- package/dist/esm/constants/telemetryConfig.js +1 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/helpers/index.d.ts +3 -0
- package/dist/esm/helpers/index.js +8 -6
- package/dist/esm/helpers/performanceSampler.d.ts +88 -0
- package/dist/esm/helpers/performanceSampler.js +1 -0
- package/dist/esm/helpers/remoteConfig.d.ts +0 -2
- package/dist/esm/helpers/remoteConfig.js +1 -1
- package/dist/esm/i18n/locales/ar.json +1 -1
- package/dist/esm/i18n/locales/bn.json +1 -1
- package/dist/esm/i18n/locales/de.json +1 -1
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/i18n/locales/es.json +1 -1
- package/dist/esm/i18n/locales/fr.json +1 -1
- package/dist/esm/i18n/locales/gu.json +1 -1
- package/dist/esm/i18n/locales/hi.json +1 -1
- package/dist/esm/i18n/locales/id.json +1 -1
- package/dist/esm/i18n/locales/it.json +1 -1
- package/dist/esm/i18n/locales/ja.json +1 -1
- package/dist/esm/i18n/locales/kn.json +1 -1
- package/dist/esm/i18n/locales/ko.json +1 -1
- package/dist/esm/i18n/locales/ml.json +1 -1
- package/dist/esm/i18n/locales/mr.json +1 -1
- package/dist/esm/i18n/locales/nl.json +1 -1
- package/dist/esm/i18n/locales/pa.json +1 -1
- package/dist/esm/i18n/locales/pl.json +1 -1
- package/dist/esm/i18n/locales/pt.json +1 -1
- package/dist/esm/i18n/locales/ru.json +1 -1
- package/dist/esm/i18n/locales/ta.json +1 -1
- package/dist/esm/i18n/locales/te.json +1 -1
- package/dist/esm/i18n/locales/tr.json +1 -1
- package/dist/esm/i18n/locales/vi.json +1 -1
- package/dist/esm/i18n/locales/zh.json +1 -1
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +8 -8
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/enums.d.ts +1 -0
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/interfaces.d.ts +8 -0
- package/package.json +24 -1
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.2.0/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/results.bin +0 -1
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/BuildConfig.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/InAppInspectorFloatingView$iconView$1.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/InAppInspectorFloatingView.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NativeNetworkInspectorSpec.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$Companion.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$activityEventListener$1.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$frameCallback$1.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$getCapturedMedia$lambda$57$$inlined$sortedByDescending$1.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$shakeListener$1.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$startVideoRecording$2$1.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorPackage.dex +0 -0
- package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/.transforms/c93e459e24d856bde563ebb048265732/results.bin +0 -1
- package/android/build/.transforms/c93e459e24d856bde563ebb048265732/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/com/inappinspector/BuildConfig.java +0 -10
- package/android/build/generated/source/codegen/java/com/inappinspector/NativeNetworkInspectorSpec.java +0 -160
- package/android/build/generated/source/codegen/jni/CMakeLists.txt +0 -28
- package/android/build/generated/source/codegen/jni/RNInAppInspectorSpec-generated.cpp +0 -212
- package/android/build/generated/source/codegen/jni/RNInAppInspectorSpec.h +0 -31
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ComponentDescriptors.cpp +0 -22
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ComponentDescriptors.h +0 -24
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/EventEmitters.cpp +0 -16
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/EventEmitters.h +0 -17
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/Props.cpp +0 -19
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/Props.h +0 -18
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/RNInAppInspectorSpecJSI.h +0 -300
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ShadowNodes.cpp +0 -17
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ShadowNodes.h +0 -23
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/States.cpp +0 -16
- package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/States.h +0 -20
- package/android/build/generated/source/codegen/schema.json +0 -1
- 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/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
- package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/inappinspector/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/inappinspector/NativeNetworkInspectorSpec.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/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/InAppInspectorFloatingView$iconView$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/InAppInspectorFloatingView.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NativeNetworkInspectorSpec.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$activityEventListener$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$frameCallback$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$getCapturedMedia$lambda$57$$inlined$sortedByDescending$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$shakeListener$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$startVideoRecording$2$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorPackage.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- 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/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/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -17
- package/android/build/reports/problems/problems-report.html +0 -659
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/InAppInspectorFloatingView$iconView$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/InAppInspectorFloatingView.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$activityEventListener$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$frameCallback$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$getCapturedMedia$lambda$57$$inlined$sortedByDescending$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$shakeListener$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$startVideoRecording$2$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorPackage.class +0 -0
- package/dist/commonjs/a11y.d.ts +0 -2
- package/dist/commonjs/a11y.js +0 -1
- package/dist/commonjs/components/Inspector/A11yTab.d.ts +0 -2
- package/dist/commonjs/components/Inspector/A11yTab.js +0 -268
- package/dist/commonjs/components/Inspector/DeveloperSponsorCard.d.ts +0 -9
- package/dist/commonjs/components/Inspector/DeveloperSponsorCard.js +0 -52
- package/dist/commonjs/customHooks/a11yAdapter.d.ts +0 -11
- package/dist/commonjs/customHooks/a11yAdapter.js +0 -1
- package/dist/commonjs/helpers/sponsorService.d.ts +0 -20
- package/dist/commonjs/helpers/sponsorService.js +0 -1
- package/dist/esm/a11y.d.ts +0 -2
- package/dist/esm/a11y.js +0 -1
- package/dist/esm/components/Inspector/A11yTab.d.ts +0 -2
- package/dist/esm/components/Inspector/A11yTab.js +0 -268
- package/dist/esm/components/Inspector/DeveloperSponsorCard.d.ts +0 -9
- package/dist/esm/components/Inspector/DeveloperSponsorCard.js +0 -52
- package/dist/esm/customHooks/a11yAdapter.d.ts +0 -11
- package/dist/esm/customHooks/a11yAdapter.js +0 -1
- package/dist/esm/helpers/sponsorService.d.ts +0 -20
- package/dist/esm/helpers/sponsorService.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ce,{useRef as _,useState as F}from"react";import{Platform as de,ScrollView as Ce,Text as P,TouchableOpacity as U,View as C}from"react-native";import{useInspector as ke}from"./InspectorContext";import{useTranslation as we}from"../../i18n";import v from"../../styles";import{AppColors as o}from"../../styles/AppColors";import{AppFonts as T}from"../../styles/AppFonts";import G from"../TouchableScale";import{SignalIcon as Se,TerminalIcon as Ie,AnalyticsIcon as Re,ReduxIcon as Te,CrashIcon as Be,BellIcon as Pe,SmartphoneIcon as Le,DatabaseIcon as Ae,QrCodeIcon as Ve,ScreencastIcon as Oe,ChevronIcon as Q,WebsocketIcon as De}from"../NetworkIcons";import{isReduxConnected as
|
|
1
|
+
import ce,{useRef as _,useState as F}from"react";import{Platform as de,ScrollView as Ce,Text as P,TouchableOpacity as U,View as C}from"react-native";import{useInspector as ke}from"./InspectorContext";import{useTranslation as we}from"../../i18n";import v from"../../styles";import{AppColors as o}from"../../styles/AppColors";import{AppFonts as T}from"../../styles/AppFonts";import G from"../TouchableScale";import{SignalIcon as Se,TerminalIcon as Ie,AnalyticsIcon as Re,ReduxIcon as Te,CrashIcon as Be,BellIcon as Pe,SmartphoneIcon as Le,DatabaseIcon as Ae,QrCodeIcon as Ve,ScreencastIcon as Oe,ChevronIcon as Q,WebsocketIcon as De,SpeedometerIcon as Ee}from"../NetworkIcons";import{isReduxConnected as He}from"../../customHooks/reduxLogger";import{isAnalyticsConnected as We}from"../../customHooks/analyticsLogger";import{isLocalDebugEnvironment as $e}from"../../helpers";const n={themeColor:o.brandPurple,bgInactive:`${o.brandPurple}0D`,borderInactive:`${o.brandPurple}2B`,iconInactive:o.brandPurple,idBadgeBg:`${o.brandPurple}1C`,idBadgeBorder:`${o.brandPurple}3D`,idBadgeText:o.brandPurple},q={apis:n,logs:n,perf:n,analytics:n,redux:n,storage:n,device:n,crash:n,push:n,socket:n,debugging:n,media:n},je=ce.memo(()=>{const{t:J}=we(),{activeTab:w,switchActiveTab:L,tabVisibility:B,logs:A,consoleLogs:V,analyticsEvents:K,crashRecords:O,pushRecords:D,socketRecords:E,unreadPushCount:N,unreadSocketCount:X,lastReadApisCount:Y,lastReadLogsCount:Z,lastReadCrashesCount:ee,lastReadSocketCount:oe,mediaCount:H}=ke(),te=He(),ie=We(),k=w==="media",x=(B?.media??!0)&&(H>0||k||__DEV__),W=_(null),[z,re]=F(!1),[$,ne]=F(!0),j=_(0),le=e=>{const{contentOffset:t,layoutMeasurement:i,contentSize:r}=e.nativeEvent,S=t.x;j.current=S;const I=S>8,R=S<r.width-i.width-8;z!==I&&re(I),$!==R&&ne(R)},M=e=>{W.current?.scrollTo({x:Math.max(0,j.current+e),animated:!0})};return<C style={[v.tabBarContainer,{flexDirection:"row",alignItems:"center",paddingHorizontal:0}]}>
|
|
2
2
|
|
|
3
3
|
{z&&<U onPress={()=>M(-160)}hitSlop={{top:6,bottom:6,left:6,right:6}}activeOpacity={.7}style={{paddingLeft:6,paddingRight:2,justifyContent:"center",alignItems:"center"}}>
|
|
4
4
|
<C style={{width:22,height:22,borderRadius:11,backgroundColor:o.grayBorderSecondary,alignItems:"center",justifyContent:"center"}}>
|
|
@@ -8,10 +8,11 @@ import ce,{useRef as _,useState as F}from"react";import{Platform as de,ScrollVie
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
<Ce testID="inspector.tab.scrollview"ref={W}horizontal showsHorizontalScrollIndicator={!1}onScroll={le}scrollEventThrottle={16}style={{flex:1}}contentContainerStyle={{paddingLeft:z?4:12,paddingRight:x?6:12}}>
|
|
11
|
-
{[{id:1,key:"apis",label:"APIs",count:A.length,icon:"apis"},{id:2,key:"logs",label:"Logs",count:V.length,icon:"logs"},{id:3,key:"analytics",label:"Analytics",count:K.length,icon:"analytics"},{id:
|
|
11
|
+
{[{id:1,key:"apis",label:"APIs",count:A.length,icon:"apis"},{id:2,key:"logs",label:"Logs",count:V.length,icon:"logs"},{id:3,key:"perf",label:"Perf / FPS",count:0,icon:"perf"},{id:4,key:"analytics",label:"Analytics",count:K.length,icon:"analytics"},{id:5,key:"redux",label:"Redux",count:0,icon:"redux"},{id:6,key:"storage",label:"Storage",count:0,icon:"storage"},{id:7,key:"device",label:"Device",count:0,icon:"device"},{id:8,key:"crash",label:"Crash",count:O?.length||0,icon:"crash"},{id:9,key:"push",label:"Push",count:D?.length||0,icon:"push"},{id:10,key:"socket",label:"WebSocket",count:E?.length||0,icon:"socket"},{id:11,key:"debugging",label:"Debugging",count:0,icon:"debugging"}].filter(e=>e.key==="debugging"?de.OS==="android"&&$e()&&!!B?.debugging:!(!B?.[e.key]||e.key==="redux"&&!te||e.key==="analytics"&&!ie)).map(e=>{const t=w===e.key,i=q[e.key]||q.apis,r=t?o.white:i.iconInactive,S=e.count>99?"99+":String(e.count),I=w!=="apis"&&A.length>Y,R=w!=="logs"&&V.length>Z,se=w!=="crash"&&(O?.length||0)>(ee||0),ae=w!=="socket"&&((E?.length||0)>(oe||0)||X>0);return<G key={e.key}testID={`inspector.tab.${e.key}`}onPress={()=>{L(e.key)}}style={[v.contentTabButton,{backgroundColor:t?i.themeColor:i.bgInactive,borderColor:t?i.themeColor:i.borderInactive},t&&{shadowColor:i.themeColor,shadowOffset:{width:0,height:2},shadowOpacity:.28,shadowRadius:3.5,elevation:3}]}>
|
|
12
12
|
<C style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
13
13
|
{e.icon==="apis"&&<Se color={r}size={14}/>}
|
|
14
14
|
{e.icon==="logs"&&<Ie color={r}size={14}/>}
|
|
15
|
+
{e.icon==="perf"&&<Ee color={r}size={14}/>}
|
|
15
16
|
{e.icon==="analytics"&&<Re color={r}size={14}/>}
|
|
16
17
|
{e.icon==="redux"&&<Te color={r}size={14}/>}
|
|
17
18
|
{e.icon==="storage"&&<Ae color={r}size={14}/>}
|
|
@@ -54,4 +55,4 @@ import ce,{useRef as _,useState as F}from"react";import{Platform as de,ScrollVie
|
|
|
54
55
|
</C>
|
|
55
56
|
</G>
|
|
56
57
|
</C>}
|
|
57
|
-
</C>});export default
|
|
58
|
+
</C>});export default je;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import
|
|
1
|
+
import re,{useEffect as ne,useRef as le,useMemo as ae}from"react";import{Alert as E,Animated as D,Linking as ie,View as C,Pressable as F,Text as T,StyleSheet as U}from"react-native";import Ce,{Path as Te}from"react-native-svg";import{AppColors as e}from"../styles/AppColors";import{METHOD_COLORS as A}from"../constants";import{getStatusColor as Se,getDurationColor as Be,formatDateTime as Re,getSize as He,getPath as Ve,getBaseUrl as ze,openWithPostman as q}from"../helpers";import{CalendarIcon as Ie,ClockIcon as N,SizeIcon as Le,CircleCheckIcon as Pe,CircleAlertIcon as $e,CircleXIcon as Oe,RepeatIcon as De,ForwardChevronIcon as Fe,GlobeIcon as We,PostmanIcon as Me}from"./NetworkIcons";import{AppFonts as S}from"../styles/AppFonts";import G from"./HighlightText";import Ee from"./TouchableScale";import{useTranslation as Ue}from"../i18n";function Ae({item:o,onPress:B,timelineMinStart:Ne,timelineTotalRange:Ge,isNew:L,isSelected:W,onToggleSelect:J,searchStr:j,testID:K}){const{t:R}=Ue(),M=A[o.method]??A.ALL,V=ae(()=>{try{const r=new URL(o.url),O=r.host,v=r.pathname+(r.search?r.search:""),te=r.protocol==="https:";return{host:O,path:v||"/",isHttps:te}}catch{const r=o.url.toLowerCase().startsWith("https:"),O=Ve(o.url);return{host:ze(o.url).replace(/^https?:\/\//,""),path:O||o.url,isHttps:r}}},[o.url]),Q=r=>{r?.stopPropagation?.(),E.alert(R("common.openInBrowser")||"Open URL",`${R("common.openInBrowserPrompt")||"Choose how you want to open or inspect this URL:"}
|
|
2
2
|
|
|
3
|
-
${
|
|
4
|
-
<
|
|
3
|
+
${o.url}`,[{text:R("common.cancel")||"Cancel",style:"cancel"},{text:"Open in Postman",onPress:()=>q(o)},{text:R("common.open")||"Browser",onPress:()=>{ie.openURL(o.url).catch(()=>{E.alert(R("common.error")||"Error",R("common.cannotOpenUrl")||"Could not open URL")})}}])},X=r=>{r?.stopPropagation?.(),q(o)},H=o.status===0||o.status!=null&&o.status>=400,z=o.status==null,P=Se(o.status),I=Be(o.duration),_=z?e.darkOrange:H?e.errorColor:e.greenColor,$=le(new D.Value(L?.35:0)).current;ne(()=>{L&&D.timing($,{toValue:0,duration:1200,useNativeDriver:!0}).start()},[L,$]);const Y=()=>{if(z)return"...";if(o.status===0||o.status==null)return R("network.statusFailed")||"FAILED";const r=typeof o.status=="number"?o.status:parseInt(String(o.status||0),10);return r===200?"200 OK":r===201?"201 Created":r===204?"204 No Content":r===304?"304 Not Modified":r===400?"400 Bad Req":r===401?"401 Unauth":r===403?"403 Forbidden":r===404?"404 Not Found":r===500?"500 Error":String(o.status)},Z=()=>{if(z)return<N color={e.darkOrange}size={10}/>;const r=typeof o.status=="number"?o.status:parseInt(String(o.status||0),10);return r>=200&&r<300?<Pe color={e.greenColor}size={10}/>:r>=300&&r<400?<De color={e.amber700}size={10}/>:r>=400&&r<500?<$e color={e.darkOrange}size={10}/>:<Oe color={e.errorColor}size={10}/>},ee=Re(o.startTime),oe=o.url.split("?")[0].toLowerCase().endsWith(".json");return<C style={t.container}>
|
|
4
|
+
<Ee testID={K}onPress={B}style={[t.card,{borderLeftWidth:3.5,borderLeftColor:_,backgroundColor:H?e.errorCardBg:e.white}]}>
|
|
5
5
|
<C style={t.cardBody}>
|
|
6
6
|
|
|
7
7
|
<C style={t.cardHeaderRow}>
|
|
8
8
|
<C style={t.cardHeaderLeft}>
|
|
9
|
-
<
|
|
10
|
-
{
|
|
9
|
+
<F onPress={()=>J(o.id)}hitSlop={12}style={[t.smallCheckbox,W&&t.smallCheckboxChecked]}>
|
|
10
|
+
{W&&<Ce width={9}height={9}viewBox="0 0 24 24"fill="none">
|
|
11
11
|
<Te d="M20 6L9 17l-5-5"stroke={e.white}strokeWidth="4"strokeLinecap="round"strokeLinejoin="round"/>
|
|
12
12
|
</Ce>}
|
|
13
|
-
</
|
|
13
|
+
</F>
|
|
14
14
|
|
|
15
|
-
<T style={t.serialNumber}>#{
|
|
15
|
+
<T style={t.serialNumber}>#{o.id+1}</T>
|
|
16
16
|
|
|
17
|
-
<C style={[t.methodBadge,{backgroundColor:
|
|
17
|
+
<C style={[t.methodBadge,{backgroundColor:M}]}>
|
|
18
18
|
<T style={t.methodBadgeText}>
|
|
19
|
-
{
|
|
19
|
+
{o.method}
|
|
20
20
|
</T>
|
|
21
21
|
</C>
|
|
22
22
|
|
|
23
|
-
{
|
|
24
|
-
<T style={[t.chipText,{color:
|
|
25
|
-
{
|
|
23
|
+
{o.client&&<C style={[t.chip,{backgroundColor:o.client==="axios"?`${e.purple}14`:o.client==="apollo"||o.client==="graphql"?`${e.pink500}14`:o.client==="xhr"?`${e.amber500}14`:`${e.sky500}14`,borderColor:o.client==="axios"?`${e.purple}30`:o.client==="apollo"||o.client==="graphql"?`${e.pink500}30`:o.client==="xhr"?`${e.amber500}30`:`${e.sky500}30`}]}>
|
|
24
|
+
<T style={[t.chipText,{color:o.client==="axios"?e.purple:o.client==="apollo"||o.client==="graphql"?e.pink500:o.client==="xhr"?e.amber700:e.sky600}]}>
|
|
25
|
+
{o.client.toUpperCase()}
|
|
26
26
|
</T>
|
|
27
27
|
</C>}
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
{(
|
|
30
|
+
{(o.url.toLowerCase().includes("graphql")||o.client==="apollo"||o.client==="graphql")&&<C style={[t.chip,{backgroundColor:e.roseBg,borderColor:e.roseBorder}]}>
|
|
31
31
|
<T style={[t.chipText,{color:e.pink600}]}>
|
|
32
32
|
GQL
|
|
33
33
|
</T>
|
|
@@ -35,15 +35,18 @@ ${r.url}`,[{text:R("common.cancel")||"Cancel",style:"cancel"},{text:R("common.op
|
|
|
35
35
|
</C>
|
|
36
36
|
|
|
37
37
|
<C style={t.cardHeaderRight}>
|
|
38
|
-
<C style={[t.statusPill,{backgroundColor:H?`${e.errorColor}14`:z?`${e.darkOrange}14`:`${
|
|
39
|
-
{
|
|
40
|
-
<T style={[t.statusPillText,{color:H?e.errorColor:z?e.darkOrange
|
|
41
|
-
{
|
|
38
|
+
<C style={[t.statusPill,{backgroundColor:H?`${e.errorColor}14`:z?`${e.darkOrange}14`:`${P}14`,borderColor:H?`${e.errorColor}33`:z?`${e.darkOrange}33`:`${P}33`}]}>
|
|
39
|
+
{Z()}
|
|
40
|
+
<T style={[t.statusPillText,{color:H?e.errorColor:z?e.darkOrange:P}]}>
|
|
41
|
+
{Y()}
|
|
42
42
|
</T>
|
|
43
43
|
</C>
|
|
44
|
-
<
|
|
45
|
-
<
|
|
46
|
-
</
|
|
44
|
+
<F onPress={Q}hitSlop={8}style={t.globeBtn}accessibilityRole="button"accessibilityLabel="Open in Browser">
|
|
45
|
+
<We color={e.grayTextWeak}size={12}/>
|
|
46
|
+
</F>
|
|
47
|
+
<F onPress={X}hitSlop={8}style={[t.globeBtn,{backgroundColor:"rgba(255, 108, 55, 0.12)",borderColor:"rgba(255, 108, 55, 0.28)"}]}accessibilityRole="button"accessibilityLabel="Open with Postman">
|
|
48
|
+
<Me color="#FF6C37"size={11}/>
|
|
49
|
+
</F>
|
|
47
50
|
<Fe color={e.grayTextWeak}size={13}/>
|
|
48
51
|
</C>
|
|
49
52
|
</C>
|
|
@@ -58,21 +61,21 @@ ${r.url}`,[{text:R("common.cancel")||"Cancel",style:"cancel"},{text:R("common.op
|
|
|
58
61
|
{V.isHttps?"HTTPS":"HTTP"}
|
|
59
62
|
</T>
|
|
60
63
|
</C>
|
|
61
|
-
<G text={V.host||
|
|
64
|
+
<G text={V.host||o.url}search={j}style={t.hostText}highlightStyle={t.highlight}numberOfLines={1}ellipsizeMode="tail"/>
|
|
62
65
|
</C>
|
|
63
66
|
<C style={t.urlBadgeRow}>
|
|
64
|
-
{
|
|
67
|
+
{oe&&<C style={t.jsonBadge}>
|
|
65
68
|
<T style={t.jsonBadgeText}>.json</T>
|
|
66
69
|
</C>}
|
|
67
|
-
{
|
|
68
|
-
<T style={t.dupBadgeText}>×{
|
|
70
|
+
{o.duplicateCount!=null&&o.duplicateCount>1&&<C style={t.dupBadge}>
|
|
71
|
+
<T style={t.dupBadgeText}>×{o.duplicateCount}</T>
|
|
69
72
|
</C>}
|
|
70
73
|
</C>
|
|
71
74
|
</C>
|
|
72
75
|
|
|
73
76
|
|
|
74
77
|
<C style={t.slugRow}>
|
|
75
|
-
<G text={V.path}search={
|
|
78
|
+
<G text={V.path}search={j}style={t.pathText}highlightStyle={t.highlight}numberOfLines={1}ellipsizeMode="middle"/>
|
|
76
79
|
</C>
|
|
77
80
|
</C>
|
|
78
81
|
|
|
@@ -81,22 +84,22 @@ ${r.url}`,[{text:R("common.cancel")||"Cancel",style:"cancel"},{text:R("common.op
|
|
|
81
84
|
<C style={t.footerLeft}>
|
|
82
85
|
<C style={t.cardDateRow}>
|
|
83
86
|
<Ie color={e.grayTextWeak}size={10}/>
|
|
84
|
-
<T style={t.cardDateText}numberOfLines={1}>{
|
|
87
|
+
<T style={t.cardDateText}numberOfLines={1}>{ee}</T>
|
|
85
88
|
</C>
|
|
86
89
|
</C>
|
|
87
90
|
|
|
88
91
|
<C style={t.footerRight}>
|
|
89
|
-
{
|
|
92
|
+
{o.response!=null&&<C style={t.metaStatChip}>
|
|
90
93
|
<Le color={e.purple}size={9}/>
|
|
91
94
|
<T style={t.metaStatText}>
|
|
92
|
-
{He(
|
|
95
|
+
{He(o.response)}
|
|
93
96
|
</T>
|
|
94
97
|
</C>}
|
|
95
98
|
|
|
96
|
-
{
|
|
99
|
+
{o.duration!=null&&!H&&<C style={[t.metaStatChip,{backgroundColor:`${I}12`,borderColor:`${I}2E`}]}>
|
|
97
100
|
<N color={I}size={9}/>
|
|
98
101
|
<T style={[t.metaStatText,{color:I}]}>
|
|
99
|
-
{
|
|
102
|
+
{o.duration}ms
|
|
100
103
|
</T>
|
|
101
104
|
</C>}
|
|
102
105
|
</C>
|
|
@@ -104,10 +107,10 @@ ${r.url}`,[{text:R("common.cancel")||"Cancel",style:"cancel"},{text:R("common.op
|
|
|
104
107
|
|
|
105
108
|
|
|
106
109
|
<C style={t.waterfallContainer}>
|
|
107
|
-
{typeof
|
|
110
|
+
{typeof o.duration=="number"&&o.duration>0&&!H&&<C style={[t.waterfallBar,{width:`${Math.min(100,Math.max(6,o.duration/1200*100))}%`,backgroundColor:I}]}/>}
|
|
108
111
|
</C>
|
|
109
112
|
</C>
|
|
110
113
|
|
|
111
|
-
{L&&<
|
|
112
|
-
</
|
|
113
|
-
</C>}const t=
|
|
114
|
+
{L&&<D.View pointerEvents="none"style={[U.absoluteFill,{backgroundColor:M,opacity:$}]}/>}
|
|
115
|
+
</Ee>
|
|
116
|
+
</C>}const t=U.create({container:{paddingHorizontal:8,paddingVertical:4,height:126,justifyContent:"center"},card:{height:118,alignSelf:"stretch",borderRadius:10,overflow:"hidden",borderWidth:1,borderColor:e.dividerColor,shadowColor:e.shadowColorString},cardBody:{height:"100%",paddingHorizontal:8,paddingTop:8,paddingBottom:6,justifyContent:"space-between"},cardHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:22,minHeight:22,maxHeight:22},cardHeaderLeft:{flexDirection:"row",alignItems:"center",flex:1,marginRight:4,gap:4.5,minWidth:0,overflow:"hidden"},cardHeaderRight:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},smallCheckbox:{width:15,height:15,borderRadius:4,borderWidth:1.5,borderColor:e.grayTextWeak,alignItems:"center",justifyContent:"center",backgroundColor:e.white},smallCheckboxChecked:{backgroundColor:e.purple,borderColor:e.purple},serialNumber:{fontFamily:S.interBold,color:e.grayTextWeak,fontSize:10},methodBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:5,alignItems:"center",justifyContent:"center"},methodBadgeText:{fontFamily:S.interBold,fontSize:9.5,lineHeight:12,letterSpacing:.5,color:e.white},chip:{paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:4,borderWidth:1},chipText:{fontFamily:S.interBold,fontSize:9,lineHeight:12},statusPill:{flexDirection:"row",alignItems:"center",gap:3.5,paddingHorizontal:6,paddingVertical:2,borderRadius:6,borderWidth:1,flexShrink:0},statusPillText:{fontFamily:S.interBold,fontSize:9.5,lineHeight:12},globeBtn:{padding:3,borderRadius:4,backgroundColor:`${e.grayTextWeak}12`,alignItems:"center",justifyContent:"center"},urlBox:{backgroundColor:e.grayBackground,borderRadius:7,borderWidth:1,borderColor:e.dividerColor,paddingHorizontal:7,paddingVertical:4.5,height:48,minHeight:48,maxHeight:48,justifyContent:"center",gap:2.5,overflow:"hidden"},urlMainRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:4,minHeight:16},hostRow:{flexDirection:"row",alignItems:"center",gap:5,flex:1,minWidth:0},protoBadge:{paddingHorizontal:4,paddingVertical:1,borderRadius:3.5,borderWidth:1},protoBadgeText:{fontFamily:S.interBold,fontSize:8,lineHeight:10},hostText:{fontFamily:S.interBold,fontSize:11.5,lineHeight:15,color:e.primaryBlack,flex:1},urlBadgeRow:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},jsonBadge:{backgroundColor:`${e.darkOrange}14`,borderColor:`${e.darkOrange}2E`,borderWidth:1,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3.5},jsonBadgeText:{fontFamily:S.interBold,fontSize:8.5,color:e.darkOrange},dupBadge:{backgroundColor:`${e.purple}14`,borderColor:`${e.purple}2E`,borderWidth:1,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3.5},dupBadgeText:{fontFamily:S.interBold,fontSize:8.5,color:e.purple},slugRow:{flexDirection:"row",alignItems:"center",minHeight:15},pathText:{fontFamily:S.interMedium,fontSize:10.5,lineHeight:14,color:e.slate600||e.grayText,flex:1},highlight:{backgroundColor:e.yellowHighlight,color:e.primaryBlack,borderRadius:2},cardFooterRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:18,minHeight:18,maxHeight:18,gap:4},footerLeft:{flexDirection:"row",alignItems:"center",gap:4.5,flex:1,minWidth:0,overflow:"hidden"},footerRight:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},cardDateRow:{flexDirection:"row",alignItems:"center",gap:3.5},cardDateText:{fontFamily:S.interRegular,fontSize:10,lineHeight:13,color:e.slate400},metaStatChip:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:e.violetSoftBg,borderColor:e.violetSoftBorder,borderWidth:1,paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:4},metaStatText:{fontFamily:S.interBold,color:e.violetSoftText,fontSize:9,lineHeight:12},waterfallContainer:{height:2.5,width:"100%",backgroundColor:e.graySurface,borderRadius:1.5,overflow:"hidden",marginTop:2},waterfallBar:{height:"100%",borderRadius:1.5}});function qe(o,B){return o.item===B.item&&o.isSelected===B.isSelected&&o.isNew===B.isNew&&o.searchStr===B.searchStr&&o.timelineMinStart===B.timelineMinStart&&o.timelineTotalRange===B.timelineTotalRange&&o.onPress===B.onPress&&o.onToggleSelect===B.onToggleSelect}export default re.memo(Ae,qe);
|
|
@@ -58,6 +58,7 @@ export declare const WipeIcon: ({ color, size }: IconProps) => React.JSX.Element
|
|
|
58
58
|
export declare const LayersIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
59
59
|
export declare const UserIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
60
60
|
export declare const InfoCircleIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
61
|
+
export declare const PostmanIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
61
62
|
export declare const WarningTriangleIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
62
63
|
export declare const ErrorCircleIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
63
64
|
export declare const TrendingUpIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
@@ -232,3 +233,8 @@ export declare const ArrowForwardIcon: ({ color, size }: IconProps) => React.JSX
|
|
|
232
233
|
export declare const ScaleBalanceIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
233
234
|
export declare const VolumeMuteIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
234
235
|
export declare const ShieldBanIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
236
|
+
export declare const SpeedometerIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
237
|
+
export declare const CpuChipIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
238
|
+
export declare const PulseGraphIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
239
|
+
export declare const GaugeIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
240
|
+
export declare const MemoryRamIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
@@ -146,6 +146,8 @@ import"react";import W,{Circle as M,Ellipse as T,Line as S,Path as L,Polygon as
|
|
|
146
146
|
</W>,InfoCircleIcon=({color:e=p.grayTextWeak,size:t=14})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
147
147
|
<M cx="12"cy="12"r="9"stroke={e}strokeWidth="2"/>
|
|
148
148
|
<L d="M12 16v-4M12 8.5h.01"stroke={e}strokeWidth="2.2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
149
|
+
</W>,PostmanIcon=({color:e="#FF6C37",size:t=14})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
150
|
+
<L d="M21.5 2.5L10.5 13.5M21.5 2.5L14.5 21.5L10.5 13.5M21.5 2.5L2.5 9.5L10.5 13.5"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
149
151
|
</W>,WarningTriangleIcon=({color:e=p.grayTextWeak,size:t=12})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
150
152
|
<L d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
151
153
|
<L d="M12 9v4M12 17h.01"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
@@ -767,4 +769,34 @@ import"react";import W,{Circle as M,Ellipse as T,Line as S,Path as L,Polygon as
|
|
|
767
769
|
</W>,ShieldBanIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
768
770
|
<L d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
769
771
|
<S x1="4.5"y1="4.5"x2="19.5"y2="19.5"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
772
|
+
</W>,SpeedometerIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
773
|
+
<L d="M12 2a10 10 0 0 0-7.07 17.07L12 12l5.07-5.07"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
774
|
+
<L d="M2 12a10 10 0 1 0 20 0 10 10 0 0 0-20 0z"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
775
|
+
<M cx="12"cy="12"r="2"fill={e}/>
|
|
776
|
+
</W>,CpuChipIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
777
|
+
<B x="4"y="4"width="16"height="16"rx="2"stroke={e}strokeWidth="2"/>
|
|
778
|
+
<B x="9"y="9"width="6"height="6"stroke={e}strokeWidth="1.5"/>
|
|
779
|
+
<S x1="9"y1="1"x2="9"y2="4"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
780
|
+
<S x1="15"y1="1"x2="15"y2="4"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
781
|
+
<S x1="9"y1="20"x2="9"y2="23"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
782
|
+
<S x1="15"y1="20"x2="15"y2="23"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
783
|
+
<S x1="20"y1="9"x2="23"y2="9"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
784
|
+
<S x1="20"y1="15"x2="23"y2="15"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
785
|
+
<S x1="1"y1="9"x2="4"y2="9"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
786
|
+
<S x1="1"y1="15"x2="4"y2="15"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
787
|
+
</W>,PulseGraphIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
788
|
+
<C points="22 12 18 12 15 21 9 3 6 12 2 12"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
789
|
+
</W>,GaugeIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
790
|
+
<L d="M3.34 17a10 10 0 1 1 17.32 0"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
791
|
+
<L d="M12 12l4-4"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
792
|
+
<M cx="12"cy="12"r="2"fill={e}/>
|
|
793
|
+
</W>,MemoryRamIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
794
|
+
<B x="2"y="6"width="20"height="12"rx="2"stroke={e}strokeWidth="2"/>
|
|
795
|
+
<S x1="6"y1="18"x2="6"y2="21"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
796
|
+
<S x1="10"y1="18"x2="10"y2="21"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
797
|
+
<S x1="14"y1="18"x2="14"y2="21"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
798
|
+
<S x1="18"y1="18"x2="18"y2="21"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
799
|
+
<B x="5"y="9"width="3"height="5"fill={e}/>
|
|
800
|
+
<B x="10.5"y="9"width="3"height="5"fill={e}/>
|
|
801
|
+
<B x="16"y="9"width="3"height="5"fill={e}/>
|
|
770
802
|
</W>;
|
|
@@ -4,4 +4,5 @@ export declare const METHOD_COLORS: Record<Method, string>;
|
|
|
4
4
|
export declare const DOMAIN_COLORS: string[];
|
|
5
5
|
export declare const DURATION_FAST_MS = 200;
|
|
6
6
|
export declare const DURATION_SLOW_MS = 800;
|
|
7
|
+
export declare const DEFAULT_HIDDEN_URL_PATTERNS: string[];
|
|
7
8
|
export { LIB_VERSION } from './version';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AppColors as o}from"../styles/AppColors";export const STATUS_FILTERS=["ALL","2xx","200","3xx","4xx","400","404","5xx","500","Failed"],METHOD_COLORS={ALL:o.slate500,GET:o.emerald600,POST:o.blue600,PUT:o.amber600,PATCH:o.violet600,DELETE:o.red600,QUERY:o.sky600,OPTIONS:o.slate600,HEAD:o.cyan600},DOMAIN_COLORS=o.domainColors,DURATION_FAST_MS=200,DURATION_SLOW_MS=800;export{LIB_VERSION}from"./version";
|
|
1
|
+
import{AppColors as o}from"../styles/AppColors";export const STATUS_FILTERS=["ALL","2xx","200","3xx","4xx","400","404","5xx","500","Failed"],METHOD_COLORS={ALL:o.slate500,GET:o.emerald600,POST:o.blue600,PUT:o.amber600,PATCH:o.violet600,DELETE:o.red600,QUERY:o.sky600,OPTIONS:o.slate600,HEAD:o.cyan600},DOMAIN_COLORS=o.domainColors,DURATION_FAST_MS=200,DURATION_SLOW_MS=800,DEFAULT_HIDDEN_URL_PATTERNS=["https://google-analytics.com/g/collect","https://api.npmjs.org","https://api.github.com","https://registry.npmjs.org"];export{LIB_VERSION}from"./version";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const ENC_MID = "
|
|
2
|
-
export declare const ENC_SEC = "
|
|
3
|
-
export declare const TELEMETRY_SALT = "
|
|
1
|
+
export declare const ENC_MID = "";
|
|
2
|
+
export declare const ENC_SEC = "";
|
|
3
|
+
export declare const TELEMETRY_SALT = "";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ENC_MID="
|
|
1
|
+
export const ENC_MID="",ENC_SEC="",TELEMETRY_SALT="";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "2.5.
|
|
1
|
+
export declare const LIB_VERSION = "2.5.12";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LIB_VERSION="2.5.
|
|
1
|
+
export const LIB_VERSION="2.5.12";
|
|
@@ -17,6 +17,8 @@ export declare const getPath: (url: string) => string;
|
|
|
17
17
|
export declare const getBaseUrl: (url: string) => string;
|
|
18
18
|
export declare const getCurlCommand: (log: NetworkLog) => string;
|
|
19
19
|
export declare const getFetchCommand: (log: NetworkLog) => string;
|
|
20
|
+
export declare const getPostmanRequestJson: (log: NetworkLog) => string;
|
|
21
|
+
export declare const openWithPostman: (log: NetworkLog, toastFn?: (msg: string) => void) => Promise<void>;
|
|
20
22
|
export declare const deduplicateLogs: (raw: NetworkLog[]) => NetworkLog[];
|
|
21
23
|
export declare const escapeRegex: (str: string) => string;
|
|
22
24
|
export declare const getNavigationInfo: (state: any, path?: string[]) => RouteInfo;
|
|
@@ -82,3 +84,4 @@ export interface RuntimeDiagnostics {
|
|
|
82
84
|
totalAllocMb: number;
|
|
83
85
|
}
|
|
84
86
|
export declare const getRuntimeDiagnostics: () => RuntimeDiagnostics;
|
|
87
|
+
export declare const isUrlHidden: (url: string | undefined | null, patterns: string[] | undefined | null) => boolean;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import{Platform as
|
|
2
|
-
-H "${n}: ${r}"`}),
|
|
3
|
-
-d '${n.replace(/'/g,"'\\''")}'`}return
|
|
1
|
+
import{Platform as S,ToastAndroid as x,Alert as P,NativeModules as u,Linking as y}from"react-native";import $ from"@react-native-clipboard/clipboard";import{showToast as w}from"./toast";import{copyMediaToClipboard as E}from"../native/NativeInspector";import{AppColors as c}from"../styles/AppColors";import{DOMAIN_COLORS as C,DURATION_FAST_MS as M,DURATION_SLOW_MS as D}from"../constants";export*from"./searchQueryParser";export*from"./memoryManager";export*from"./toast";export const isLocalDebugEnvironment=()=>{const e=typeof __DEV__<"u"&&!!__DEV__,t=u.SourceCode?.scriptURL||"",n=t.startsWith("http://")||t.startsWith("https://")||t.includes(":8081")||t.includes(":8082");return e||n},getDomainColor=e=>{if(!e)return C[0];let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return C[Math.abs(t)%C.length]},formatDateTime=e=>{const t=new Date(e),n=(d,l=2)=>String(d).padStart(l,"0"),r=n(t.getDate()),o=n(t.getMonth()+1),s=t.getFullYear(),i=n(t.getHours()),a=n(t.getMinutes()),p=n(t.getSeconds());return`${r}/${o}/${s} ${i}:${a}:${p}`},formatTimestamp=e=>{try{const t=new Date(e),n=t.getHours().toString().padStart(2,"0"),r=t.getMinutes().toString().padStart(2,"0"),o=t.getSeconds().toString().padStart(2,"0"),s=t.getMilliseconds().toString().padStart(3,"0");return`${n}:${r}:${o}.${s}`}catch{return"\u2014"}},getStatusColor=e=>!e||e===0?c.errorColor:e>=500?c.errorColor:e>=400?c.darkOrange:e>=300?c.warningIconGold:c.greenColor,getDurationColor=e=>e==null?c.grayTextWeak:e<M?c.greenColor:e<D?c.lightOrange:c.errorColor,getSize=e=>{try{const t=JSON.stringify(e)?.length??0;return t<1024?`${t} B`:`${(t/1024).toFixed(1)} KB`}catch{return"\u2014"}},formatBytes=e=>{if(e===0||!e||isNaN(e))return"0 B";const t=1024,n=["B","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,r)).toFixed(1))} ${n[r]||"B"}`},formatByteSize=e=>!e||e<=0?"0 B":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(2)} MB`,copyToClipboard=(e,t)=>{const n=typeof e=="function"?e():e;let r="";if(typeof n=="string")r=n;else try{r=JSON.stringify(n,null,2)}catch{r=String(n)}try{typeof $?.setString=="function"?$.setString(r):typeof $?.default?.setString=="function"&&$.default.setString(r)}catch(o){__DEV__&&console.warn("[NetworkInspector] Clipboard.setString failed:",o)}try{w(t?`${t} copied to clipboard`:"Copied to clipboard")}catch{}try{S.OS==="android"&&x?.show&&x.show(t?`${t} copied to clipboard`:"Copied to clipboard",x.SHORT)}catch{}},copyImageOrMediaToClipboard=async(e,t="Image")=>{if(!e)return;let n=!1;try{n=await E(e)}catch{n=!1}if(!n){copyToClipboard(e,t);return}try{w(`${t} copied to clipboard`)}catch{}try{S.OS==="android"&&x?.show&&x.show(`${t} copied to clipboard`,x.SHORT)}catch{}},getPath=e=>{try{const t=new URL(e);return t.pathname+(t.search?t.search:"")}catch{return e.replace(/^https?:\/\/[^/?#]+/,"")||"/"}},getBaseUrl=e=>{try{const t=new URL(e);return`${t.protocol}//${t.host}`}catch{const t=e.match(/^(https?:\/\/[^/]+)/);return t?t[1]:""}},getCurlCommand=e=>{let t=`curl -X ${e.method} "${e.url}"`;if(e.requestHeaders&&Object.entries(e.requestHeaders).forEach(([n,r])=>{t+=` \\
|
|
2
|
+
-H "${n}: ${r}"`}),e.request&&e.method!=="GET"){const n=typeof e.request=="string"?e.request:JSON.stringify(e.request);t+=` \\
|
|
3
|
+
-d '${n.replace(/'/g,"'\\''")}'`}return t},getFetchCommand=e=>{const t={method:e.method};return e.requestHeaders&&Object.keys(e.requestHeaders).length>0&&(t.headers=e.requestHeaders),e.request&&e.method!=="GET"&&(t.body=JSON.stringify(e.request)),`fetch("${e.url}", ${JSON.stringify(t,null,2)})`},getPostmanRequestJson=e=>{let t;try{const s=new URL(e.url),i=s.hostname.split("."),a=s.pathname.replace(/^\//,"").split("/").filter(Boolean),p=[];s.searchParams.forEach((d,l)=>{p.push({key:l,value:d})}),t={raw:e.url,host:i,path:a,query:p.length>0?p:void 0}}catch{t={raw:e.url}}const n=[];e.requestHeaders&&typeof e.requestHeaders=="object"&&Object.entries(e.requestHeaders).forEach(([s,i])=>{n.push({key:s,value:String(i),type:"text"})});let r;if(e.request){const s=e.request;let i="";if(typeof s=="object")try{i=JSON.stringify(s,null,2)}catch{i=String(s)}else i=String(s);r={mode:"raw",raw:i,options:{raw:{language:"json"}}}}const o={info:{name:`${e.method} ${getPath(e.url)||e.url}`,schema:"https://schema.getpostman.com/json/collection/v2.1.0/collection.json",_exporter_id:"inapp-inspector"},item:[{name:`${e.method} ${getPath(e.url)||e.url}`,request:{method:e.method||"GET",header:n,body:r,url:t,description:"Captured by React Native In-App Inspector"},response:[]}]};return JSON.stringify(o,null,2)},openWithPostman=async(e,t)=>{const n=getCurlCommand(e);$.setString(n);const r="postman://";try{if(await y.canOpenURL(r)){await y.openURL(r),t?t("Opened Postman (cURL copied to clipboard)"):w("Opened Postman (cURL copied to clipboard)");return}}catch{}P.alert("Open with Postman",`cURL for "${e.method} ${getPath(e.url)||e.url}" copied to clipboard!
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
In Postman: Click "Import" > paste the cURL to load this request.`,[{text:"Done",style:"cancel"},{text:"Open Postman Web",onPress:()=>{y.openURL("https://web.postman.co/").catch(()=>{})}}])},deduplicateLogs=e=>{const t=new Map;return e.forEach(n=>{if(!t.has(n.id))t.set(n.id,n);else{const r=t.get(n.id);(r.status==null&&n.status!=null||(n.startTime??0)>=(r.startTime??0))&&t.set(n.id,n)}}),Array.from(t.values()).sort((n,r)=>r.id-n.id)},escapeRegex=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),getNavigationInfo=(e,t=[])=>{if(!e)return{path:t.length>0?t.join(" \u2794 "):"",params:null};if(e.name&&!e.routes)return{path:t.length>0?[...t,e.name].join(" \u2794 "):e.name,params:e.params||null};if(!e.routes||!Array.isArray(e.routes)||e.routes.length===0)return{path:t.length>0?t.join(" \u2794 "):"",params:null};const n=typeof e.index=="number"&&e.index>=0&&e.index<e.routes.length?e.index:0,r=e.routes[n];if(!r)return{path:t.length>0?t.join(" \u2794 "):"",params:null};const o=r.name?[...t,r.name]:t;return r?.state?getNavigationInfo(r.state,o):{path:o.length>0?o.join(" \u2794 "):r.name||"",params:r.params||null}},getLogPageName=(e,t)=>{const n=t||e?.routeInfo;if(n&&n.path&&n.path!=="Navigators"){const r=n.path.split(" \u2794 ").map(o=>o.trim()).filter(Boolean);return r.length>0?r[r.length-1]:n.path}if(e.caller&&e.caller!=="Unknown")try{const r=e.caller.match(/([^/\\]+)\.(tsx|jsx|ts|js)/i);if(r&&r[1]){const o=r[1];if(!["networklogger","fetch","axios","apiclient","request","http","index","nativeinspector","inappinspector","bundleanalyzer"].includes(o.toLowerCase()))return o}}catch{}if(e.url)try{const o=e.url.split("?")[0].split("#")[0].replace(/^https?:\/\//i,""),s=o.indexOf("/");if(s!==-1){const a=o.substring(s+1).split("/").filter(Boolean),p=["api","v1","v2","v3","v4","rest","graphql","json","data","service","app"],d=a.filter(l=>!p.includes(l.toLowerCase()));if(d.length>0){const l=d[0];return l.charAt(0).toUpperCase()+l.slice(1)}}const i=o.split("/")[0];if(i)return i}catch{}return"General"},flattenObject=(e,t="")=>{let n={};return typeof e=="object"&&e!==null?Array.isArray(e)?e.forEach((r,o)=>{Object.assign(n,flattenObject(r,t?`${t}[${o}]`:`[${o}]`))}):Object.keys(e).forEach(r=>{Object.assign(n,flattenObject(e[r],t?`${t}.${r}`:r))}):n[t||"root"]=e,n},getDiff=(e,t)=>{const n=flattenObject(e),r=flattenObject(t),o=[];return new Set([...Object.keys(n),...Object.keys(r)]).forEach(i=>{i in n?i in r?n[i]!==r[i]&&o.push({type:"changed",path:i,oldVal:n[i],newVal:r[i]}):o.push({type:"removed",path:i,oldVal:n[i]}):o.push({type:"added",path:i,newVal:r[i]})}),o.sort((i,a)=>i.path.localeCompare(a.path))},formatDisplayUrl=e=>e?e.startsWith("http://")||e.startsWith("https://")?e:`https://${e}`:"",getLocalizedFilePath=(e,t,n)=>e.replace("country-language",`${t?.toLowerCase()}-${n?.toLowerCase()}`),getLocalizedFilePathWithSlash=(e,t,n)=>e.replace("country/language",`${t?.toLowerCase()}/${n?.toLowerCase()}`),isAllValuesEmpty=e=>!e||typeof e!="object"?!0:Object.values(e).every(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0),formatDateTimeToAnalytics=e=>new Date(e)?.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),getBundleIdentifier=()=>{const e=u.RNDeviceInfo;if(e&&typeof e.bundleId=="string")return e.bundleId;if(e&&typeof e.getBundleId=="function")try{const o=e.getBundleId();if(typeof o=="string")return o}catch{}const t=u.ExponentConstants;if(t&&t.manifest){const o=t.manifest;if(o.ios&&o.ios.bundleIdentifier)return o.ios.bundleIdentifier;if(o.android&&o.android.package)return o.android.package}const n=u.ExpoApplication;if(n&&typeof n.applicationId=="string")return n.applicationId;const r=u.SourceCode;if(r&&typeof r.scriptURL=="string"){const o=r.scriptURL;if(o.includes("assets/"))try{const s=o.match(/assets\/([^/?#]+)/);if(s&&s[1])return s[1]}catch{}}return"org.reactjs.native.example"},getAppName=()=>{const e=u.PlatformConstants;e&&e.interfaceIdiom;const t=u.RNDeviceInfo;if(t&&typeof t.appName=="string")return t.appName;const n=u.NetworkInspectorModule;if(n&&typeof n.appName=="string"&&n.appName.length>0&&n.appName!=="App")return n.appName;const r=u.ExpoApplication;if(r&&typeof r.applicationName=="string")return r.applicationName;const o=u.ExponentConstants;if(o&&o.manifest){const a=o.manifest;if(a.name)return a.name}const s=u.AppInfo;if(s&&typeof s.appName=="string")return s.appName;const i=getBundleIdentifier();if(i&&i!=="org.reactjs.native.example"){const a=i.split("."),p=a[a.length-1];return p?p.charAt(0).toUpperCase()+p.slice(1):"App"}return"App"},getAppVersionAndBuild=()=>{let e="",t="";const n=u.NetworkInspectorModule;if(n&&(typeof n.appVersion=="string"&&n.appVersion.length>0&&(e=n.appVersion),typeof n.appBuild=="string"&&n.appBuild.length>0&&(t=n.appBuild)),!e||!t){const r=u.ExpoApplication;r&&(!e&&typeof r.nativeAppVersion=="string"&&(e=r.nativeAppVersion),!t&&typeof r.nativeBuildVersion=="string"&&(t=r.nativeBuildVersion))}if(!e||!t){const r=u.ExponentConstants;if(r){const o=r.manifest||r.expoConfig;o&&(!e&&o.version&&(e=String(o.version)),t||(o.ios?.buildNumber?t=String(o.ios.buildNumber):o.android?.versionCode&&(t=String(o.android.versionCode))))}}if(!e||!t){const r=u.RNDeviceInfo;if(r){if(!e){if(typeof r.appVersion=="string")e=r.appVersion;else if(typeof r.getVersion=="function")try{e=r.getVersion()}catch{}}if(!t){if(typeof r.buildNumber=="string")t=r.buildNumber;else if(typeof r.getBuildNumber=="function")try{t=r.getBuildNumber()}catch{}}}}if(!e||!t){const r=u.AppInfo;r&&(!e&&typeof r.versionName=="string"&&(e=r.versionName),!t&&typeof r.versionCode=="string"&&(t=r.versionCode))}if(!e){const r=S.constants||u.PlatformConstants;r&&r.Version&&typeof r.Version=="string"&&r.Version.includes(".")&&(e=r.Version)}return e||(e="1.0"),t||(t="1"),{version:e,build:t,formatted:`${e} (${t})`}},handleOpenExternalLink=e=>{if(!e)return;const t=formatDisplayUrl(e);P.alert("Open Link",`Do you want to open this link in your web browser?
|
|
6
|
+
|
|
7
|
+
${t}`,[{text:"Cancel",style:"cancel"},{text:"Open",onPress:()=>{y.openURL(t).catch(()=>{})}}])},formatTimeShort=e=>{const t=new Date(e),n=String(t.getHours()).padStart(2,"0"),r=String(t.getMinutes()).padStart(2,"0"),o=String(t.getSeconds()).padStart(2,"0");return`${n}:${r}:${o}`},formatTime=e=>{const t=new Date(e),n=String(t.getHours()).padStart(2,"0"),r=String(t.getMinutes()).padStart(2,"0"),o=String(t.getSeconds()).padStart(2,"0"),s=String(t.getMilliseconds()).padStart(3,"0");return`${n}:${r}:${o}.${s}`},formatGap=e=>{if(e<1e3)return`+${e}ms`;const t=Math.round(e/1e3);if(t<60)return`+${t}s`;const n=Math.floor(t/60),r=t%60;return r>0?`+${n}m ${r}s`:`+${n}m`},getJsonContent=e=>{if(!e)return null;const t=[];for(let n=0;n<e.length;n++)(e[n]==="{"||e[n]==="[")&&t.push(n);for(const n of t){const r=e.substring(n).trim();try{const o=JSON.parse(r);if(o!==null&&typeof o=="object")return{header:e.substring(0,n).trim(),data:o}}catch{}}return null},getJsonPreviewText=(e,t=4)=>{try{const n=JSON.stringify(e,null,2),r=n.split(`
|
|
8
|
+
`);return r.length>t?{text:r.slice(0,t).join(`
|
|
7
9
|
`)+`
|
|
8
|
-
...`,hasMore:!0}:{text:n,hasMore:!1}}catch{return{text:String(
|
|
10
|
+
...`,hasMore:!0}:{text:n,hasMore:!1}}catch{return{text:String(e),hasMore:!1}}},parseStackLine=(e,t=!1)=>{let n=e.trim().replace(/^at /,"");if(n.includes("@")){const L=n.indexOf("@"),A=n.substring(0,L).trim(),B=n.substring(L+1).trim();n=A?`${A} (${B})`:B}const r=n.match(/^(.*?)\s*\((.*?)\)$/);let o="<anonymous>",s=n;r&&(o=r[1].trim()||"<anonymous>",s=r[2].trim()),(o.startsWith("?anon_")||o==="?")&&(o="anonymous"),s=s.replace(/^address at /,"");const i=s.match(/^(.*?):(\d+):(\d+)$/);let a=s,p,d;i&&(a=i[1],p=i[2],d=i[3]);let l=a.replace(/[?&].*$/,"").replace(/[)]+$/,"").replace(/\/\/+$/,"");l=l.replace(/^(?:https?:\/\/[^\/]+\/|file:\/\/\/|webpack:\/\/\/?)/,"");let f=l.split("/").filter(Boolean).pop()||l;f=f.replace(/[?&].*$/,"").replace(/[)]+$/,""),(f.startsWith("&")||f.startsWith("?")||f.startsWith("platform=")||f.includes("platform=")||f.startsWith("dev=")||f.includes("dev="))&&(f="Unknown",l="Unknown");const b=f.match(/\.([a-z0-9]+)$/i),m=b?b[1].toLowerCase():"",g=m==="tsx"||m==="jsx"||m==="ts"||m==="js"?m:"other",N=s==="native"||l==="native",v=l.includes("InternalBytecode")||l.includes("metro-runtime")||l.includes("regenerator-runtime")||o==="tryCallOne"||o==="asyncGeneratorStep"||o==="_next"||o==="next"&&N,O=l.includes("node_modules")||l.includes("react-native/Libraries")||l.includes("react-native-inapp-inspector")&&!l.includes("/example/"),I=!N&&!v&&!O&&(g==="tsx"||g==="jsx"||g==="ts"||g==="js"||!f.includes(".bundle")&&f!=="Unknown"),R=I?"app":O?"dependency":N?"native":"runtime",U=v||N||o==="asyncGeneratorStep"||o==="_next";let h=l;h.includes("/example/")?h=h.substring(h.indexOf("/example/")+9):h.includes("/src/")?h=h.substring(h.indexOf("/src/")+1):h.includes("/node_modules/")&&(h=h.substring(h.indexOf("/node_modules/")+14));const _=p?`${f}:${p}${d?`:${d}`:""}`:f;return{raw:e,functionName:o,fileName:f,fullPath:h,rawFilePath:a,fileExt:g,frameType:R,isUserCode:I,isRuntimeNoise:U,lineNumber:p,columnNumber:d,isOrigin:t,copyableLocation:_}},getCleanCallerDisplay=e=>{if(!e||e==="Unknown"||e.trim()==="")return null;const t=e.trim();if(t.startsWith("&platform")||t.startsWith("?platform")||t.startsWith("&")||t.includes("&platform=")||t.includes("?platform=")){const s=t.match(/^(.*?)\s*[\(@]/);if(s&&s[1]&&!s[1].includes("&")&&!s[1].includes("platform")){const i=s[1].trim();if(i&&i!=="<anonymous>"&&i!=="anonymous"&&!i.startsWith("?anon_"))return{fileName:i,functionName:i,display:i}}return null}const n=parseStackLine(e,!0);if(!n)return null;if(n.fileName.includes(".bundle")||n.fileName.includes("platform=")||n.fileName.startsWith("&")||n.fileName.startsWith("?")||n.fileName==="index.bundle"||n.fileName==="bundle"||n.fileName==="Unknown")return n.functionName&&n.functionName!=="<anonymous>"&&n.functionName!=="anonymous"&&!n.functionName.startsWith("?")&&!n.functionName.startsWith("_callee")&&!n.functionName.includes("regeneratorRuntime")?{fileName:n.functionName,lineNumber:n.lineNumber,functionName:n.functionName,display:n.functionName}:null;const o=n.lineNumber?`${n.fileName}:${n.lineNumber}`:n.fileName;return{fileName:n.fileName,lineNumber:n.lineNumber,functionName:n.functionName,display:o}},openInVSCode=(e,t,n)=>{const r=t?Number(t):1,o=n?Number(n):1,s=t?`:${t}`:"",i=n?`:${n}`:"",a=e.replace(/^file:\/\//,"");let p=null;try{const m=u?.SourceCode?.scriptURL||u?.PlatformConstants?.serverHost||u?.DevSettings?.serverHost;if(typeof m=="string"&&m.length>0){const g=m.match(/^(https?:\/\/[^/]+)/);g?p=g[1]:!m.startsWith("http")&&m.includes(":")&&(p=`http://${m}`)}}catch{}Array.from(new Set([...p?[p]:[],"http://localhost:8081","http://127.0.0.1:8081","http://10.0.2.2:8081"])).forEach(m=>{try{fetch(`${m}/open-stack-frame`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:a,lineNumber:r,column:o})}).catch(()=>{})}catch{}});const l=`vscode://file/${a.replace(/^\/+/,"")}${s}${i}`,f=`cursor://file/${a.replace(/^\/+/,"")}${s}${i}`,b=`vscode-insiders://file/${a.replace(/^\/+/,"")}${s}${i}`;y.openURL(l).catch(()=>{y.openURL(f).catch(()=>{y.openURL(b).catch(()=>{copyToClipboard(`${a}${s}${i}`,"Location")})})})},ANALYTICS_EVENT_PALETTE=[c.googleBlue,c.googleGreen,c.googlePurple,c.googleTeal,c.googleRed,c.googleOrange,c.blue700,c.materialGreen],getEventColor=e=>{const t=typeof e=="string"?e:String(e||"");let n=0;for(let r=0;r<t.length;r++)n=n*31+t.charCodeAt(r)|0;return ANALYTICS_EVENT_PALETTE[Math.abs(n)%ANALYTICS_EVENT_PALETTE.length]};export{getEventCategory,registerGAPlugin}from"./gaAnalyticsRegistry";export const getCategoryColors=e=>{switch(e){case"page_view":case"Page View":return{bg:c.blueBg,border:c.blueBorder,text:c.blue800};case"ecommerce":case"Ecommerce":return{bg:c.greenBg,border:c.greenBorder,text:c.materialGreen};case"system":case"System":return{bg:c.greyBg,border:c.greyBorder,text:c.grey600};default:return{bg:c.purpleBg,border:c.purpleBorder,text:c.purpleText}}},getRuntimeDiagnostics=()=>{const e=typeof global.HermesInternal<"u",t=typeof global._v8runtime<"u",n=e?"hermes":t?"v8":"jsc",o=typeof global.nativeFabricUIManager<"u"||!!global.__turboModuleProxy?"fabric":"paper";let s=32.4,i=64;try{const a=global.HermesInternal?.getInstrumentedStats?.();a?.js_heap_size?(s=Number((a.js_heap_size/(1024*1024)).toFixed(1)),i=Number(((a.js_allocated_bytes||a.js_heap_size*1.6)/(1024*1024)).toFixed(1))):global.performance?.memory?.usedJSHeapSize&&(s=Number((global.performance.memory.usedJSHeapSize/(1024*1024)).toFixed(1)),i=Number((global.performance.memory.totalJSHeapSize/(1024*1024)).toFixed(1)))}catch{}return{engineType:n,archType:o,usedHeapMb:s,totalAllocMb:i}},isUrlHidden=(e,t)=>{if(!e||!t||t.length===0)return!1;const n=e.trim();if(!n)return!1;const r=n.toLowerCase();for(let o=0;o<t.length;o++){const s=t[o]?.trim();if(!s)continue;const i=s.toLowerCase();if(r.includes(i))return!0;const a=i.replace(/^https?:\/\//,""),p=r.replace(/^https?:\/\//,"");if(a&&p.includes(a))return!0;if(s.includes("*"))try{const d=s.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");if(new RegExp(d,"i").test(n))return!0}catch{}try{if(new RegExp(s,"i").test(n))return!0}catch{}}return!1};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export interface FrameSample {
|
|
2
|
+
timestamp: number;
|
|
3
|
+
durationMs: number;
|
|
4
|
+
fps: number;
|
|
5
|
+
isJank: boolean;
|
|
6
|
+
isFrozen: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface JankEvent {
|
|
9
|
+
id: string;
|
|
10
|
+
timestamp: number;
|
|
11
|
+
timeStr: string;
|
|
12
|
+
durationMs: number;
|
|
13
|
+
fps: number;
|
|
14
|
+
severity: 'moderate' | 'severe' | 'frozen';
|
|
15
|
+
}
|
|
16
|
+
export interface MemoryStats {
|
|
17
|
+
usedHeapMb: number;
|
|
18
|
+
totalAllocMb: number;
|
|
19
|
+
peakHeapMb: number;
|
|
20
|
+
engine: string;
|
|
21
|
+
isAvailable: boolean;
|
|
22
|
+
gcCount?: number;
|
|
23
|
+
gcTimeMs?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface PercentileStats {
|
|
26
|
+
p50Ms: number;
|
|
27
|
+
p90Ms: number;
|
|
28
|
+
p95Ms: number;
|
|
29
|
+
p99Ms: number;
|
|
30
|
+
}
|
|
31
|
+
export interface BucketDistribution {
|
|
32
|
+
ultraSmoothCount: number;
|
|
33
|
+
smoothCount: number;
|
|
34
|
+
degradedCount: number;
|
|
35
|
+
stutteredCount: number;
|
|
36
|
+
frozenCount: number;
|
|
37
|
+
totalSamples: number;
|
|
38
|
+
}
|
|
39
|
+
export interface EngineDetails {
|
|
40
|
+
engineName: string;
|
|
41
|
+
isHermes: boolean;
|
|
42
|
+
isFabric: boolean;
|
|
43
|
+
isTurboModules: boolean;
|
|
44
|
+
architectureName: string;
|
|
45
|
+
gcCollections?: number;
|
|
46
|
+
gcCpuTimeMs?: number;
|
|
47
|
+
heapUsedMb: number;
|
|
48
|
+
heapTotalMb: number;
|
|
49
|
+
peakHeapMb: number;
|
|
50
|
+
}
|
|
51
|
+
export interface LivePerformanceData {
|
|
52
|
+
fps: number;
|
|
53
|
+
avgFps: number;
|
|
54
|
+
minFps: number;
|
|
55
|
+
maxFps: number;
|
|
56
|
+
frameDurationMs: number;
|
|
57
|
+
refreshRateHz: number;
|
|
58
|
+
jankCount: number;
|
|
59
|
+
frozenCount: number;
|
|
60
|
+
jankPercent: number;
|
|
61
|
+
apdexScore: number;
|
|
62
|
+
apdexStatus: 'EXCELLENT' | 'GOOD' | 'FAIR' | 'POOR';
|
|
63
|
+
satisfiedCount: number;
|
|
64
|
+
toleratingCount: number;
|
|
65
|
+
frustratedCount: number;
|
|
66
|
+
longTaskCount: number;
|
|
67
|
+
percentiles: PercentileStats;
|
|
68
|
+
budgetUsedPercent: number;
|
|
69
|
+
budgetHeadroomMs: number;
|
|
70
|
+
distribution: BucketDistribution;
|
|
71
|
+
engineDetails: EngineDetails;
|
|
72
|
+
jsEventLoopLagMs: number;
|
|
73
|
+
avgJsLagMs: number;
|
|
74
|
+
peakJsLagMs: number;
|
|
75
|
+
healthScore: number;
|
|
76
|
+
healthStatus: 'EXCELLENT' | 'GOOD' | 'FAIR' | 'POOR';
|
|
77
|
+
frameHistory: number[];
|
|
78
|
+
jsLagHistory: number[];
|
|
79
|
+
recentJanks: JankEvent[];
|
|
80
|
+
memory: MemoryStats;
|
|
81
|
+
sessionDurationSec: number;
|
|
82
|
+
isStressTesting: boolean;
|
|
83
|
+
runJsStressTest: (durationMs?: number) => void;
|
|
84
|
+
runRenderStressTest: () => void;
|
|
85
|
+
triggerGC: () => void;
|
|
86
|
+
resetStats: () => void;
|
|
87
|
+
}
|
|
88
|
+
export declare const usePerformanceMonitor: (active?: boolean) => LivePerformanceData;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState as e,useEffect as z,useRef as a,useCallback as k,useMemo as xe}from"react";export const usePerformanceMonitor=(f=!0)=>{const H=a(0),I=a(0),x=a([]),C=a([]),S=a(0),R=a(0),N=a(0),v=a(0),E=a(0),B=a(0),O=a(0),U=a(0),A=a(0),P=a(0),M=a([]),_=a(null),y=a(null),$=a(null),V=a(null),h=k(()=>{const t=!!global.HermesInternal,i=!!global._v8runtime,n=typeof global.nativeFabricUIManager<"u"||!!global.__turboModuleProxy,s=`${t?"Hermes":i?"V8 Engine":"JavaScriptCore"} \u2022 ${n?"Fabric":"Paper"}`;let o=0,u=0,m=!1,g,J;try{const T=global.HermesInternal;if(T?.getInstrumentedStats){const r=T.getInstrumentedStats();if(r&&typeof r=="object"){const l=r.js_heap_size??r.heapSize??r["js.heap_size"]??r.js_allocated_bytes??0,j=r.js_allocated_bytes??r.allocatedBytes??r["js.allocated_bytes"]??r.totalAllocatedBytes??l;(l>0||j>0)&&(o=Number((l/(1024*1024)).toFixed(2)),u=Number((j/(1024*1024)).toFixed(2)),g=r.gc_num_collections??r.num_gc_collections??r["gc.num_collections"],J=r.gc_cpu_time??r.gc_time??r["gc.cpu_time"],m=!0)}}else if(global.performance?.memory?.usedJSHeapSize){const r=global.performance.memory;o=Number((r.usedJSHeapSize/(1024*1024)).toFixed(2)),u=Number((r.totalJSHeapSize/(1024*1024)).toFixed(2)),m=!0}}catch{}const L=v?.current||0,F=Math.max(L,o);return v&&(v.current=F),{usedHeapMb:o,totalAllocMb:u,peakHeapMb:F,engine:s,isAvailable:m,gcCount:g,gcTimeMs:J}},[]),[Ce,Q]=e(60),[Se,W]=e(60),[Re,Y]=e(60),[_e,Z]=e(60),[ye,q]=e(16.6),[Le,ut]=e(60),[Te,ee]=e(0),[ke,te]=e(0),[He,ne]=e(0),[b,re]=e(1),[Ie,se]=e(0),[Ne,oe]=e(0),[ve,ae]=e(0),[G,ce]=e(0),[Ae,Pe]=e({p50Ms:16.6,p90Ms:16.6,p95Ms:16.6,p99Ms:16.6}),[we,De]=e(100),[Je,je]=e(0),[ze,Ee]=e({ultraSmoothCount:0,smoothCount:0,degradedCount:0,stutteredCount:0,frozenCount:0,totalSamples:0}),[Be,ue]=e(0),[Oe,ie]=e(0),[Ue,le]=e(0),[$e,me]=e(()=>Array(45).fill(16.6)),[Ve,fe]=e(()=>Array(25).fill(0)),[qe,ge]=e([]),[Ge,w]=e(!1),[Xe,de]=e(0),[p,X]=e(()=>h()),Ke=xe(()=>{const t=!!global.HermesInternal,i=!!global._v8runtime,n=typeof global.nativeFabricUIManager<"u"||!!global.__turboModuleProxy,c=!!global.__turboModuleProxy;return{engineName:t?"Hermes":i?"V8 Engine":"JavaScriptCore",isHermes:t,isFabric:n,isTurboModules:c,architectureName:n?"Fabric (New Architecture)":"Paper (Legacy)",heapUsedMb:p.usedHeapMb,heapTotalMb:p.totalAllocMb,peakHeapMb:p.peakHeapMb,gcCollections:p.gcCount,gcCpuTimeMs:p.gcTimeMs}},[p]);z(()=>{if(!f)return;let t=!0,i=6;H.current=performance.now();const n=c=>{if(!t)return;if(i>0){H.current=c,i--,_.current=requestAnimationFrame(n);return}const s=c-H.current;if(H.current=c,s>0&&s<800){I.current++;const o=Math.min(60,Math.max(1,Math.round(1e3/Math.max(16,s)))),u=Number(s.toFixed(1));if(s<=18.5)E.current++;else if(s<=66.6){if(B.current++,A.current++,s>36){const m={id:`jank_${Date.now()}_${Math.random().toString(36).substring(2,6)}`,timestamp:Date.now(),timeStr:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}),durationMs:u,fps:o,severity:"moderate"};M.current=[m,...M.current.slice(0,19)]}}else{O.current++,P.current++;const m={id:`jank_${Date.now()}_${Math.random().toString(36).substring(2,6)}`,timestamp:Date.now(),timeStr:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}),durationMs:u,fps:o,severity:"frozen"};M.current=[m,...M.current.slice(0,19)]}x.current.push(u),x.current.length>45&&x.current.shift(),I.current===1?(S.current=o,R.current=o):(o<S.current&&o>=15&&(S.current=o),o>R.current&&(R.current=o))}_.current=requestAnimationFrame(n)};return _.current=requestAnimationFrame(n),()=>{t=!1,_.current&&cancelAnimationFrame(_.current)}},[f]),z(()=>{if(!f)return;const t=30;let i=performance.now()+t,n=5;const c=()=>{const s=performance.now(),o=s-i;if(i=s+t,n>0){n--,y.current=setTimeout(c,t);return}const u=Math.max(0,Number((o-8).toFixed(1)));u>N.current&&(N.current=u),u>=50&&U.current++,C.current.push(u),C.current.length>30&&C.current.shift(),y.current=setTimeout(c,t)};return y.current=setTimeout(c,t),()=>{y.current&&clearTimeout(y.current)}},[f]),z(()=>{if(!f)return;const i=setInterval(()=>{const n=x.current,c=C.current;if(n.length>0){const s=n[n.length-1]??16.6,u=n.reduce((d,K)=>d+K,0)/n.length,m=Math.min(60,Math.max(1,Math.round(1e3/Math.max(16,u)))),g=Math.min(60,Math.max(1,Math.round(1e3/Math.max(16,s))));Q(g),W(m),q(s),me([...n]),Y(S.current||g),Z(R.current||g);const J=Math.max(1,I.current),L=E.current,F=B.current,T=O.current,r=Number(((L+F/2)/Math.max(1,L+F+T)).toFixed(2));re(Math.max(0,Math.min(1,r))),se(L),oe(F),ae(T),ce(U.current);const l=[...n].sort((d,K)=>d-K),j=l[Math.floor(l.length*.5)]??16.6,nt=l[Math.floor(l.length*.9)]??16.6,rt=l[Math.floor(l.length*.95)]??16.6,st=l[Math.floor(l.length*.99)]??16.6;Pe({p50Ms:Number(j.toFixed(1)),p90Ms:Number(nt.toFixed(1)),p95Ms:Number(rt.toFixed(1)),p99Ms:Number(st.toFixed(1))});const ot=Math.min(250,Number((s/16.6*100).toFixed(0))),at=Number(Math.max(0,16.6-s).toFixed(1));De(ot),je(at);let pe=0,Me=0,he=0,be=0,Fe=0;for(const d of n)d<=16.6?pe++:d<=24?Me++:d<=34?he++:d<=66.6?be++:Fe++;Ee({ultraSmoothCount:pe,smoothCount:Me,degradedCount:he,stutteredCount:be,frozenCount:Fe,totalSamples:n.length});const ct=Number(((A.current+P.current)/J*100).toFixed(1));ne(ct),ee(A.current),te(P.current),ge([...M.current])}if(c.length>0){const s=c[c.length-1]??0,o=c.reduce((m,g)=>m+g,0),u=Number((o/c.length).toFixed(1));ue(s),ie(u),le(N.current),fe([...c])}},300);return()=>{clearInterval(i)}},[f]),z(()=>{if(f)return $.current=setInterval(()=>{X(h())},1500),V.current=setInterval(()=>{de(t=>t+1)},1e3),()=>{$.current&&clearInterval($.current),V.current&&clearInterval(V.current)}},[f,h]);const D=xe(()=>{const t=Math.round(b*100-Math.min(G*2,10));return Math.max(0,Math.min(100,t))},[b,G]),Qe=D>=88?"EXCELLENT":D>=72?"GOOD":D>=55?"FAIR":"POOR",We=b>=.94?"EXCELLENT":b>=.85?"GOOD":b>=.7?"FAIR":"POOR",Ye=k((t=120)=>{w(!0),setTimeout(()=>{const i=performance.now();for(;performance.now()-i<t;)Math.sqrt(Math.random()*1e6);w(!1)},50)},[]),Ze=k(()=>{w(!0);let t=0;const i=setInterval(()=>{t++,q(n=>Number((n+.1).toFixed(1))),t>25&&(clearInterval(i),w(!1))},16)},[]),et=k(()=>{try{const t=global.HermesInternal;t?.gc?t.gc():global.gc&&global.gc(),setTimeout(()=>{X(h())},200)}catch{}},[]),tt=k(()=>{I.current=0,E.current=0,B.current=0,O.current=0,U.current=0,A.current=0,P.current=0,S.current=0,R.current=0,N.current=0,v.current=0,x.current=[],C.current=[],M.current=[],Q(60),W(60),Y(60),Z(60),q(16.6),re(1),se(0),oe(0),ae(0),ce(0),ee(0),te(0),ne(0),ue(0),ie(0),le(0),me(Array(45).fill(16.6)),fe(Array(25).fill(0)),ge([]),de(0),X(h())},[h]);return{fps:Ce,avgFps:Se,minFps:Re,maxFps:_e,frameDurationMs:ye,refreshRateHz:Le,jankCount:Te,frozenCount:ke,jankPercent:He,apdexScore:b,apdexStatus:We,satisfiedCount:Ie,toleratingCount:Ne,frustratedCount:ve,longTaskCount:G,percentiles:Ae,budgetUsedPercent:we,budgetHeadroomMs:Je,distribution:ze,engineDetails:Ke,jsEventLoopLagMs:Be,avgJsLagMs:Oe,peakJsLagMs:Ue,healthScore:D,healthStatus:Qe,frameHistory:$e,jsLagHistory:Ve,recentJanks:qe,memory:p,sessionDurationSec:Xe,isStressTesting:Ge,runJsStressTest:Ye,runRenderStressTest:Ze,triggerGC:et,resetStats:tt}};
|