@datadog/mobile-react-native-openfeature 3.7.0 → 3.9.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/README.md +187 -15
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/provider.js +1 -1
- package/lib/commonjs/provider.js.map +1 -1
- package/lib/commonjs/rumContext.js +44 -0
- package/lib/commonjs/rumContext.js.map +1 -0
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/provider.js +1 -1
- package/lib/module/provider.js.map +1 -1
- package/lib/module/rumContext.js +37 -0
- package/lib/module/rumContext.js.map +1 -0
- package/lib/typescript/core/src/flags/internal.d.ts.map +1 -1
- package/lib/typescript/core/src/flags/rumIntegration.d.ts +14 -0
- package/lib/typescript/core/src/flags/rumIntegration.d.ts.map +1 -0
- package/lib/typescript/core/src/index.d.ts +2 -1
- package/lib/typescript/core/src/index.d.ts.map +1 -1
- package/lib/typescript/core/src/sdk/AttributesEncoding/defaultEncoders.d.ts.map +1 -1
- package/lib/typescript/core/src/sdk/AttributesEncoding/utils.d.ts +1 -0
- package/lib/typescript/core/src/sdk/AttributesEncoding/utils.d.ts.map +1 -1
- package/lib/typescript/core/src/sdk/DdSdkInternal.d.ts +1 -8
- package/lib/typescript/core/src/sdk/DdSdkInternal.d.ts.map +1 -1
- package/lib/typescript/core/src/utils/time-provider/TimeProvider.d.ts.map +1 -1
- package/lib/typescript/core/src/version.d.ts +1 -1
- package/lib/typescript/react-native-openfeature/src/index.d.ts +4 -2
- package/lib/typescript/react-native-openfeature/src/index.d.ts.map +1 -1
- package/lib/typescript/react-native-openfeature/src/provider.d.ts.map +1 -1
- package/lib/typescript/react-native-openfeature/src/rumContext.d.ts +23 -0
- package/lib/typescript/react-native-openfeature/src/rumContext.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/__tests__/__utils__/rumContext.types.ts +55 -0
- package/src/__tests__/__utils__/tsconfig.json +8 -0
- package/src/__tests__/provider.test.ts +30 -0
- package/src/__tests__/rumContext.compatibility.test.ts +122 -0
- package/src/__tests__/rumContext.integration.test.ts +414 -0
- package/src/__tests__/rumContext.test.ts +100 -0
- package/src/__tests__/rumContext.types.test.ts +27 -0
- package/src/index.ts +4 -1
- package/src/provider.ts +5 -3
- package/src/rumContext.ts +54 -0
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ yarn add @datadog/mobile-react-native @datadog/mobile-react-native-openfeature @
|
|
|
29
29
|
Use the following example code snippet to initialize the Datadog SDK, enable the Feature Flags feature, and set up the OpenFeature provider.
|
|
30
30
|
|
|
31
31
|
```tsx
|
|
32
|
-
import { CoreConfiguration, DatadogProvider, DdFlags } from '@datadog/mobile-react-native';
|
|
32
|
+
import { CoreConfiguration, DatadogProvider, DdFlags, DdSdkReactNative } from '@datadog/mobile-react-native';
|
|
33
33
|
import { DatadogOpenFeatureProvider } from '@datadog/mobile-react-native-openfeature';
|
|
34
34
|
import { OpenFeature } from '@openfeature/react-sdk';
|
|
35
35
|
|
|
@@ -67,31 +67,203 @@ After completing this setup, your app is ready for flag evaluation with OpenFeat
|
|
|
67
67
|
|
|
68
68
|
> **Note**: Sending flag evaluation data to Datadog is automatically enabled when using the Feature Flags SDK. Provide `rumIntegrationEnabled` and `trackExposures` parameters to the `DdFlags.enable()` call to configure.
|
|
69
69
|
|
|
70
|
+
### RUM user context
|
|
71
|
+
|
|
72
|
+
Use `enrichWithRumUser()` when you explicitly want to use the current RUM user as part of an
|
|
73
|
+
OpenFeature evaluation context. Neither Datadog OpenFeature provider enriches context automatically.
|
|
74
|
+
This keeps context changes visible through OpenFeature and avoids changing flag assignments unless
|
|
75
|
+
your application opts in.
|
|
76
|
+
|
|
77
|
+
The helper maps the RUM user ID to `targetingKey`. It maps `name`, `email`, and flat string, number,
|
|
78
|
+
or boolean `extraInfo` properties to evaluation attributes. Merge precedence is `extraInfo`,
|
|
79
|
+
then the RUM user's own identity fields, then the application context (highest precedence).
|
|
80
|
+
`targetingKey`, `name`, and `email` in `extraInfo` follow the same merge rules as other attributes;
|
|
81
|
+
these keys are not reserved to a particular source. The helper does not apply targeting-key-specific
|
|
82
|
+
validation: numeric or boolean values overwritten later in the merge do not trigger targeting-key
|
|
83
|
+
warnings. The final `targetingKey` must be a string (including an empty string). If a non-string value
|
|
84
|
+
reaches the Datadog Flags context-processing layer, it logs an SDK warning and uses the anonymous subject
|
|
85
|
+
(`''`) for evaluation and tracking, regardless of whether the value came from `extraInfo` or the
|
|
86
|
+
application. It does not fall back to a lower-precedence identity or rewrite OpenFeature's context.
|
|
87
|
+
Application values can therefore supply a different targeting key (for example, a device or session
|
|
88
|
+
ID). When enrichment succeeds, an application field set to `undefined` removes the
|
|
89
|
+
corresponding RUM value and is omitted from the returned context. Null-valued and nested RUM user
|
|
90
|
+
properties are not included. If no RUM user is set, including after `clearUserInfo()`, the helper
|
|
91
|
+
normalizes the application context without adding RUM values or logging a warning. Actual failures
|
|
92
|
+
to read the RUM user still produce an SDK warning.
|
|
93
|
+
|
|
94
|
+
> **Note:** Numeric evaluation attributes currently differ by platform: Android converts them to
|
|
95
|
+
> strings (for example, `42` can become `"42.0"` across the React Native bridge), while iOS preserves
|
|
96
|
+
> numeric values. For consistent cross-platform targeting, explicitly supply consistently formatted
|
|
97
|
+
> strings in the application context, or omit inherited numeric attributes with `undefined`.
|
|
98
|
+
|
|
99
|
+
If the core SDK's `__ddEnrichEvaluationContextWithRumUser` helper is missing or not callable,
|
|
100
|
+
`enrichWithRumUser()` logs a console warning and returns the original application context unchanged,
|
|
101
|
+
including any `undefined` fields.
|
|
102
|
+
OpenFeature initialization and evaluation can continue using the application's context without RUM
|
|
103
|
+
values. Update the core SDK to at least the OpenFeature package's version, check for duplicate
|
|
104
|
+
installs with `npm ls @datadog/mobile-react-native`, and ensure test mocks preserve the real module
|
|
105
|
+
exports (use `@datadog/mobile-react-native/jest` or spread `jest.requireActual`). The warning is
|
|
106
|
+
visible even when SDK verbosity is not configured.
|
|
107
|
+
|
|
108
|
+
Keep the original application-owned context and enrich it before passing it to OpenFeature.
|
|
109
|
+
Use the exported `EnrichableEvaluationContext` type to explicitly type contexts that contain
|
|
110
|
+
`undefined` values; the helper returns an OpenFeature `EvaluationContext`. The following examples
|
|
111
|
+
assume the core Datadog SDK has already been initialized, as shown above. Await `setUserInfo()` before
|
|
112
|
+
enriching: the new RUM user is available only after that promise resolves.
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
import { DdFlags, DdSdkReactNative } from '@datadog/mobile-react-native';
|
|
116
|
+
import {
|
|
117
|
+
DatadogOpenFeatureProvider,
|
|
118
|
+
enrichWithRumUser
|
|
119
|
+
} from '@datadog/mobile-react-native-openfeature';
|
|
120
|
+
import type { EnrichableEvaluationContext } from '@datadog/mobile-react-native-openfeature';
|
|
121
|
+
import { OpenFeature } from '@openfeature/react-sdk';
|
|
122
|
+
|
|
123
|
+
// Keep the application-owned context; do not replace it with the enriched result.
|
|
124
|
+
const applicationContext: EnrichableEvaluationContext = {
|
|
125
|
+
region: 'us-east-1',
|
|
126
|
+
email: undefined // Omit the RUM email from the evaluation context.
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const setUpFlags = async (): Promise<void> => {
|
|
130
|
+
await DdFlags.enable();
|
|
131
|
+
await DdSdkReactNative.setUserInfo({
|
|
132
|
+
id: 'user-123',
|
|
133
|
+
email: 'user@example.com',
|
|
134
|
+
extraInfo: { company_name: 'Example, Inc.' }
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
await OpenFeature.setContext(enrichWithRumUser(applicationContext));
|
|
138
|
+
await OpenFeature.setProviderAndWait(new DatadogOpenFeatureProvider());
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
void setUpFlags();
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
`enrichWithRumUser()` reads the RUM user when it is called; it does not establish a live connection
|
|
145
|
+
between RUM and OpenFeature. After a login or account switch, update the RUM user and enrich the
|
|
146
|
+
original application-owned context again. On logout, await `clearUserInfo()` before enriching;
|
|
147
|
+
`setUserInfo({ id: '' })` is a no-op and does **not** clear the previous user.
|
|
148
|
+
|
|
149
|
+
```tsx
|
|
150
|
+
import { DdSdkReactNative } from '@datadog/mobile-react-native';
|
|
151
|
+
import { enrichWithRumUser } from '@datadog/mobile-react-native-openfeature';
|
|
152
|
+
import type { EnrichableEvaluationContext } from '@datadog/mobile-react-native-openfeature';
|
|
153
|
+
import { OpenFeature } from '@openfeature/react-sdk';
|
|
154
|
+
|
|
155
|
+
// The same application-owned context as in the setup example.
|
|
156
|
+
const applicationContext: EnrichableEvaluationContext = {
|
|
157
|
+
region: 'us-east-1',
|
|
158
|
+
email: undefined
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export const onLogin = async (): Promise<void> => {
|
|
162
|
+
await DdSdkReactNative.setUserInfo({
|
|
163
|
+
id: 'user-456',
|
|
164
|
+
email: 'next@example.com'
|
|
165
|
+
});
|
|
166
|
+
await OpenFeature.setContext(enrichWithRumUser(applicationContext));
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export const onLogout = async (): Promise<void> => {
|
|
170
|
+
await DdSdkReactNative.clearUserInfo();
|
|
171
|
+
// No RUM targeting key remains; the provider uses the anonymous subject ('').
|
|
172
|
+
await OpenFeature.setContext(enrichWithRumUser(applicationContext));
|
|
173
|
+
};
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Wire these handlers into your application's authentication flow after flag setup. This logout
|
|
177
|
+
example assumes the application context has no targeting key of its own; explicitly supplied
|
|
178
|
+
application values remain authoritative even after the RUM user is cleared.
|
|
179
|
+
|
|
180
|
+
Do not pass `OpenFeature.getContext()` back to `enrichWithRumUser()`. That context already contains
|
|
181
|
+
values from the previous RUM user, so those values would be treated as application-owned overrides
|
|
182
|
+
and could prevent the new RUM user from replacing them. Retain the original application context
|
|
183
|
+
separately, as shown above.
|
|
184
|
+
|
|
185
|
+
`rumIntegrationEnabled` only controls whether feature flag evaluation events are sent to RUM. It
|
|
186
|
+
does not enable or disable `enrichWithRumUser()`. For the offline provider, continue to follow the
|
|
187
|
+
precomputed configuration context requirements below.
|
|
188
|
+
|
|
189
|
+
#### Isolating RUM context with an OpenFeature domain
|
|
190
|
+
|
|
191
|
+
> **Warning:** The examples above use the global OpenFeature context. A global `setContext()` also
|
|
192
|
+
> reaches domain-bound providers that have no explicit domain context, including other vendors'
|
|
193
|
+
> providers. Use a dedicated domain if RUM user attributes should only reach the Datadog provider.
|
|
194
|
+
|
|
195
|
+
As an alternative to the global setup above, register an explicit context and provider on the same
|
|
196
|
+
domain. Put this setup in `featureFlags.ts`. This example uses the current RUM user; await any
|
|
197
|
+
`setUserInfo()` call first:
|
|
198
|
+
|
|
199
|
+
```tsx
|
|
200
|
+
import { DdFlags } from '@datadog/mobile-react-native';
|
|
201
|
+
import {
|
|
202
|
+
DatadogOpenFeatureProvider,
|
|
203
|
+
enrichWithRumUser
|
|
204
|
+
} from '@datadog/mobile-react-native-openfeature';
|
|
205
|
+
import { OpenFeature } from '@openfeature/react-sdk';
|
|
206
|
+
|
|
207
|
+
export const DATADOG_DOMAIN = 'datadog';
|
|
208
|
+
// Retain and export the application-owned context, not the enriched result.
|
|
209
|
+
export const applicationContext = { region: 'us-east-1', email: undefined };
|
|
210
|
+
|
|
211
|
+
export const setUpDatadogDomain = async (): Promise<void> => {
|
|
212
|
+
await DdFlags.enable();
|
|
213
|
+
await OpenFeature.setContext(
|
|
214
|
+
DATADOG_DOMAIN,
|
|
215
|
+
enrichWithRumUser(applicationContext)
|
|
216
|
+
);
|
|
217
|
+
await OpenFeature.setProviderAndWait(
|
|
218
|
+
DATADOG_DOMAIN,
|
|
219
|
+
new DatadogOpenFeatureProvider()
|
|
220
|
+
);
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
// In your app bootstrap, await setUpDatadogDomain() after core SDK initialization.
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Consumers must use the same domain: import `DATADOG_DOMAIN` from your setup module and use
|
|
227
|
+
`<OpenFeatureProvider domain={DATADOG_DOMAIN}>`, as in the React example below, or use
|
|
228
|
+
`OpenFeature.getClient(DATADOG_DOMAIN)` for a direct client. A client without a domain does not use
|
|
229
|
+
this domain's provider.
|
|
230
|
+
|
|
231
|
+
Pass `DATADOG_DOMAIN` to **every** subsequent context update as well:
|
|
232
|
+
`OpenFeature.setContext(DATADOG_DOMAIN, enrichWithRumUser(applicationContext))`. This includes both
|
|
233
|
+
login and logout handlers above and the `setContext()` call in the React example below. A global
|
|
234
|
+
update does not replace an explicit domain context, so omitting the domain would leave Datadog on
|
|
235
|
+
the previous user's context. On logout, set the re-enriched application context on the domain rather
|
|
236
|
+
than calling `clearContext(DATADOG_DOMAIN)`, which would resume inheriting the global context.
|
|
237
|
+
|
|
70
238
|
### Using the OpenFeature React SDK
|
|
71
239
|
|
|
72
240
|
For complete details on using the OpenFeature React SDK, including flag evaluation, evaluation context management, and advanced setup options, see the OpenFeature React SDK [documentation][1].
|
|
73
241
|
|
|
74
|
-
|
|
242
|
+
This example uses the dedicated Datadog domain and retained application context from
|
|
243
|
+
`featureFlags.ts` above. Await `setUpDatadogDomain()` after core SDK initialization and before
|
|
244
|
+
rendering the app.
|
|
245
|
+
Use domain-scoped login and logout handlers to re-enrich the context when the RUM user changes.
|
|
246
|
+
If you choose the global setup instead, omit the domain argument from context updates and the
|
|
247
|
+
`domain` prop from `OpenFeatureProvider` consistently.
|
|
75
248
|
|
|
76
249
|
```tsx
|
|
250
|
+
import { useEffect } from 'react';
|
|
251
|
+
import { enrichWithRumUser } from '@datadog/mobile-react-native-openfeature';
|
|
77
252
|
import { OpenFeature, OpenFeatureProvider, useFlag } from '@openfeature/react-sdk';
|
|
253
|
+
import { applicationContext, DATADOG_DOMAIN } from './featureFlags';
|
|
78
254
|
|
|
79
255
|
function AppWithProviders() {
|
|
80
|
-
// For advanced feature flag targeting based on current user or device.
|
|
81
256
|
useEffect(() => {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}, [])
|
|
91
|
-
|
|
92
|
-
// Wrap your app with OpenFeatureProvider to allow flag evaluations throughout the app.
|
|
257
|
+
// Enrich the retained application context, never OpenFeature.getContext().
|
|
258
|
+
void OpenFeature.setContext(
|
|
259
|
+
DATADOG_DOMAIN,
|
|
260
|
+
enrichWithRumUser(applicationContext)
|
|
261
|
+
);
|
|
262
|
+
}, []);
|
|
263
|
+
|
|
264
|
+
// Use the same domain for flag evaluation and context updates.
|
|
93
265
|
return (
|
|
94
|
-
<OpenFeatureProvider>
|
|
266
|
+
<OpenFeatureProvider domain={DATADOG_DOMAIN}>
|
|
95
267
|
<App />
|
|
96
268
|
</OpenFeatureProvider>
|
|
97
269
|
);
|
package/lib/commonjs/index.js
CHANGED
|
@@ -21,7 +21,14 @@ Object.defineProperty(exports, "configurationFromString", {
|
|
|
21
21
|
return _mobileReactNative.configurationFromString;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
+
Object.defineProperty(exports, "enrichWithRumUser", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _rumContext.enrichWithRumUser;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
24
30
|
var _mobileReactNative = require("@datadog/mobile-react-native");
|
|
25
31
|
var _offlineProvider = require("./offlineProvider");
|
|
26
32
|
var _provider = require("./provider");
|
|
33
|
+
var _rumContext = require("./rumContext");
|
|
27
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_mobileReactNative","require","_offlineProvider","_provider"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_mobileReactNative","require","_offlineProvider","_provider","_rumContext"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAAA,kBAAA,GAAAC,OAAA;AAEA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA","ignoreList":[]}
|
package/lib/commonjs/provider.js
CHANGED
|
@@ -30,7 +30,7 @@ class DatadogOpenFeatureProvider extends _coreProvider.DatadogCoreOpenFeaturePro
|
|
|
30
30
|
const newDdContext = (0, _mappers.toDdContext)(newContext);
|
|
31
31
|
|
|
32
32
|
// Promise chain in case `onContextChange` is called multiple times.
|
|
33
|
-
this.contextChangePromise = this.contextChangePromise.then(() => {
|
|
33
|
+
this.contextChangePromise = this.contextChangePromise.catch(() => undefined).then(() => {
|
|
34
34
|
return this.flagsClient.setEvaluationContext(newDdContext);
|
|
35
35
|
});
|
|
36
36
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_coreProvider","require","_mappers","DatadogOpenFeatureProvider","DatadogCoreOpenFeatureProvider","metadata","name","contextChangePromise","Promise","resolve","initialize","context","ddContext","toDdContext","flagsClient","setEvaluationContext","onContextChange","_oldContext","newContext","newDdContext","then","exports"],"sourceRoot":"../../src","sources":["provider.ts"],"mappings":";;;;;;AAWA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAZA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACO,MAAME,0BAA0B,SAASC,4CAA8B,CAAC;EAClEC,QAAQ,GAAqB;IAClCC,IAAI,EAAE;EACV,CAAC;EAEOC,oBAAoB,GAAGC,OAAO,CAACC,OAAO,CAAC,CAAC;EAEhD,MAAMC,UAAUA,CAACC,OAA4B,GAAG,CAAC,CAAC,EAAiB;IAC/D,MAAMC,SAAS,GAAG,IAAAC,oBAAW,EAACF,OAAO,CAAC;IACtC,IAAI,CAACJ,oBAAoB,GAAG,IAAI,CAACO,WAAW,CAACC,oBAAoB,CAC7DH,SACJ,CAAC;IAED,MAAM,IAAI,CAACL,oBAAoB;EACnC;EAEA,MAAMS,eAAeA,CACjBC,WAAgC,EAChCC,UAA+B,EAClB;IACb,MAAMC,YAAY,GAAG,IAAAN,oBAAW,EAACK,UAAU,CAAC;;IAE5C;IACA,IAAI,CAACX,oBAAoB,GAAG,IAAI,CAACA,oBAAoB,
|
|
1
|
+
{"version":3,"names":["_coreProvider","require","_mappers","DatadogOpenFeatureProvider","DatadogCoreOpenFeatureProvider","metadata","name","contextChangePromise","Promise","resolve","initialize","context","ddContext","toDdContext","flagsClient","setEvaluationContext","onContextChange","_oldContext","newContext","newDdContext","catch","undefined","then","exports"],"sourceRoot":"../../src","sources":["provider.ts"],"mappings":";;;;;;AAWA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAZA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACO,MAAME,0BAA0B,SAASC,4CAA8B,CAAC;EAClEC,QAAQ,GAAqB;IAClCC,IAAI,EAAE;EACV,CAAC;EAEOC,oBAAoB,GAAGC,OAAO,CAACC,OAAO,CAAC,CAAC;EAEhD,MAAMC,UAAUA,CAACC,OAA4B,GAAG,CAAC,CAAC,EAAiB;IAC/D,MAAMC,SAAS,GAAG,IAAAC,oBAAW,EAACF,OAAO,CAAC;IACtC,IAAI,CAACJ,oBAAoB,GAAG,IAAI,CAACO,WAAW,CAACC,oBAAoB,CAC7DH,SACJ,CAAC;IAED,MAAM,IAAI,CAACL,oBAAoB;EACnC;EAEA,MAAMS,eAAeA,CACjBC,WAAgC,EAChCC,UAA+B,EAClB;IACb,MAAMC,YAAY,GAAG,IAAAN,oBAAW,EAACK,UAAU,CAAC;;IAE5C;IACA,IAAI,CAACX,oBAAoB,GAAG,IAAI,CAACA,oBAAoB,CAChDa,KAAK,CAAC,MAAMC,SAAS,CAAC,CACtBC,IAAI,CAAC,MAAM;MACR,OAAO,IAAI,CAACR,WAAW,CAACC,oBAAoB,CAACI,YAAY,CAAC;IAC9D,CAAC,CAAC;;IAEN;IACA,MAAM,IAAI,CAACZ,oBAAoB;EACnC;AACJ;AAACgB,OAAA,CAAApB,0BAAA,GAAAA,0BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.enrichWithRumUser = void 0;
|
|
7
|
+
var DatadogSdk = _interopRequireWildcard(require("@datadog/mobile-react-native"));
|
|
8
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
9
|
+
/*
|
|
10
|
+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
|
11
|
+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
* Copyright 2016-Present Datadog, Inc.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* An application context that permits top-level undefined values to remove RUM defaults.
|
|
17
|
+
* Unlike OpenFeature's EvaluationContext, this input can contain these explicit tombstones.
|
|
18
|
+
* If enrichment cannot run, the context is returned unchanged, including undefined values.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Explicitly add the current RUM user to an OpenFeature evaluation context.
|
|
23
|
+
*
|
|
24
|
+
* The helper reads the RUM user each time it is called and returns a new context; it does not keep
|
|
25
|
+
* the OpenFeature context synchronized when the RUM user changes. The RUM user ID supplies the
|
|
26
|
+
* targeting key, while flat primitive user properties supply attributes. Application fields take
|
|
27
|
+
* precedence, and an explicitly undefined application field removes the corresponding RUM value
|
|
28
|
+
* from the returned context when enrichment succeeds.
|
|
29
|
+
*
|
|
30
|
+
* If the core SDK's enrichment helper is unavailable, logs a warning and returns the application
|
|
31
|
+
* context unchanged so OpenFeature initialization and evaluation can continue without RUM values.
|
|
32
|
+
*/
|
|
33
|
+
const enrichWithRumUser = context => {
|
|
34
|
+
const enricher = DatadogSdk.__ddEnrichEvaluationContextWithRumUser;
|
|
35
|
+
if (typeof enricher !== 'function') {
|
|
36
|
+
// InternalLog may also be absent from the core module, or have verbosity disabled.
|
|
37
|
+
// eslint-disable-next-line no-console
|
|
38
|
+
console.warn('DATADOG: `enrichWithRumUser` could not access the core RUM enrichment helper. Returning the application context unchanged. Check SDK compatibility.');
|
|
39
|
+
return context;
|
|
40
|
+
}
|
|
41
|
+
return enricher(context);
|
|
42
|
+
};
|
|
43
|
+
exports.enrichWithRumUser = enrichWithRumUser;
|
|
44
|
+
//# sourceMappingURL=rumContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DatadogSdk","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","enrichWithRumUser","context","enricher","__ddEnrichEvaluationContextWithRumUser","console","warn","exports"],"sourceRoot":"../../src","sources":["rumContext.ts"],"mappings":";;;;;;AAMA,IAAAA,UAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA2D,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAN3D;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMkB,iBAAiB,GAC1BC,OAAoC,IAChB;EACpB,MAAMC,QAAQ,GAAIxB,UAAU,CAEzByB,sCAAsC;EAEzC,IAAI,OAAOD,QAAQ,KAAK,UAAU,EAAE;IAChC;IACA;IACAE,OAAO,CAACC,IAAI,CACR,qJACJ,CAAC;IAED,OAAOJ,OAAO;EAClB;EAEA,OAAOC,QAAQ,CAACD,OAAO,CAAC;AAC5B,CAAC;AAACK,OAAA,CAAAN,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -7,5 +7,6 @@
|
|
|
7
7
|
import { configurationFromString } from '@datadog/mobile-react-native';
|
|
8
8
|
import { DatadogOfflineOpenFeatureProvider } from './offlineProvider';
|
|
9
9
|
import { DatadogOpenFeatureProvider } from './provider';
|
|
10
|
-
|
|
10
|
+
import { enrichWithRumUser } from './rumContext';
|
|
11
|
+
export { DatadogOpenFeatureProvider, DatadogOfflineOpenFeatureProvider, enrichWithRumUser, configurationFromString };
|
|
11
12
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["configurationFromString","DatadogOfflineOpenFeatureProvider","DatadogOpenFeatureProvider"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,uBAAuB,QAAQ,8BAA8B;AAEtE,SAASC,iCAAiC,QAAQ,mBAAmB;AACrE,SAASC,0BAA0B,QAAQ,YAAY;
|
|
1
|
+
{"version":3,"names":["configurationFromString","DatadogOfflineOpenFeatureProvider","DatadogOpenFeatureProvider","enrichWithRumUser"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,uBAAuB,QAAQ,8BAA8B;AAEtE,SAASC,iCAAiC,QAAQ,mBAAmB;AACrE,SAASC,0BAA0B,QAAQ,YAAY;AAEvD,SAASC,iBAAiB,QAAQ,cAAc;AAGhD,SACID,0BAA0B,EAC1BD,iCAAiC,EACjCE,iBAAiB,EACjBH,uBAAuB","ignoreList":[]}
|
package/lib/module/provider.js
CHANGED
|
@@ -24,7 +24,7 @@ export class DatadogOpenFeatureProvider extends DatadogCoreOpenFeatureProvider {
|
|
|
24
24
|
const newDdContext = toDdContext(newContext);
|
|
25
25
|
|
|
26
26
|
// Promise chain in case `onContextChange` is called multiple times.
|
|
27
|
-
this.contextChangePromise = this.contextChangePromise.then(() => {
|
|
27
|
+
this.contextChangePromise = this.contextChangePromise.catch(() => undefined).then(() => {
|
|
28
28
|
return this.flagsClient.setEvaluationContext(newDdContext);
|
|
29
29
|
});
|
|
30
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DatadogCoreOpenFeatureProvider","toDdContext","DatadogOpenFeatureProvider","metadata","name","contextChangePromise","Promise","resolve","initialize","context","ddContext","flagsClient","setEvaluationContext","onContextChange","_oldContext","newContext","newDdContext","then"],"sourceRoot":"../../src","sources":["provider.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAOA,SAASA,8BAA8B,QAAQ,gBAAgB;AAC/D,SAASC,WAAW,QAAQ,WAAW;AAIvC;AACA;AACA;AACA;AACA,OAAO,MAAMC,0BAA0B,SAASF,8BAA8B,CAAC;EAClEG,QAAQ,GAAqB;IAClCC,IAAI,EAAE;EACV,CAAC;EAEOC,oBAAoB,GAAGC,OAAO,CAACC,OAAO,CAAC,CAAC;EAEhD,MAAMC,UAAUA,CAACC,OAA4B,GAAG,CAAC,CAAC,EAAiB;IAC/D,MAAMC,SAAS,GAAGT,WAAW,CAACQ,OAAO,CAAC;IACtC,IAAI,CAACJ,oBAAoB,GAAG,IAAI,CAACM,WAAW,CAACC,oBAAoB,CAC7DF,SACJ,CAAC;IAED,MAAM,IAAI,CAACL,oBAAoB;EACnC;EAEA,MAAMQ,eAAeA,CACjBC,WAAgC,EAChCC,UAA+B,EAClB;IACb,MAAMC,YAAY,GAAGf,WAAW,CAACc,UAAU,CAAC;;IAE5C;IACA,IAAI,CAACV,oBAAoB,GAAG,IAAI,CAACA,oBAAoB,
|
|
1
|
+
{"version":3,"names":["DatadogCoreOpenFeatureProvider","toDdContext","DatadogOpenFeatureProvider","metadata","name","contextChangePromise","Promise","resolve","initialize","context","ddContext","flagsClient","setEvaluationContext","onContextChange","_oldContext","newContext","newDdContext","catch","undefined","then"],"sourceRoot":"../../src","sources":["provider.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAOA,SAASA,8BAA8B,QAAQ,gBAAgB;AAC/D,SAASC,WAAW,QAAQ,WAAW;AAIvC;AACA;AACA;AACA;AACA,OAAO,MAAMC,0BAA0B,SAASF,8BAA8B,CAAC;EAClEG,QAAQ,GAAqB;IAClCC,IAAI,EAAE;EACV,CAAC;EAEOC,oBAAoB,GAAGC,OAAO,CAACC,OAAO,CAAC,CAAC;EAEhD,MAAMC,UAAUA,CAACC,OAA4B,GAAG,CAAC,CAAC,EAAiB;IAC/D,MAAMC,SAAS,GAAGT,WAAW,CAACQ,OAAO,CAAC;IACtC,IAAI,CAACJ,oBAAoB,GAAG,IAAI,CAACM,WAAW,CAACC,oBAAoB,CAC7DF,SACJ,CAAC;IAED,MAAM,IAAI,CAACL,oBAAoB;EACnC;EAEA,MAAMQ,eAAeA,CACjBC,WAAgC,EAChCC,UAA+B,EAClB;IACb,MAAMC,YAAY,GAAGf,WAAW,CAACc,UAAU,CAAC;;IAE5C;IACA,IAAI,CAACV,oBAAoB,GAAG,IAAI,CAACA,oBAAoB,CAChDY,KAAK,CAAC,MAAMC,SAAS,CAAC,CACtBC,IAAI,CAAC,MAAM;MACR,OAAO,IAAI,CAACR,WAAW,CAACC,oBAAoB,CAACI,YAAY,CAAC;IAC9D,CAAC,CAAC;;IAEN;IACA,MAAM,IAAI,CAACX,oBAAoB;EACnC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
import * as DatadogSdk from '@datadog/mobile-react-native';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* An application context that permits top-level undefined values to remove RUM defaults.
|
|
11
|
+
* Unlike OpenFeature's EvaluationContext, this input can contain these explicit tombstones.
|
|
12
|
+
* If enrichment cannot run, the context is returned unchanged, including undefined values.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Explicitly add the current RUM user to an OpenFeature evaluation context.
|
|
17
|
+
*
|
|
18
|
+
* The helper reads the RUM user each time it is called and returns a new context; it does not keep
|
|
19
|
+
* the OpenFeature context synchronized when the RUM user changes. The RUM user ID supplies the
|
|
20
|
+
* targeting key, while flat primitive user properties supply attributes. Application fields take
|
|
21
|
+
* precedence, and an explicitly undefined application field removes the corresponding RUM value
|
|
22
|
+
* from the returned context when enrichment succeeds.
|
|
23
|
+
*
|
|
24
|
+
* If the core SDK's enrichment helper is unavailable, logs a warning and returns the application
|
|
25
|
+
* context unchanged so OpenFeature initialization and evaluation can continue without RUM values.
|
|
26
|
+
*/
|
|
27
|
+
export const enrichWithRumUser = context => {
|
|
28
|
+
const enricher = DatadogSdk.__ddEnrichEvaluationContextWithRumUser;
|
|
29
|
+
if (typeof enricher !== 'function') {
|
|
30
|
+
// InternalLog may also be absent from the core module, or have verbosity disabled.
|
|
31
|
+
// eslint-disable-next-line no-console
|
|
32
|
+
console.warn('DATADOG: `enrichWithRumUser` could not access the core RUM enrichment helper. Returning the application context unchanged. Check SDK compatibility.');
|
|
33
|
+
return context;
|
|
34
|
+
}
|
|
35
|
+
return enricher(context);
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=rumContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DatadogSdk","enrichWithRumUser","context","enricher","__ddEnrichEvaluationContextWithRumUser","console","warn"],"sourceRoot":"../../src","sources":["rumContext.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,UAAU,MAAM,8BAA8B;;AAM1D;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAC1BC,OAAoC,IAChB;EACpB,MAAMC,QAAQ,GAAIH,UAAU,CAEzBI,sCAAsC;EAEzC,IAAI,OAAOD,QAAQ,KAAK,UAAU,EAAE;IAChC;IACA;IACAE,OAAO,CAACC,IAAI,CACR,qJACJ,CAAC;IAED,OAAOJ,OAAO;EAClB;EAEA,OAAOC,QAAQ,CAACD,OAAO,CAAC;AAC5B,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../../../core/src/flags/internal.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAkB,MAAM,SAAS,CAAC;AAEjE,MAAM,WAAW,cAAc;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,eAAO,MAAM,wBAAwB,YACxB,iBAAiB,KAC3B,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../../../core/src/flags/internal.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAkB,MAAM,SAAS,CAAC;AAEjE,MAAM,WAAW,cAAc;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,eAAO,MAAM,wBAAwB,YACxB,iBAAiB,KAC3B,iBAmDF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type FlatEvaluationContext = Record<string, unknown> & {
|
|
2
|
+
targetingKey?: string | undefined;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* Add the current RUM user to an OpenFeature-shaped evaluation context.
|
|
6
|
+
*
|
|
7
|
+
* @internal Used by the explicit helper in the Datadog OpenFeature package. This is a point-in-time
|
|
8
|
+
* read; it does not synchronize OpenFeature when the RUM user changes. RUM values provide defaults;
|
|
9
|
+
* fields explicitly supplied by the application remain authoritative. An explicitly undefined
|
|
10
|
+
* field removes the corresponding RUM default and is omitted from the effective context.
|
|
11
|
+
*/
|
|
12
|
+
export declare const __ddEnrichEvaluationContextWithRumUser: (context: FlatEvaluationContext) => FlatEvaluationContext;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=rumIntegration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rumIntegration.d.ts","sourceRoot":"","sources":["../../../../../../core/src/flags/rumIntegration.ts"],"names":[],"mappings":"AAWA,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACnD,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sCAAsC,YACtC,qBAAqB,KAC/B,qBAuBF,CAAC"}
|
|
@@ -20,6 +20,7 @@ import { DdFlags } from './flags/DdFlags';
|
|
|
20
20
|
import type { FlagsClient } from './flags/FlagsClient';
|
|
21
21
|
import { configurationFromString, configurationToString } from './flags/configuration';
|
|
22
22
|
import type { ParsedFlagsConfiguration } from './flags/configuration';
|
|
23
|
+
import { __ddEnrichEvaluationContextWithRumUser } from './flags/rumIntegration';
|
|
23
24
|
import type { FlagsConfiguration, FlagDetails, EvaluationContext, PrimitiveValue } from './flags/types';
|
|
24
25
|
import { DdLogs } from './logs/DdLogs';
|
|
25
26
|
import { DdRum } from './rum/DdRum';
|
|
@@ -38,6 +39,6 @@ import { ErrorSource, FeatureOperationFailure } from './types';
|
|
|
38
39
|
import { DefaultTimeProvider } from './utils/time-provider/DefaultTimeProvider';
|
|
39
40
|
import type { Timestamp } from './utils/time-provider/TimeProvider';
|
|
40
41
|
import { TimeProvider } from './utils/time-provider/TimeProvider';
|
|
41
|
-
export { DatadogProvider, DatadogProviderConfiguration, FileBasedConfiguration, InitializationMode, DdLogs, DdFlags, configurationFromString, configurationToString, DdTrace, DdRum, RumActionType, ErrorSource, FeatureOperationFailure, CoreConfiguration, RumConfiguration, LogsConfiguration, TraceConfiguration, DdSdkReactNative, DdSdk, InternalLog, ProxyConfiguration, ProxyType, TrackingConsent, SdkVerbosity, VitalsUpdateFrequency, PropagatorType, UploadFrequency, BatchSize, BatchProcessingLevel, TimeProvider, DefaultTimeProvider, DATADOG_GRAPH_QL_OPERATION_TYPE_HEADER, DATADOG_GRAPH_QL_OPERATION_NAME_HEADER, DATADOG_GRAPH_QL_VARIABLES_HEADER, DATADOG_GRAPH_QL_PAYLOAD_HEADER, DATADOG_GRAPH_QL_ERROR_HEADER, TracingIdType, TracingIdFormat, DatadogTracingIdentifier, DatadogTracingContext, DdBabelInteractionTracking, __ddExtractText };
|
|
42
|
+
export { DatadogProvider, DatadogProviderConfiguration, FileBasedConfiguration, InitializationMode, DdLogs, DdFlags, configurationFromString, configurationToString, DdTrace, DdRum, RumActionType, ErrorSource, FeatureOperationFailure, CoreConfiguration, RumConfiguration, LogsConfiguration, TraceConfiguration, DdSdkReactNative, DdSdk, InternalLog, ProxyConfiguration, ProxyType, TrackingConsent, SdkVerbosity, VitalsUpdateFrequency, PropagatorType, UploadFrequency, BatchSize, BatchProcessingLevel, TimeProvider, DefaultTimeProvider, DATADOG_GRAPH_QL_OPERATION_TYPE_HEADER, DATADOG_GRAPH_QL_OPERATION_NAME_HEADER, DATADOG_GRAPH_QL_VARIABLES_HEADER, DATADOG_GRAPH_QL_PAYLOAD_HEADER, DATADOG_GRAPH_QL_ERROR_HEADER, TracingIdType, TracingIdFormat, DatadogTracingIdentifier, DatadogTracingContext, DdBabelInteractionTracking, __ddExtractText, __ddEnrichEvaluationContextWithRumUser };
|
|
42
43
|
export type { Timestamp, FirstPartyHost, AutoInstrumentationConfiguration, PartialInitializationConfiguration, CoreConfigurationOptions, RumConfigurationOptions, LogsConfigurationOptions, TraceConfigurationOptions, FlagsConfiguration, FlagsClient, ParsedFlagsConfiguration, EvaluationContext, PrimitiveValue, FlagDetails };
|
|
43
44
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../core/src/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,iDAAiD,CAAC;AACxG,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,mDAAmD,CAAC;AAC5G,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EACH,kBAAkB,EAClB,SAAS,EACZ,MAA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Aa,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAElE,OAAO,EACH,eAAe,EACf,4BAA4B,EAC5B,sBAAsB,EACtB,kBAAkB,EAClB,MAAM,EACN,OAAO,EACP,uBAAuB,EACvB,qBAAqB,EACrB,OAAO,EACP,KAAK,EACL,aAAa,EACb,WAAW,EACX,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,EACL,WAAW,EACX,kBAAkB,EAClB,SAAS,EACT,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,SAAS,EACT,oBAAoB,EACpB,YAAY,EACZ,mBAAmB,EACnB,sCAAsC,EACtC,sCAAsC,EACtC,iCAAiC,EACjC,+BAA+B,EAC/B,6BAA6B,EAC7B,aAAa,EACb,eAAe,EACf,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../core/src/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,iDAAiD,CAAC;AACxG,OAAO,KAAK,EAAE,kCAAkC,EAAE,MA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EACpB,YAAY,EACZ,mBAAmB,EACnB,sCAAsC,EACtC,sCAAsC,EACtC,iCAAiC,EACjC,+BAA+B,EAC/B,6BAA6B,EAC7B,aAAa,EACb,eAAe,EACf,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,eAAe,EACf,sCAAsC,EACzC,CAAC;AACF,YAAY,EACR,SAAS,EACT,cAAc,EACd,gCAAgC,EAChC,kCAAkC,EAClC,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,EAClB,WAAW,EACX,wBAAwB,EACxB,iBAAiB,EACjB,cAAc,EACd,WAAW,EACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultEncoders.d.ts","sourceRoot":"","sources":["../../../../../../../core/src/sdk/AttributesEncoding/defaultEncoders.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,SAAS,CAAC;AAG3D,6EAA6E;AAC7E,eAAO,MAAM,aAAa,EAAE,gBAAgB,CAAC,MAAM,CAGlD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,gBAAgB,CAAC,MAAM,CAGlD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,OAAO,CAGpD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,IAAI,GAAG,SAAS,CAG7D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,gBAAgB,CAAC,OAAO,EAAE,CAMpD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,gBAAgB,CAAC,IAAI,CAG9C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,gBAAgB,CAAC,GAAG,CAyC9C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,gBAAgB,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"defaultEncoders.d.ts","sourceRoot":"","sources":["../../../../../../../core/src/sdk/AttributesEncoding/defaultEncoders.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,SAAS,CAAC;AAG3D,6EAA6E;AAC7E,eAAO,MAAM,aAAa,EAAE,gBAAgB,CAAC,MAAM,CAGlD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,gBAAgB,CAAC,MAAM,CAGlD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,OAAO,CAGpD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,IAAI,GAAG,SAAS,CAG7D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,gBAAgB,CAAC,OAAO,EAAE,CAMpD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,gBAAgB,CAAC,IAAI,CAG9C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,gBAAgB,CAAC,GAAG,CAyC9C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,gBAAgB,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CA2D9D,CAAC;AAEF,eAAO,MAAM,eAAe,2NAS3B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare function warn(text: string): void;
|
|
2
|
+
export declare function safeToString(value: unknown): string;
|
|
2
3
|
export declare function isPlainObject(v: unknown): v is Record<string, unknown>;
|
|
3
4
|
/**
|
|
4
5
|
* Utility: format a path array into dot/bracket notation (for logs).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../core/src/sdk/AttributesEncoding/utils.ts"],"names":[],"mappings":"AASA,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,QAEhC;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEtE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,MAAM,CAUlE"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../core/src/sdk/AttributesEncoding/utils.ts"],"names":[],"mappings":"AASA,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,QAEhC;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAMnD;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEtE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,MAAM,CAUlE"}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import type { DdSdkNativeConfiguration } from '../config/features/CoreConfigurationNative';
|
|
2
2
|
import type { DdNativeSdkType } from '../nativeModulesTypes';
|
|
3
3
|
import type { AttributeEncoder } from './AttributesEncoding/types';
|
|
4
|
-
|
|
5
|
-
export type DdSdkType = {
|
|
4
|
+
export type DdSdkType = DdNativeSdkType & {
|
|
6
5
|
readonly attributeEncoders: AttributeEncoder<any>[];
|
|
7
|
-
/**
|
|
8
|
-
* Initializes Datadog's features.
|
|
9
|
-
* @param configuration: The configuration to use.
|
|
10
|
-
*/
|
|
11
|
-
initialize(configuration: DdSdkNativeConfiguration): Promise<void>;
|
|
12
6
|
};
|
|
13
7
|
export declare class DdSdkWrapper implements DdNativeSdkType {
|
|
14
8
|
get attributeEncoders(): AttributeEncoder<any>[];
|
|
@@ -35,5 +29,4 @@ export declare class DdSdkWrapper implements DdNativeSdkType {
|
|
|
35
29
|
removeListeners(count: number): void;
|
|
36
30
|
_setAttributeEncodersForTesting(attributeEncoders: AttributeEncoder<any>[]): void;
|
|
37
31
|
}
|
|
38
|
-
export { NativeDdSdk };
|
|
39
32
|
//# sourceMappingURL=DdSdkInternal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DdSdkInternal.d.ts","sourceRoot":"","sources":["../../../../../../core/src/sdk/DdSdkInternal.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"DdSdkInternal.d.ts","sourceRoot":"","sources":["../../../../../../core/src/sdk/DdSdkInternal.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAMnE,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG;IACtC,QAAQ,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC;CACvD,CAAC;AAEF,qBAAa,YAAa,YAAW,eAAe;IAChD,IAAI,iBAAiB,IAAI,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAE/C;IACD,OAAO,CAAC,kBAAkB,CAA+B;IAEzD,UAAU,CAAC,aAAa,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAKlE,YAAY;IAIZ,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAI1C,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAI9B,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAA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/src/utils/time-provider/TimeProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TimeProvider.d.ts","sourceRoot":"","sources":["../../../../../../../core/src/utils/time-provider/TimeProvider.tsx"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IAEpB,IAAI,EAAE,MAAM,CAAC;IAGb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,8BAAsB,YAAY;IAC9B,gFAAgF;IAChF,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC;;IAW7B,QAAQ,CAAC,YAAY,IAAI,SAAS;IAElC,GAAG,IAAI,MAAM;CAoBhB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "3.
|
|
1
|
+
export declare const version = "3.9.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -2,6 +2,8 @@ import { configurationFromString } from '@datadog/mobile-react-native';
|
|
|
2
2
|
import { DatadogOfflineOpenFeatureProvider } from './offlineProvider';
|
|
3
3
|
import { DatadogOpenFeatureProvider } from './provider';
|
|
4
4
|
import type { DatadogOpenFeatureProviderOptions } from './provider';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { enrichWithRumUser } from './rumContext';
|
|
6
|
+
import type { EnrichableEvaluationContext } from './rumContext';
|
|
7
|
+
export { DatadogOpenFeatureProvider, DatadogOfflineOpenFeatureProvider, enrichWithRumUser, configurationFromString };
|
|
8
|
+
export type { DatadogOpenFeatureProviderOptions, EnrichableEvaluationContext };
|
|
7
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,iCAAiC,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,iCAAiC,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAEhE,OAAO,EACH,0BAA0B,EAC1B,iCAAiC,EACjC,iBAAiB,EACjB,uBAAuB,EAC1B,CAAC;AACF,YAAY,EAAE,iCAAiC,EAAE,2BAA2B,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/provider.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACR,iBAAiB,IAAI,mBAAmB,EACxC,gBAAgB,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAGhE,YAAY,EAAE,iCAAiC,EAAE,MAAM,gBAAgB,CAAC;AAExE;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,8BAA8B;IAC1E,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAEjC;IAEF,OAAO,CAAC,oBAAoB,CAAqB;IAE3C,UAAU,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAS5D,eAAe,CACjB,WAAW,EAAE,mBAAmB,EAChC,UAAU,EAAE,mBAAmB,GAChC,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/provider.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACR,iBAAiB,IAAI,mBAAmB,EACxC,gBAAgB,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAGhE,YAAY,EAAE,iCAAiC,EAAE,MAAM,gBAAgB,CAAC;AAExE;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,8BAA8B;IAC1E,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAEjC;IAEF,OAAO,CAAC,oBAAoB,CAAqB;IAE3C,UAAU,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAS5D,eAAe,CACjB,WAAW,EAAE,mBAAmB,EAChC,UAAU,EAAE,mBAAmB,GAChC,OAAO,CAAC,IAAI,CAAC;CAanB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { EvaluationContext, EvaluationContextValue } from '@openfeature/web-sdk';
|
|
2
|
+
/**
|
|
3
|
+
* An application context that permits top-level undefined values to remove RUM defaults.
|
|
4
|
+
* Unlike OpenFeature's EvaluationContext, this input can contain these explicit tombstones.
|
|
5
|
+
* If enrichment cannot run, the context is returned unchanged, including undefined values.
|
|
6
|
+
*/
|
|
7
|
+
export type EnrichableEvaluationContext = {
|
|
8
|
+
targetingKey?: string | undefined;
|
|
9
|
+
} & Record<string, EvaluationContextValue | undefined>;
|
|
10
|
+
/**
|
|
11
|
+
* Explicitly add the current RUM user to an OpenFeature evaluation context.
|
|
12
|
+
*
|
|
13
|
+
* The helper reads the RUM user each time it is called and returns a new context; it does not keep
|
|
14
|
+
* the OpenFeature context synchronized when the RUM user changes. The RUM user ID supplies the
|
|
15
|
+
* targeting key, while flat primitive user properties supply attributes. Application fields take
|
|
16
|
+
* precedence, and an explicitly undefined application field removes the corresponding RUM value
|
|
17
|
+
* from the returned context when enrichment succeeds.
|
|
18
|
+
*
|
|
19
|
+
* If the core SDK's enrichment helper is unavailable, logs a warning and returns the application
|
|
20
|
+
* context unchanged so OpenFeature initialization and evaluation can continue without RUM values.
|
|
21
|
+
*/
|
|
22
|
+
export declare const enrichWithRumUser: (context: EnrichableEvaluationContext) => EvaluationContext;
|
|
23
|
+
//# sourceMappingURL=rumContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rumContext.d.ts","sourceRoot":"","sources":["../../../../src/rumContext.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACR,iBAAiB,EACjB,sBAAsB,EACzB,MAAM,sBAAsB,CAAC;AAE9B;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACtC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC,GAAG,MAAM,CAAC,MAAM,EAAE,sBAAsB,GAAG,SAAS,CAAC,CAAC;AAIvD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,YACjB,2BAA2B,KACrC,iBAgBF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datadog/mobile-react-native-openfeature",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "A client-side React Native module to provide OpenFeature integration with Datadog Feature Flags",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"datadog",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"prepare": "rm -rf lib && yarn bob build"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@datadog/mobile-react-native": "^3.
|
|
41
|
+
"@datadog/mobile-react-native": "^3.9.0",
|
|
42
42
|
"@openfeature/core": "^1.9.2",
|
|
43
43
|
"@openfeature/web-sdk": "^1.8.0",
|
|
44
44
|
"@testing-library/react-native": "7.0.2",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
]
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "6e8a314dbe755c284d9e882ebf9b03fd008a6967"
|
|
87
87
|
}
|