network-intelligence-layer
v1.0.0
Published
React Native network intelligence layer
Maintainers
Readme
network-intelligence-layer
network-intelligence-layer is a React Native network intelligence layer.
Install
npm install network-intelligence-layer react-native-vector-icons @react-native-clipboard/clipboardThe consuming app must already provide compatible react and react-native versions.
Included behavior
- XMLHttpRequest interception
- request list and detail views
- payload inspection and JSON search
- pause or resume capture
- pinning and clearing
- floating launcher and modal presentation
- exported control helpers
- ignored request support, including confidential endpoint skipping when configured by the host app
Usage
import React from 'react';
import { NILLauncher } from 'network-intelligence-layer';
const App = () => (
<NILLauncher enabled />
);You can also start and stop interception programmatically:
import { startNIL, stopNIL } from 'network-intelligence-layer';
startNIL();
stopNIL();You can override the built-in UI and filtering defaults when mounting the library:
import React from 'react';
import { DEFAULT_NIL_CONFIG, NILLauncher } from 'network-intelligence-layer';
const App = () => (
<NILLauncher
enabled
config={{
...DEFAULT_NIL_CONFIG,
listSearchDebounceMs: 400,
detailBodyPreviewMaxChars: 3000,
payloadPreviewOnlyMaxChars: 50000,
confidentialEndpointFragments: [
'maps.googleapis.com/maps/api/geocode/',
'maps.googleapis.com/maps/api/place/',
],
statusFilterOptions: [
{ label: 'All', value: 'all' },
{ label: 'Failures', value: 'errors' },
],
theme: {
mode: 'system',
light: {
primary: '#B2182B',
},
dark: {
primary: '#FF7D8C',
background: '#0E1116',
},
},
}}
/>
);Host-app policy
Environment gating, native setting checks, and app-owned icons should stay in the consuming app. This package only provides the reusable NIL runtime and UI.
