Skip to content

Commit ca6bb08

Browse files
feat: renamed the library from RNInAppDevTools to BugBubbleDebugger
1 parent 3b693d9 commit ca6bb08

25 files changed

Lines changed: 303 additions & 217 deletions

PUBLISHING.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Publishing Guide for react-native-in-app-devtools
1+
# Publishing Guide for @lokal-dev/react-native-bugbubble
22

3-
This guide will walk you through the steps to publish `react-native-in-app-devtools` to npm.
3+
This guide will walk you through the steps to publish `@lokal-dev/react-native-bugbubble` to npm.
44

55
## Prerequisites
66

@@ -29,7 +29,7 @@ Example:
2929
"author": "Your Name <your.email@example.com>",
3030
"repository": {
3131
"type": "git",
32-
"url": "https://github.com/your-username/react-native-in-app-devtools.git"
32+
"url": "https://github.com/lokal-app/react-native-bugbubble.git"
3333
},
3434
"version": "1.0.0"
3535
}
@@ -87,15 +87,15 @@ yarn lint
8787
```bash
8888
git init
8989
git add .
90-
git commit -m "Initial commit: react-native-in-app-devtools"
90+
git commit -m "Initial commit: @lokal-dev/react-native-bugbubble"
9191
```
9292

9393
### 9. Create GitHub Repository (optional but recommended)
9494

9595
1. Create a new repository on GitHub
9696
2. Add the remote:
9797
```bash
98-
git remote add origin https://github.com/your-username/react-native-in-app-devtools.git
98+
git remote add origin https://github.com/lokal-app/react-native-bugbubble.git
9999
git branch -M main
100100
git push -u origin main
101101
```
@@ -122,8 +122,8 @@ npm whoami
122122
npm publish
123123
```
124124

125-
#### For Scoped Package (if you want @your-username/react-native-in-app-devtools):
126-
First, update `package.json` name to `@your-username/react-native-in-app-devtools`, then:
125+
#### For Scoped Package:
126+
Since this is a scoped package (`@lokal-dev/react-native-bugbubble`), publish with:
127127
```bash
128128
npm publish --access public
129129
```
@@ -134,10 +134,10 @@ npm publish --access public
134134

135135
Check that your package is published:
136136
```bash
137-
npm view react-native-in-app-devtools
137+
npm view @lokal-dev/react-native-bugbubble
138138
```
139139

140-
Or visit: `https://www.npmjs.com/package/react-native-in-app-devtools`
140+
Or visit: `https://www.npmjs.com/package/@lokal-dev/react-native-bugbubble`
141141

142142
## Version Management
143143

@@ -172,8 +172,8 @@ npm publish
172172
## Troubleshooting
173173

174174
### "Package name already exists"
175-
- The package name `react-native-in-app-devtools` might be taken
176-
- Choose a different name or use a scoped package (`@your-username/react-native-in-app-devtools`)
175+
- The package name `@lokal-dev/react-native-bugbubble` might be taken
176+
- Make sure you have access to the `@lokal-dev` npm organization
177177

178178
### "You do not have permission"
179179
- Make sure you're logged in: `npm whoami`
@@ -211,7 +211,7 @@ npm publish
211211
⚠️ **Warning**: Unpublishing should be done within 72 hours of publishing and only if absolutely necessary.
212212

213213
```bash
214-
npm unpublish react-native-in-app-devtools@1.0.0
214+
npm unpublish @lokal-dev/react-native-bugbubble@1.0.0
215215
```
216216

217217
For packages older than 72 hours, you'll need to contact npm support.

README.md

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# React Native In-App DevTools
1+
# BugBubble - React Native In-App DevTools
22

33
An in-app debugging tool for React Native development. Monitor network requests, WebSocket events, console logs, and analytics events in real-time with a beautiful, draggable UI. Built with TypeScript, zero configuration required, and designed to never crash your app.
44

@@ -9,7 +9,7 @@ This library currently supports logging for the following:
99
-**Network Requests**: Automatically intercepts all `fetch()` and `XMLHttpRequest` calls
1010
-**Console Logs**: Automatically intercepts all console methods (`log`, `debug`, `info`, `warn`, `error`)
1111
-**WebSocket Events**: Automatically intercepts WebSocket connections and events (`open`, `message`, `close`, `error`)
12-
-**Analytics Events**: Requires explicit logging using `InAppDevToolsLogger.logAnalytics()`
12+
-**Analytics Events**: Requires explicit logging using `BugBubbleLogger.logAnalytics()`
1313

1414
## Features
1515

@@ -42,11 +42,11 @@ This library currently supports logging for the following:
4242
## Installation
4343

