@pulseboard/react-native 0.1.0 → 0.1.1
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.md +99 -9
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# @pulseboard/react-native
|
|
2
2
|
|
|
3
|
-
> Official
|
|
3
|
+
> Official React Native SDK for PulseBoard — mobile app observability platform
|
|
4
|
+
> by [Aenexar](https://github.com/aenexar).
|
|
4
5
|
|
|
5
6
|
## Installation
|
|
6
7
|
|
|
@@ -8,20 +9,109 @@
|
|
|
8
9
|
npm install @pulseboard/react-native
|
|
9
10
|
```
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
### iOS
|
|
12
13
|
|
|
13
14
|
```bash
|
|
14
15
|
npx pod-install
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
### Android
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
No additional steps required — autolinking handles it.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
## Quick Start
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { PulseBoard } from "@pulseboard/react-native";
|
|
26
|
+
|
|
27
|
+
// Initialise once at app entry point
|
|
28
|
+
PulseBoard.init({
|
|
29
|
+
host: "https://your-backend-url.com",
|
|
30
|
+
apiKey: "your-project-api-key",
|
|
31
|
+
app: {
|
|
32
|
+
version: "1.0.0",
|
|
33
|
+
buildNumber: "1",
|
|
34
|
+
environment: "production",
|
|
35
|
+
},
|
|
36
|
+
debug: false,
|
|
37
|
+
autoCapture: true,
|
|
38
|
+
flushInterval: 5000,
|
|
39
|
+
maxQueueSize: 100,
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## API Reference
|
|
44
|
+
|
|
45
|
+
### Initialisation
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
PulseBoard.init(config: SDKConfig): void
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### User
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
PulseBoard.identify(user: UserContext): void
|
|
55
|
+
PulseBoard.clearUser(): void
|
|
24
56
|
```
|
|
25
57
|
|
|
26
|
-
|
|
27
|
-
|
|
58
|
+
### Events
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
PulseBoard.track(name: string, options?: TrackOptions): void
|
|
62
|
+
PulseBoard.metric(name: string, value: number, options?: TrackOptions): void
|
|
63
|
+
PulseBoard.captureError(error: Error, options?: CaptureErrorOptions): void
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Analytics
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
PulseBoard.startSession(): void
|
|
70
|
+
PulseBoard.endSession(duration?: number): void
|
|
71
|
+
PulseBoard.trackScreen(screenName: string, loadTime?: number): void
|
|
72
|
+
PulseBoard.trackApiCall(
|
|
73
|
+
endpoint: string,
|
|
74
|
+
httpMethod: string,
|
|
75
|
+
statusCode: number,
|
|
76
|
+
duration: number,
|
|
77
|
+
payloadSize?: number,
|
|
78
|
+
): void
|
|
79
|
+
PulseBoard.trackCrash(error: Error, isFatal?: boolean): void
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Utilities
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
PulseBoard.getContext(): Promise<EnrichedContext>
|
|
86
|
+
PulseBoard.flush(): Promise<void>
|
|
87
|
+
PulseBoard.destroy(): void
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Components & Hooks
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
// Error boundary — wraps your app to catch render errors
|
|
94
|
+
<PulseBoardErrorBoundary>
|
|
95
|
+
<App />
|
|
96
|
+
</PulseBoardErrorBoundary>
|
|
97
|
+
|
|
98
|
+
// Hook — screen tracking and event helpers
|
|
99
|
+
const { trackScreen, track } = usePulseBoard()
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Platform Support
|
|
103
|
+
|
|
104
|
+
| Platform | Minimum Version |
|
|
105
|
+
| ------------ | --------------- |
|
|
106
|
+
| iOS | 13.0+ |
|
|
107
|
+
| Android | API 21+ |
|
|
108
|
+
| React Native | 0.73+ |
|
|
109
|
+
|
|
110
|
+
## Example App
|
|
111
|
+
|
|
112
|
+
See [pulseboard-example-rn-cli](https://github.com/aenexar/pulseboard-example-rn-cli)
|
|
113
|
+
for a full working example.
|
|
114
|
+
|
|
115
|
+
## License
|
|
116
|
+
|
|
117
|
+
Private — © 2026 Aenexar. All rights reserved.
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulseboard/react-native",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Official PulseBoard SDK for React Native",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
-
"homepage": "https://github.com/
|
|
8
|
+
"homepage": "https://github.com/aenexar/pulseboard-react-native",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "https://github.com/
|
|
12
|
+
"url": "https://github.com/aenexar/pulseboard-react-native"
|
|
13
13
|
},
|
|
14
14
|
"bugs": {
|
|
15
15
|
"email": "m.arslanmushtaqahmed@gmail.com",
|
|
16
|
-
"url": "https://github.com/
|
|
16
|
+
"url": "https://github.com/aenexar/pulseboard-react-native"
|
|
17
17
|
},
|
|
18
18
|
"exports": {
|
|
19
19
|
".": {
|