@configdirector/react-native-sdk 0.9.0 → 0.9.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.
|
@@ -892,6 +892,7 @@ var DefaultConfigDirectorClient = class {
|
|
|
892
892
|
this.instanceId = crypto.randomUUID();
|
|
893
893
|
this.logger = (_clientOptions$logger = clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.logger) !== null && _clientOptions$logger !== void 0 ? _clientOptions$logger : createDefaultLogger();
|
|
894
894
|
this.timeout = (_clientOptions$connec = clientOptions === null || clientOptions === void 0 || (_clientOptions$connec2 = clientOptions.connection) === null || _clientOptions$connec2 === void 0 ? void 0 : _clientOptions$connec2.timeout) !== null && _clientOptions$connec !== void 0 ? _clientOptions$connec : 3e3;
|
|
895
|
+
this.validateSdkKeyPresence(clientSdkKey);
|
|
895
896
|
const urlFactory = (_internalClientOption = internalClientOptions === null || internalClientOptions === void 0 ? void 0 : internalClientOptions.urlFactory) !== null && _internalClientOption !== void 0 ? _internalClientOption : defaultUrlFactory;
|
|
896
897
|
const baseUrl = (_this$parseUrl = this.parseUrl(clientOptions === null || clientOptions === void 0 || (_clientOptions$connec3 = clientOptions.connection) === null || _clientOptions$connec3 === void 0 ? void 0 : _clientOptions$connec3.url, urlFactory)) !== null && _this$parseUrl !== void 0 ? _this$parseUrl : CLIENT_BASE_URL;
|
|
897
898
|
this.connectionMode = (_clientOptions$connec4 = clientOptions === null || clientOptions === void 0 || (_clientOptions$connec5 = clientOptions.connection) === null || _clientOptions$connec5 === void 0 ? void 0 : _clientOptions$connec5.mode) !== null && _clientOptions$connec4 !== void 0 ? _clientOptions$connec4 : "streaming";
|
|
@@ -1089,6 +1090,9 @@ var DefaultConfigDirectorClient = class {
|
|
|
1089
1090
|
throw new ConfigDirectorValidationError(`Invalid base URL '${url}'. Parsing failed: ${error}`);
|
|
1090
1091
|
}
|
|
1091
1092
|
}
|
|
1093
|
+
validateSdkKeyPresence(sdkKey) {
|
|
1094
|
+
if (!sdkKey || sdkKey.trim().length == 0) throw new ConfigDirectorValidationError("No client SDK key was provided, the client cannot be instantiated without a valid client SDK key");
|
|
1095
|
+
}
|
|
1092
1096
|
validateDefaultValue(defaultValue) {
|
|
1093
1097
|
if (defaultValue === void 0 || defaultValue === null) throw new ConfigDirectorValidationError("Invalid default value. The default value for a config must be defined and non-null.");
|
|
1094
1098
|
if (typeof defaultValue === "function") throw new ConfigDirectorValidationError("Invalid default value. The default value for a config cannot be a function.");
|
|
@@ -1631,7 +1635,7 @@ const createClient = (clientSdkKey, clientOptions) => {
|
|
|
1631
1635
|
const logger = (_clientOptions$logger = clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.logger) !== null && _clientOptions$logger !== void 0 ? _clientOptions$logger : createConsoleLogger("warn");
|
|
1632
1636
|
return new DefaultConfigDirectorClient(new ReactNativeTelemetryClient(clientSdkKey, (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, logger, urlFactory), clientSdkKey, {
|
|
1633
1637
|
sdkName: "react-native-sdk",
|
|
1634
|
-
sdkVersion: "0.9.
|
|
1638
|
+
sdkVersion: "0.9.1"
|
|
1635
1639
|
}, {
|
|
1636
1640
|
...clientOptions,
|
|
1637
1641
|
logger
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configdirector/react-native-sdk",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.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",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@types/wtfnode": "^0",
|
|
69
69
|
"babel-jest": "^30.3.0",
|
|
70
70
|
"del-cli": "^7.0.0",
|
|
71
|
-
"eslint": "^10.
|
|
71
|
+
"eslint": "^10.7.0",
|
|
72
72
|
"jest": "^30.3.0",
|
|
73
73
|
"prettier": "^3.8.2",
|
|
74
74
|
"react": "19.1.0",
|