firstusers 1.0.3 → 1.0.4

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/app.plugin.js ADDED
@@ -0,0 +1,2 @@
1
+ // Expo Config Plugin entry point
2
+ module.exports = require('./plugin/src/withFirstUsers');
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "firstusers",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Usage tracking SDK for React Native/Expo apps. Tracks authenticated user sessions with 30s heartbeat to First Users platform.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
7
- "app.plugin": "./plugin/src/withFirstUsers.js",
7
+ "app.plugin": "./app.plugin.js",
8
8
  "scripts": {
9
9
  "build": "tsc",
10
10
  "prepare": "npm run build"
@@ -42,6 +42,7 @@
42
42
  "build/",
43
43
  "android/",
44
44
  "plugin/",
45
+ "app.plugin.js",
45
46
  "expo-module.config.json"
46
47
  ]
47
48
  }
@@ -3,11 +3,14 @@ const { withAndroidManifest, withAppBuildGradle } = require('@expo/config-plugin
3
3
  /**
4
4
  * Expo Config Plugin for First Users Tracker
5
5
  * Automatically configures Android project for session tracking
6
+ *
7
+ * @param {import('@expo/config-plugins').ExpoConfig} config
8
+ * @param {{ apiUrl?: string }} props
6
9
  */
7
- function withFirstUsers(config, props = {}) {
10
+ const withFirstUsers = (config, props = {}) => {
8
11
  const apiUrl = props.apiUrl || 'https://cotester-api.01hunterwl.workers.dev';
9
12
 
10
- // Add INTERNET and DETECT_SCREEN_CAPTURE permissions to AndroidManifest.xml
13
+ // Add INTERNET permission to AndroidManifest.xml
11
14
  config = withAndroidManifest(config, (config) => {
12
15
  const androidManifest = config.modResults;
13
16
  const mainApplication = androidManifest.manifest;
@@ -55,6 +58,6 @@ function withFirstUsers(config, props = {}) {
55
58
  });
56
59
 
57
60
  return config;
58
- }
61
+ };
59
62
 
60
63
  module.exports = withFirstUsers;