@statsig/react-native-core 2.2.0-beta.8 → 3.0.0-beta.2
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/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statsig/react-native-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.2",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@statsig/client-core": "
|
|
6
|
-
"@statsig/js-client": "2.2.0-beta.8"
|
|
5
|
+
"@statsig/client-core": "3.0.0-beta.2"
|
|
7
6
|
},
|
|
8
7
|
"peerDependencies": {
|
|
9
8
|
"react-native": "0.*",
|
package/src/RNSetup.d.ts
ADDED
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._setupStatsigForReactNative =
|
|
3
|
+
exports._setupStatsigForReactNative = void 0;
|
|
4
4
|
const client_core_1 = require("@statsig/client-core");
|
|
5
|
-
const js_client_1 = require("@statsig/js-client");
|
|
6
5
|
const AppVisiblityShim_1 = require("./AppVisiblityShim");
|
|
7
6
|
const PreloadedAsyncStorage_1 = require("./PreloadedAsyncStorage");
|
|
8
|
-
class StatsigClientReactNativeBase extends js_client_1.StatsigClient {
|
|
9
|
-
constructor(sdkKey, user, options = null, type, statsigMetadataAdditions) {
|
|
10
|
-
const opts = options !== null && options !== void 0 ? options : {};
|
|
11
|
-
_setupStatsigForReactNative(type, statsigMetadataAdditions, opts);
|
|
12
|
-
super(sdkKey, user, opts);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.StatsigClientReactNativeBase = StatsigClientReactNativeBase;
|
|
16
7
|
function _setupStatsigForReactNative(type, statsigMetadataAdditions, options) {
|
|
17
8
|
(0, AppVisiblityShim_1._applyAppStateVisibilityShim)();
|
|
18
9
|
client_core_1.SDKType._setBindingType(type);
|
|
19
|
-
|
|
10
|
+
if (statsigMetadataAdditions) {
|
|
11
|
+
client_core_1.StatsigMetadataProvider.add(statsigMetadataAdditions);
|
|
12
|
+
}
|
|
20
13
|
if (options.storageProvider == null) {
|
|
21
14
|
options.storageProvider = (0, PreloadedAsyncStorage_1._createPreloadedAsyncStorage)();
|
|
22
15
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { _setupStatsigForReactNative } from './RNSetup';
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._setupStatsigForReactNative =
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
Object.defineProperty(exports, "_setupStatsigForReactNative", { enumerable: true, get: function () { return StatsigClientReactNativeBase_1._setupStatsigForReactNative; } });
|
|
3
|
+
exports._setupStatsigForReactNative = void 0;
|
|
4
|
+
var RNSetup_1 = require("./RNSetup");
|
|
5
|
+
Object.defineProperty(exports, "_setupStatsigForReactNative", { enumerable: true, get: function () { return RNSetup_1._setupStatsigForReactNative; } });
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { StatsigClient, StatsigOptions, StatsigUser } from '@statsig/js-client';
|
|
2
|
-
export declare class StatsigClientReactNativeBase extends StatsigClient {
|
|
3
|
-
constructor(sdkKey: string, user: StatsigUser, options: {
|
|
4
|
-
disableLogging?: boolean | undefined;
|
|
5
|
-
disableStorage?: boolean | undefined;
|
|
6
|
-
disableCompression?: boolean | undefined;
|
|
7
|
-
disableStatsigEncoding?: boolean | undefined;
|
|
8
|
-
environment?: import("@statsig/client-core").StatsigEnvironment | undefined;
|
|
9
|
-
includeCurrentPageUrlWithEvents?: boolean | undefined;
|
|
10
|
-
logLevel?: import("@statsig/client-core").LogLevel | undefined;
|
|
11
|
-
loggingBufferMaxSize?: number | undefined;
|
|
12
|
-
loggingIntervalMs?: number | undefined;
|
|
13
|
-
networkConfig?: {
|
|
14
|
-
api?: string | undefined;
|
|
15
|
-
logEventUrl?: string | undefined;
|
|
16
|
-
networkOverrideFunc?: ((url: string, args: import("@statsig/client-core").NetworkArgs) => Promise<Response>) | undefined;
|
|
17
|
-
networkTimeoutMs?: number | undefined;
|
|
18
|
-
preventAllNetworkTraffic?: boolean | undefined;
|
|
19
|
-
initializeUrl?: string | undefined;
|
|
20
|
-
} | undefined;
|
|
21
|
-
overrideAdapter?: import("@statsig/client-core").OverrideAdapter | undefined;
|
|
22
|
-
initialSessionID?: string | undefined;
|
|
23
|
-
storageProvider?: import("@statsig/client-core").StorageProvider | undefined;
|
|
24
|
-
dataAdapter?: import("@statsig/client-core").EvaluationsDataAdapter | undefined;
|
|
25
|
-
customUserCacheKeyFunc?: import("@statsig/client-core").CustomCacheKeyGenerator | undefined;
|
|
26
|
-
} | null | undefined, type: 'rn' | 'expo', statsigMetadataAdditions: Record<string, string | undefined>);
|
|
27
|
-
}
|
|
28
|
-
export declare function _setupStatsigForReactNative(type: 'rn' | 'expo', statsigMetadataAdditions: Record<string, string | undefined>, options: StatsigOptions): void;
|