posthog-react-native 2.1.2 → 2.1.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/lib/index.cjs.js +50 -17
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +11 -1
- package/lib/index.esm.js +50 -17
- package/lib/index.esm.js.map +1 -1
- package/lib/posthog-core/src/index.d.ts +2 -0
- package/lib/posthog-core/src/types.d.ts +7 -1
- package/lib/posthog-react-native/src/types.d.ts +2 -0
- package/package.json +2 -2
|
@@ -26,6 +26,7 @@ export declare abstract class PostHogCore {
|
|
|
26
26
|
private _optoutOverride;
|
|
27
27
|
constructor(apiKey: string, options?: PosthogCoreOptions);
|
|
28
28
|
protected getCommonEventProperties(): any;
|
|
29
|
+
protected setupBootstrap(options?: Partial<PosthogCoreOptions>): void;
|
|
29
30
|
private get props();
|
|
30
31
|
private set props(value);
|
|
31
32
|
private clearProps;
|
|
@@ -76,6 +77,7 @@ export declare abstract class PostHogCore {
|
|
|
76
77
|
***/
|
|
77
78
|
private decideAsync;
|
|
78
79
|
private _decideAsync;
|
|
80
|
+
private setKnownFeatureFlags;
|
|
79
81
|
getFeatureFlag(key: string): boolean | string | undefined;
|
|
80
82
|
getFeatureFlags(): PostHogDecideResponse['featureFlags'] | undefined;
|
|
81
83
|
isFeatureEnabled(key: string): boolean | undefined;
|
|
@@ -5,6 +5,11 @@ export declare type PosthogCoreOptions = {
|
|
|
5
5
|
enable?: boolean;
|
|
6
6
|
sendFeatureFlagEvent?: boolean;
|
|
7
7
|
preloadFeatureFlags?: boolean;
|
|
8
|
+
bootstrap?: {
|
|
9
|
+
distinctId?: string;
|
|
10
|
+
isIdentifiedId?: boolean;
|
|
11
|
+
featureFlags?: Record<string, boolean | string>;
|
|
12
|
+
};
|
|
8
13
|
fetchRetryCount?: number;
|
|
9
14
|
fetchRetryDelay?: number;
|
|
10
15
|
sessionExpirationTimeSeconds?: number;
|
|
@@ -30,7 +35,8 @@ export declare type PostHogFetchOptions = {
|
|
|
30
35
|
headers: {
|
|
31
36
|
[key: string]: string;
|
|
32
37
|
};
|
|
33
|
-
body
|
|
38
|
+
body?: string;
|
|
39
|
+
signal?: AbortSignal;
|
|
34
40
|
};
|
|
35
41
|
export declare type PostHogFetchResponse = {
|
|
36
42
|
status: number;
|
|
@@ -9,5 +9,7 @@ export declare type PostHogAutocaptureOptions = {
|
|
|
9
9
|
maxElementsCaptured?: number;
|
|
10
10
|
ignoreLabels?: string[];
|
|
11
11
|
propsToCapture?: string[];
|
|
12
|
+
captureScreens?: boolean;
|
|
12
13
|
navigation?: PostHogAutocaptureNavigationTrackerOptions;
|
|
14
|
+
captureLifecycleEvents?: boolean;
|
|
13
15
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "posthog-react-native",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
4
4
|
"main": "lib/index.cjs.js",
|
|
5
5
|
"module": "lib/index.esm.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"dependencies": {},
|
|
11
11
|
"scripts": {
|
|
12
12
|
"test": "jest -c jest.config.js",
|
|
13
|
-
"
|
|
13
|
+
"prepublishOnly": "cd .. && yarn build"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@react-navigation/native": "^5.0.10",
|