@bytem/bytem-tracker-app 0.0.17 → 0.0.18

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 CHANGED
@@ -7,7 +7,10 @@ This is the official Bytem Tracker SDK for React Native applications.
7
7
  Install the package using Yarn:
8
8
 
9
9
  ```bash
10
- yarn add @bytem/bytem-tracker-app @react-native-async-storage/async-storage
10
+ # need
11
+ yarn add @bytem/bytem-tracker-app
12
+ # if not
13
+ yarn add @react-native-async-storage/async-storage
11
14
  ```
12
15
 
13
16
  ### iOS Setup
@@ -31,7 +34,7 @@ const App = () => {
31
34
  await BytemTracker.init({
32
35
  appKey: 'your-app-key',
33
36
  endpoint: 'https://api.bytem.com/track',
34
- debug: __DEV__, // Enable debug logs in development
37
+ debug: false, // Enable debug logs in development
35
38
  });
36
39
  };
37
40
 
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytem/bytem-tracker-app",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "Bytem Tracker SDK for React Native",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -13,8 +13,7 @@ const trackPayOrder = (order) => {
13
13
  name: p.name,
14
14
  price: p.price,
15
15
  quantity: p.quantity,
16
- })),
17
- status: 'success',
16
+ }))
18
17
  },
19
18
  };
20
19
  };
@@ -9,6 +9,7 @@ global.fetch = jest.fn(() => Promise.resolve({
9
9
  ok: true,
10
10
  status: 200,
11
11
  json: () => Promise.resolve({ status: 'success' }),
12
+ text: () => Promise.resolve('{"status":"success"}'),
12
13
  }));
13
14
  describe('BytemTracker Additional Methods', () => {
14
15
  const mockConfig = {
@@ -19,13 +19,6 @@ jest.mock('@react-native-async-storage/async-storage', () => ({
19
19
  return Promise.resolve(null);
20
20
  }),
21
21
  }));
22
- // Mock React Native Device Info
23
- jest.mock('react-native-device-info', () => ({
24
- getSystemName: jest.fn(() => 'iOS'),
25
- getSystemVersion: jest.fn(() => '14.0'),
26
- getModel: jest.fn(() => 'iPhone 11'),
27
- getUserAgent: jest.fn(() => Promise.resolve('Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X)')),
28
- }), { virtual: true });
29
22
  // Mock React Native
30
23
  jest.mock('react-native', () => ({
31
24
  Platform: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytem/bytem-tracker-app",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "Bytem Tracker SDK for React Native",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -1,2 +0,0 @@
1
- import { EventPayload, UserTraits } from '../types';
2
- export declare const trackUser: (userId: string, traits?: UserTraits) => EventPayload;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.trackUser = void 0;
4
- const trackUser = (userId, traits = {}) => {
5
- return {
6
- event: 'identify',
7
- params: {
8
- user_id: userId,
9
- traits: traits,
10
- },
11
- };
12
- };
13
- exports.trackUser = trackUser;