@configdirector/react-native-sdk 1.6.0 → 1.6.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as ConfigDirectorConnectionError, d as _defineProperty, l as ConfigDirectorValidationError, o as createDefaultLogger, r as DefaultConfigDirectorClient, t as INSTALLED_TEST_CLIENT_SLOT, u as Emitter } from "./installedTestClient-
|
|
1
|
+
import { c as ConfigDirectorConnectionError, d as _defineProperty, l as ConfigDirectorValidationError, o as createDefaultLogger, r as DefaultConfigDirectorClient, t as INSTALLED_TEST_CLIENT_SLOT, u as Emitter } from "./installedTestClient-CTPtIG6o.mjs";
|
|
2
2
|
//#region ../shared/src/testing/values.ts
|
|
3
3
|
const encodeTestValue$1 = (key, value) => {
|
|
4
4
|
if (key.trim().length == 0) throw new ConfigDirectorValidationError("Invalid config key. The key of a test value cannot be empty.");
|
|
@@ -391,7 +391,7 @@ const installTestClient = (testClient) => {
|
|
|
391
391
|
const createTestClient = (options) => {
|
|
392
392
|
return createTestClient$1({
|
|
393
393
|
sdkName: "react-native-sdk",
|
|
394
|
-
sdkVersion: "1.6.
|
|
394
|
+
sdkVersion: "1.6.1"
|
|
395
395
|
}, options);
|
|
396
396
|
};
|
|
397
397
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as CLIENT_BASE_URL, d as _defineProperty, i as fetchWithTimeout, n as readInstalledTestClient, o as createDefaultLogger, r as DefaultConfigDirectorClient, s as isFetchErrorFatal } from "./installedTestClient-
|
|
1
|
+
import { a as CLIENT_BASE_URL, d as _defineProperty, i as fetchWithTimeout, n as readInstalledTestClient, o as createDefaultLogger, r as DefaultConfigDirectorClient, s as isFetchErrorFatal } from "./installedTestClient-CTPtIG6o.mjs";
|
|
2
2
|
import React, { Component, useContext as useContext$1 } from "react";
|
|
3
3
|
import { AppState, NativeModules } from "react-native";
|
|
4
4
|
import { sha256 } from "@noble/hashes/sha2.js";
|
|
@@ -646,7 +646,7 @@ const createClient = (clientSdkKey, clientOptions) => {
|
|
|
646
646
|
var _clientOptions$logger, _clientOptions$connec;
|
|
647
647
|
const sdkIdentity = {
|
|
648
648
|
sdkName: "react-native-sdk",
|
|
649
|
-
sdkVersion: "1.6.
|
|
649
|
+
sdkVersion: "1.6.1"
|
|
650
650
|
};
|
|
651
651
|
const logger = (_clientOptions$logger = clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.logger) !== null && _clientOptions$logger !== void 0 ? _clientOptions$logger : createConsoleLogger("warn");
|
|
652
652
|
const metadata = resolveMetadata(clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.metadata, logger);
|
|
@@ -1161,7 +1161,7 @@ var DefaultConfigDirectorClient = class {
|
|
|
1161
1161
|
const startTime = (/* @__PURE__ */ new Date()).getTime();
|
|
1162
1162
|
await this.transport.connect(context !== null && context !== void 0 ? context : {}, this.timeout, caller);
|
|
1163
1163
|
this.currentContext = context;
|
|
1164
|
-
this.telemetryClient.updateContext(context);
|
|
1164
|
+
this.telemetryClient.updateContext(context).catch((error) => this.logger.warn("[ConfigDirectorClient] Telemetry could not update the context: ", error));
|
|
1165
1165
|
this.emit("contextUpdated", { context });
|
|
1166
1166
|
const elapsedTime = (/* @__PURE__ */ new Date()).getTime() - startTime;
|
|
1167
1167
|
const remainingTimeout = this.timeout - elapsedTime;
|
|
@@ -1323,7 +1323,7 @@ var DefaultConfigDirectorClient = class {
|
|
|
1323
1323
|
this.logger.debug("[ConfigDirectorClient] close() has been called, closing connection to server");
|
|
1324
1324
|
clearTimeout(this.timeoutTimer);
|
|
1325
1325
|
(_this$readyResolve2 = this.readyResolve) === null || _this$readyResolve2 === void 0 || _this$readyResolve2.call(this, true);
|
|
1326
|
-
this.telemetryClient.close();
|
|
1326
|
+
this.telemetryClient.close().catch((error) => this.logger.warn("[ConfigDirectorClient] Telemetry could not close: ", error));
|
|
1327
1327
|
this.transport.close();
|
|
1328
1328
|
this.ready = false;
|
|
1329
1329
|
this.initializing = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configdirector/react-native-sdk",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.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",
|