@configdirector/react-native-sdk 1.5.0 → 1.5.1
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.
|
@@ -1360,12 +1360,14 @@ var ClientEventReporter = class {
|
|
|
1360
1360
|
constructor(options) {
|
|
1361
1361
|
_defineProperty(this, "sdkKey", void 0);
|
|
1362
1362
|
_defineProperty(this, "sdkIdentity", void 0);
|
|
1363
|
+
_defineProperty(this, "metaContext", void 0);
|
|
1363
1364
|
_defineProperty(this, "logger", void 0);
|
|
1364
1365
|
_defineProperty(this, "url", void 0);
|
|
1365
1366
|
_defineProperty(this, "executeRequests", true);
|
|
1366
1367
|
this.sdkKey = options.sdkKey;
|
|
1367
1368
|
this.logger = options.logger;
|
|
1368
1369
|
this.sdkIdentity = options.sdkIdentity;
|
|
1370
|
+
this.metaContext = options.metaContext;
|
|
1369
1371
|
this.url = options.urlFactory("client/telemetry/v1", options.baseUrl);
|
|
1370
1372
|
}
|
|
1371
1373
|
async report({ context, discreteEvents, aggregatedEvents, droppedEvents }) {
|
|
@@ -1377,7 +1379,9 @@ var ClientEventReporter = class {
|
|
|
1377
1379
|
clientSdkKey: this.sdkKey,
|
|
1378
1380
|
metaContext: {
|
|
1379
1381
|
sdkName: this.sdkIdentity.sdkName,
|
|
1380
|
-
sdkVersion: this.sdkIdentity.sdkVersion
|
|
1382
|
+
sdkVersion: this.sdkIdentity.sdkVersion,
|
|
1383
|
+
appName: this.metaContext.appName,
|
|
1384
|
+
appVersion: this.metaContext.appVersion
|
|
1381
1385
|
},
|
|
1382
1386
|
context,
|
|
1383
1387
|
discreteEvents,
|
|
@@ -1812,16 +1816,18 @@ const urlFactory = (input, base) => new MinimalUrl(input, base);
|
|
|
1812
1816
|
//#endregion
|
|
1813
1817
|
//#region src/client.ts
|
|
1814
1818
|
const createClient = (clientSdkKey, clientOptions) => {
|
|
1815
|
-
var _clientOptions$logger, _clientOptions$connec;
|
|
1819
|
+
var _clientOptions$logger, _clientOptions$connec, _clientOptions$metada;
|
|
1816
1820
|
const sdkIdentity = {
|
|
1817
1821
|
sdkName: "react-native-sdk",
|
|
1818
|
-
sdkVersion: "1.5.
|
|
1822
|
+
sdkVersion: "1.5.1"
|
|
1819
1823
|
};
|
|
1820
1824
|
const logger = (_clientOptions$logger = clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.logger) !== null && _clientOptions$logger !== void 0 ? _clientOptions$logger : createConsoleLogger("warn");
|
|
1825
|
+
const baseUrl = (clientOptions === null || clientOptions === void 0 || (_clientOptions$connec = clientOptions.connection) === null || _clientOptions$connec === void 0 ? void 0 : _clientOptions$connec.url) ? urlFactory(clientOptions.connection.url) : CLIENT_BASE_URL;
|
|
1821
1826
|
return new DefaultConfigDirectorClient(new ReactNativeTelemetryClient({
|
|
1822
1827
|
sdkKey: clientSdkKey,
|
|
1823
1828
|
sdkIdentity,
|
|
1824
|
-
|
|
1829
|
+
metaContext: (_clientOptions$metada = clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.metadata) !== null && _clientOptions$metada !== void 0 ? _clientOptions$metada : {},
|
|
1830
|
+
baseUrl,
|
|
1825
1831
|
logger,
|
|
1826
1832
|
urlFactory
|
|
1827
1833
|
}), clientSdkKey, sdkIdentity, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configdirector/react-native-sdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "React Native client SDK for ConfigDirector. ConfigDirector is a remote configuration and feature flag service.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ConfigDirector",
|