@datadog/mobile-react-native 3.0.3 → 3.1.0
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/DatadogSDKReactNative.podspec +10 -9
- package/android/build.gradle +10 -8
- package/android/src/main/kotlin/com/datadog/reactnative/DdFlagsImplementation.kt +237 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkBridgeExt.kt +262 -78
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkReactNativePackage.kt +3 -1
- package/android/src/main/kotlin/com/datadog/reactnative/SdkVersion.kt +1 -1
- package/android/src/newarch/kotlin/com/datadog/reactnative/DdFlags.kt +66 -0
- package/android/src/oldarch/kotlin/com/datadog/reactnative/DdFlags.kt +63 -0
- package/android/src/test/kotlin/com/datadog/reactnative/DdSdkBridgeExtTest.kt +242 -0
- package/android/src/test/kotlin/com/datadog/tools/unit/MapExt.kt +38 -0
- package/android/src/test/kotlin/com/datadog/tools/unit/MockRumMonitor.kt +3 -0
- package/ios/Sources/DatadogSDKReactNative.h +2 -0
- package/ios/Sources/DdFlags.h +24 -0
- package/ios/Sources/DdFlags.mm +83 -0
- package/ios/Sources/DdFlagsImplementation.swift +263 -0
- package/ios/Sources/RNDdSdkConfiguration.swift +2 -1
- package/ios/Sources/SdkVersion.swift +1 -1
- package/lib/commonjs/flags/DdFlags.js +51 -0
- package/lib/commonjs/flags/DdFlags.js.map +1 -0
- package/lib/commonjs/flags/FlagsClient.js +218 -0
- package/lib/commonjs/flags/FlagsClient.js.map +1 -0
- package/lib/commonjs/flags/internal.js +40 -0
- package/lib/commonjs/flags/internal.js.map +1 -0
- package/lib/commonjs/flags/types.js +6 -0
- package/lib/commonjs/flags/types.js.map +1 -0
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/NativeDdFlags.js +19 -0
- package/lib/commonjs/specs/NativeDdFlags.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/module/flags/DdFlags.js +45 -0
- package/lib/module/flags/DdFlags.js.map +1 -0
- package/lib/module/flags/FlagsClient.js +211 -0
- package/lib/module/flags/FlagsClient.js.map +1 -0
- package/lib/module/flags/internal.js +33 -0
- package/lib/module/flags/internal.js.map +1 -0
- package/lib/module/flags/types.js +2 -0
- package/lib/module/flags/types.js.map +1 -0
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/specs/NativeDdFlags.js +17 -0
- package/lib/module/specs/NativeDdFlags.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/typescript/flags/DdFlags.d.ts +3 -0
- package/lib/typescript/flags/DdFlags.d.ts.map +1 -0
- package/lib/typescript/flags/FlagsClient.d.ts +114 -0
- package/lib/typescript/flags/FlagsClient.d.ts.map +1 -0
- package/lib/typescript/flags/internal.d.ts +14 -0
- package/lib/typescript/flags/internal.d.ts.map +1 -0
- package/lib/typescript/flags/types.d.ts +202 -0
- package/lib/typescript/flags/types.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +5 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/nativeModulesTypes.d.ts +5 -0
- package/lib/typescript/nativeModulesTypes.d.ts.map +1 -1
- package/lib/typescript/specs/NativeDdFlags.d.ts +15 -0
- package/lib/typescript/specs/NativeDdFlags.d.ts.map +1 -0
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/flags/DdFlags.ts +59 -0
- package/src/flags/FlagsClient.ts +266 -0
- package/src/flags/__tests__/DdFlags.test.ts +65 -0
- package/src/flags/__tests__/FlagsClient.test.ts +320 -0
- package/src/flags/internal.ts +63 -0
- package/src/flags/types.ts +215 -0
- package/src/index.tsx +15 -1
- package/src/nativeModulesTypes.ts +6 -0
- package/src/specs/NativeDdFlags.ts +35 -0
- package/src/version.ts +1 -1
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import type { DdSdkNativeConfiguration } from './config/features/CoreConfigurationNative';
|
|
8
|
+
import type { Spec as NativeDdFlags } from './specs/NativeDdFlags';
|
|
8
9
|
import type { Spec as NativeDdLogs } from './specs/NativeDdLogs';
|
|
9
10
|
import type { Spec as NativeDdRum } from './specs/NativeDdRum';
|
|
10
11
|
import type { Spec as NativeDdSdk } from './specs/NativeDdSdk';
|
|
@@ -25,6 +26,11 @@ export type DdNativeLogsType = NativeDdLogs;
|
|
|
25
26
|
*/
|
|
26
27
|
export type DdNativeTraceType = NativeDdTrace;
|
|
27
28
|
|
|
29
|
+
/**
|
|
30
|
+
* The entry point to use Datadog's Flags feature.
|
|
31
|
+
*/
|
|
32
|
+
export type DdNativeFlagsType = NativeDdFlags;
|
|
33
|
+
|
|
28
34
|
/**
|
|
29
35
|
* The entry point to initialize Datadog's features.
|
|
30
36
|
*/
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
3
|
+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
4
|
+
* Copyright 2016-Present Datadog, Inc.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* eslint-disable @typescript-eslint/ban-types */
|
|
8
|
+
import type { TurboModule } from 'react-native';
|
|
9
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
10
|
+
|
|
11
|
+
import type { FlagCacheEntry } from '../flags/internal';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Do not import this Spec directly, use DdNativeFlagsType instead.
|
|
15
|
+
*/
|
|
16
|
+
export interface Spec extends TurboModule {
|
|
17
|
+
readonly enable: (configuration: Object) => Promise<void>;
|
|
18
|
+
|
|
19
|
+
readonly setEvaluationContext: (
|
|
20
|
+
clientName: string,
|
|
21
|
+
targetingKey: string,
|
|
22
|
+
attributes: Object
|
|
23
|
+
) => Promise<{ [key: string]: FlagCacheEntry }>;
|
|
24
|
+
|
|
25
|
+
readonly trackEvaluation: (
|
|
26
|
+
clientName: string,
|
|
27
|
+
key: string,
|
|
28
|
+
rawFlag: Object,
|
|
29
|
+
targetingKey: string,
|
|
30
|
+
attributes: Object
|
|
31
|
+
) => Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// eslint-disable-next-line import/no-default-export
|
|
35
|
+
export default TurboModuleRegistry.get<Spec>('DdFlags');
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
export const version = '3.0
|
|
2
|
+
export const version = '3.1.0';
|