4444
```bash
45-
npm install react-native-in-app-devtools
45+
npm install @lokal-dev/react-native-bugbubble
4646
# or
47-
yarn add react-native-in-app-devtools
47+
yarn add @lokal-dev/react-native-bugbubble
4848
# or
49-
pnpm add react-native-in-app-devtools
49+
pnpm add @lokal-dev/react-native-bugbubble
5050
```
5151

5252
**No peer dependencies required!** This library is pure JavaScript/TypeScript and only requires React Native.
@@ -55,10 +55,10 @@ pnpm add react-native-in-app-devtools
5555

5656
### 1. Add the Debugger UI Component
5757

58-
Add the `RNInAppDevTools` component to your app's root component. **All configuration options are completely optional** - the component works with sensible defaults:
58+
Add the `BugBubble` component to your app's root component. **All configuration options are completely optional** - the component works with sensible defaults:
5959

6060
```tsx
61-
import { RNInAppDevTools } from 'react-native-in-app-devtools';
61+
import { BugBubble } from '@lokal-dev/react-native-bugbubble';
6262

6363
export default function App() {
6464
return (
@@ -67,10 +67,10 @@ export default function App() {
6767
<YourAppContent />
6868

6969
{/* Minimal setup - works with defaults */}
70-
<RNInAppDevTools />
70+
<BugBubble />
7171

7272
{/* Or customize with optional config */}
73-
<RNInAppDevTools
73+
<BugBubble
7474
config={{
7575
maxLogs: 1000,
7676
floatingButtonPosition: {
@@ -100,7 +100,7 @@ The debugger will automatically start intercepting:
100100
-**Network Requests**: All `fetch()` and `XMLHttpRequest` calls (automatic)
101101
-**Console Logs**: All console methods (`log`, `debug`, `info`, `warn`, `error`) (automatic)
102102
-**WebSocket Events**: All WebSocket connections and events (automatic)
103-
- ⚠️ **Analytics Events**: Must be explicitly logged using `InAppDevToolsLogger.logAnalytics()` (see below)
103+
- ⚠️ **Analytics Events**: Must be explicitly logged using `BugBubbleLogger.logAnalytics()` (see below)
104104

105105
**Note**: While network, console, and WebSocket logs are automatically intercepted, you can also use explicit logging methods if needed for custom scenarios.
106106

@@ -115,23 +115,23 @@ A floating button will appear on your screen. **Tap it to open the debugger, or
115115
- **Network Requests**: Automatically intercepted - no code changes needed
116116
- **Console Logs**: Automatically intercepted - no code changes needed
117117
- **WebSocket Events**: Automatically intercepted - no code changes needed
118-
- **Analytics Events**: **Must be explicitly logged** - use `InAppDevToolsLogger.logAnalytics()`
118+
- **Analytics Events**: **Must be explicitly logged** - use `BugBubbleLogger.logAnalytics()`
119119

120120
While network, console, and WebSocket logs are automatically captured, explicit logging methods are also available for all log types if you need to manually log events in custom scenarios.
121121

122122
### Explicit Logging API
123123

124-
**Analytics events must be explicitly logged**. For network, console, and WebSocket, explicit logging is optional but available for custom scenarios. Use the `InAppDevToolsLogger` API:
124+
**Analytics events must be explicitly logged**. For network, console, and WebSocket, explicit logging is optional but available for custom scenarios. Use the `BugBubbleLogger` API:
125125

126126
```tsx
127-
import { InAppDevToolsLogger } from 'react-native-in-app-devtools';
127+
import { BugBubbleLogger } from '@lokal-dev/react-native-bugbubble';
128128
```
129129

130130
#### Log Analytics Events
131131

132132
```tsx
133133
// Log an analytics event
134-
InAppDevToolsLogger.logAnalytics('user_login', {
134+
BugBubbleLogger.logAnalytics('user_login', {
135135
userId: '123',
136136
method: 'email',
137137
timestamp: Date.now(),
@@ -142,7 +142,7 @@ InAppDevToolsLogger.logAnalytics('user_login', {
142142

143143
```tsx
144144
// Log a network request explicitly
145-
InAppDevToolsLogger.logNetwork(
145+
BugBubbleLogger.logNetwork(
146146
'POST',
147147
'https://api.example.com/users',
148148
201, // status code
@@ -158,7 +158,7 @@ InAppDevToolsLogger.logNetwork(
158158

159159
```tsx
160160
// Log a WebSocket event
161-
InAppDevToolsLogger.logWebSocket('message', 'wss://api.example.com/ws', {
161+
BugBubbleLogger.logWebSocket('message', 'wss://api.example.com/ws', {
162162
type: 'ping',
163163
data: 'hello',
164164
});
@@ -168,23 +168,23 @@ InAppDevToolsLogger.logWebSocket('message', 'wss://api.example.com/ws', {
168168

169169
```tsx
170170
// Log console messages explicitly
171-
InAppDevToolsLogger.logConsole('info', 'User logged in', { userId: '123' });
172-
InAppDevToolsLogger.logConsole('error', 'Failed to fetch data', error);
173-
InAppDevToolsLogger.logConsole('warn', 'Deprecated API used');
171+
BugBubbleLogger.logConsole('info', 'User logged in', { userId: '123' });
172+
BugBubbleLogger.logConsole('error', 'Failed to fetch data', error);
173+
BugBubbleLogger.logConsole('warn', 'Deprecated API used');
174174
```
175175

176176
### Configuration
177177

178-
**All configuration options are completely optional**. The library works with sensible defaults out of the box. Configuration is passed as a prop to the `RNInAppDevTools` component:
178+
**All configuration options are completely optional**. The library works with sensible defaults out of the box. Configuration is passed as a prop to the `BugBubble` component:
179179

180180
```tsx
181-
import { RNInAppDevTools } from 'react-native-in-app-devtools';
181+
import { BugBubble } from '@lokal-dev/react-native-bugbubble';
182182

183183
// Minimal setup - all config is optional
184-
<RNInAppDevTools />
184+
<BugBubble />
185185

186186
// Or customize with optional config
187-
<RNInAppDevTools
187+
<BugBubble
188188
config={{
189189
maxLogs: 1000, // Optional: defaults to 1000
190190
floatingButtonPosition: {
@@ -215,7 +215,7 @@ You can disable tracking for specific log types or disable all tracking. When tr
215215

216216
```tsx
217217
// Disable network tracking only
218-
<RNInAppDevTools
218+
<BugBubble
219219
config={{
220220
trackingOptions: {
221221
enabled: true,
@@ -227,7 +227,7 @@ You can disable tracking for specific log types or disable all tracking. When tr
227227
/>
228228

229229
// Disable multiple log types
230-
<RNInAppDevTools
230+
<BugBubble
231231
config={{
232232
trackingOptions: {
233233
enabled: true,
@@ -240,7 +240,7 @@ You can disable tracking for specific log types or disable all tracking. When tr
240240
/>
241241

242242
// Disable all tracking (button will also be hidden)
243-
<RNInAppDevTools
243+
<BugBubble
244244
config={{
245245
trackingOptions: {
246246
enabled: false, // All tracking disabled and floating button hidden
@@ -253,33 +253,33 @@ You can disable tracking for specific log types or disable all tracking. When tr
253253

254254
## API Reference
255255

256-
### `RNInAppDevTools`
256+
### `BugBubble`
257257

258258
Root component that renders the debugger UI. Should be added at the root level of your app.
259259

260260
#### Props
261261

262262
```typescript
263-
interface RNInAppDevToolsProps {
264-
config?: Partial<InspectorConfig>;
263+
interface BugBubbleProps {
264+
config?: Partial<BugBubbleConfig>;
265265
}
266266
```
267267

268268
- `config` (optional): Partial configuration object. If not provided, default configuration will be used.
269269

270-
### `InAppDevToolsLogger`
270+
### `BugBubbleLogger`
271271

272272
Explicit logging API for manual event logging.
273273

274-
- `InAppDevToolsLogger.logAnalytics(eventName, properties?)` - Log analytics event
275-
- `InAppDevToolsLogger.logNetwork(method, url, statusCode?, requestHeaders?, responseHeaders?, requestBody?, responseBody?, duration?)` - Log network request
276-
- `InAppDevToolsLogger.logWebSocket(event, url?, data?)` - Log WebSocket event
277-
- `InAppDevToolsLogger.logConsole(level, ...args)` - Log console message
274+
- `BugBubbleLogger.logAnalytics(eventName, properties?)` - Log analytics event
275+
- `BugBubbleLogger.logNetwork(method, url, statusCode?, requestHeaders?, responseHeaders?, requestBody?, responseBody?, duration?)` - Log network request
276+
- `BugBubbleLogger.logWebSocket(event, url?, data?)` - Log WebSocket event
277+
- `BugBubbleLogger.logConsole(level, ...args)` - Log console message
278278

279279
### Types
280280

281281
```typescript
282-
interface InspectorConfig {
282+
interface BugBubbleConfig {
283283
maxLogs: number;
284284
floatingButtonPosition: {
285285
top: number;
@@ -408,24 +408,24 @@ This library is designed to **never crash your app**. All operations are wrapped
408408

409409
## Best Practices
410410

411-
1. **Minimal Setup Works**: All configuration is optional - you can use `<RNInAppDevTools />` without any config:
411+
1. **Minimal Setup Works**: All configuration is optional - you can use `<BugBubble />` without any config:
412412

413413
```tsx
414-
{__DEV__ && <RNInAppDevTools />}
414+
{__DEV__ && <BugBubble />}
415415
```
416416

417-
2. **Analytics Requires Explicit Logging**: Remember that analytics events must be explicitly logged using `InAppDevToolsLogger.logAnalytics()`. Network, console, and WebSocket logs are automatically intercepted.
417+
2. **Analytics Requires Explicit Logging**: Remember that analytics events must be explicitly logged using `BugBubbleLogger.logAnalytics()`. Network, console, and WebSocket logs are automatically intercepted.
418418

419419
3. **Initialize in Development Only**: Only include the debugger in non-production environments:
420420

421421
```tsx
422-
{__DEV__ && <RNInAppDevTools />}
422+
{__DEV__ && <BugBubble />}
423423
```
424424

425425
4. **Customize Only When Needed**: Only pass config options when you need to override defaults:
426426

427427
```tsx
428-
<RNInAppDevTools
428+
<BugBubble
429429
config={{
430430
maxLogs: 500, // Only if you want to change from default 1000
431431
trackingOptions: {
@@ -442,7 +442,7 @@ This library is designed to **never crash your app**. All operations are wrapped
442442

443443
### Debugger Not Appearing
444444

445-
- Ensure you've added `<RNInAppDevTools />` component to your app
445+
- Ensure you've added `<BugBubble />` component to your app
446446
- Check that you're not in production mode (consider wrapping with `__DEV__`)
447447
- Verify that `trackingOptions.enabled` is set to `true` in config (default: true)
448448

example/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Example App
22

3-
This example app demonstrates all the features of `react-native-in-app-devtools` library. It showcases automatic interception of console logs, network requests, and WebSocket events, as well as explicit logging capabilities.
3+
This example app demonstrates all the features of `@lokal-dev/react-native-bugbubble` library. It showcases automatic interception of console logs, network requests, and WebSocket events, as well as explicit logging capabilities.
44

55
## Prerequisites
66

@@ -60,7 +60,7 @@ When you run the example app, you'll see:
6060

6161
1. **Title and Subtitle**: "React Native In-App DevTools" with "Comprehensive Feature Demo"
6262

63-
2. **Info Banner**: A blue banner explaining that automatic interception works out of the box, and explicit logging is available via `InAppDevToolsLogger`
63+
2. **Info Banner**: A blue banner explaining that automatic interception works out of the box, and explicit logging is available via `BugBubbleLogger`
6464

6565
3. **Four Demo Sections**:
6666
- **💬 Console Logs**: Demonstrates automatic console log interception
@@ -87,7 +87,7 @@ When you run the example app, you'll see:
8787
- These are automatically intercepted and logged in the debugger
8888

8989
- **"Manual Console Log" Button**:
90-
- Uses `InAppDevToolsLogger.logConsole()` to explicitly log messages
90+
- Uses `BugBubbleLogger.logConsole()` to explicitly log messages
9191
- Demonstrates manual logging with different log levels
9292

9393
### Network Requests Section
@@ -101,7 +101,7 @@ When you run the example app, you'll see:
101101
- Automatically intercepted and logged with request body and response
102102

103103
- **"Manual Network Log" Button**:
104-
- Uses `InAppDevToolsLogger.logNetwork()` to explicitly log a network request
104+
- Uses `BugBubbleLogger.logNetwork()` to explicitly log a network request
105105
- Shows how to manually log network events with full details
106106

107107
### WebSocket Events Section
@@ -115,13 +115,13 @@ When you run the example app, you'll see:
115115
- Message events are automatically intercepted
116116

117117
- **"Manual WebSocket Log" Button**:
118-
- Uses `InAppDevToolsLogger.logWebSocket()` to explicitly log WebSocket events
118+
- Uses `BugBubbleLogger.logWebSocket()` to explicitly log WebSocket events
119119
- Demonstrates manual WebSocket event logging
120120

121121
### Analytics Events Section
122122

123123
- **"Log Analytics Events" Button**:
124-
- Uses `InAppDevToolsLogger.logAnalytics()` to log analytics events
124+
- Uses `BugBubbleLogger.logAnalytics()` to log analytics events
125125
- Shows examples of button clicks and screen views
126126
- Note: Analytics events must be logged explicitly (not automatically intercepted)
127127

@@ -216,5 +216,5 @@ Try these scenarios to see the library in action:
216216
- The example app uses Expo for easy cross-platform development
217217
- All configuration options are demonstrated in `App.tsx`
218218
- The library automatically intercepts network, console, and WebSocket events without any additional setup
219-
- Analytics events require explicit logging using `InAppDevToolsLogger.logAnalytics()`
219+
- Analytics events require explicit logging using `BugBubbleLogger.logAnalytics()`
220220

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "react-native-in-app-devtools-example",
2+
"name": "react-native-bugbubble-example",
33
"version": "1.0.0",
44
"main": "index.js",
55
"scripts": {

0 commit comments

Comments
 (0)