@configdirector/nuxt-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.
package/dist/module.json
CHANGED
|
@@ -1390,6 +1390,7 @@ var DefaultConfigDirectorClient = class {
|
|
|
1390
1390
|
this.logger = clientOptions?.logger ?? createDefaultLogger$1();
|
|
1391
1391
|
this.timeout = clientOptions?.connection?.timeout ?? 3e3;
|
|
1392
1392
|
this.metaContext = clientOptions?.metadata ?? {};
|
|
1393
|
+
this.validateSdkKeyPresence(serverSdkKey);
|
|
1393
1394
|
this.configEvaluator = new ConfigEvaluator(this.logger);
|
|
1394
1395
|
const baseUrl = this.parseUrl(clientOptions?.connection?.url) ?? defaultBaseUrl;
|
|
1395
1396
|
this.connectionMode = clientOptions?.connection?.mode ?? "streaming";
|
|
@@ -1574,6 +1575,9 @@ var DefaultConfigDirectorClient = class {
|
|
|
1574
1575
|
throw new ConfigDirectorValidationError(`Invalid base URL '${url}'. Parsing failed: ${error}`);
|
|
1575
1576
|
}
|
|
1576
1577
|
}
|
|
1578
|
+
validateSdkKeyPresence(sdkKey) {
|
|
1579
|
+
if (!sdkKey || sdkKey.trim().length == 0) throw new ConfigDirectorValidationError("No server SDK key was provided, the client cannot be instantiated without a valid server SDK key");
|
|
1580
|
+
}
|
|
1577
1581
|
validateDefaultValue(defaultValue) {
|
|
1578
1582
|
if (defaultValue === void 0 || defaultValue === null) throw new ConfigDirectorValidationError("Invalid default value. The default value for a config must be defined and non-null.");
|
|
1579
1583
|
if (typeof defaultValue === "function") throw new ConfigDirectorValidationError("Invalid default value. The default value for a config cannot be a function.");
|
|
@@ -1636,7 +1640,7 @@ var plugin_default = defineNitroPlugin((nitroApp) => {
|
|
|
1636
1640
|
const { serverSdkKey, baseUrl } = runtimeConfig.configdirector;
|
|
1637
1641
|
const client = new DefaultConfigDirectorClient(serverSdkKey, {
|
|
1638
1642
|
sdkName: "nuxt-sdk",
|
|
1639
|
-
sdkVersion: "0.9.
|
|
1643
|
+
sdkVersion: "0.9.1"
|
|
1640
1644
|
}, {
|
|
1641
1645
|
logger,
|
|
1642
1646
|
...baseUrl ? { connection: { url: baseUrl } } : {}
|
|
@@ -840,6 +840,7 @@ var DefaultConfigDirectorClient = class {
|
|
|
840
840
|
this.instanceId = crypto.randomUUID();
|
|
841
841
|
this.logger = clientOptions?.logger ?? createDefaultLogger$1();
|
|
842
842
|
this.timeout = clientOptions?.connection?.timeout ?? 3e3;
|
|
843
|
+
this.validateSdkKeyPresence(clientSdkKey);
|
|
843
844
|
const urlFactory = internalClientOptions?.urlFactory ?? defaultUrlFactory;
|
|
844
845
|
const baseUrl = this.parseUrl(clientOptions?.connection?.url, urlFactory) ?? "https://client-sdk-api.configdirector.com";
|
|
845
846
|
this.connectionMode = clientOptions?.connection?.mode ?? "streaming";
|
|
@@ -1032,6 +1033,9 @@ var DefaultConfigDirectorClient = class {
|
|
|
1032
1033
|
throw new ConfigDirectorValidationError(`Invalid base URL '${url}'. Parsing failed: ${error}`);
|
|
1033
1034
|
}
|
|
1034
1035
|
}
|
|
1036
|
+
validateSdkKeyPresence(sdkKey) {
|
|
1037
|
+
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");
|
|
1038
|
+
}
|
|
1035
1039
|
validateDefaultValue(defaultValue) {
|
|
1036
1040
|
if (defaultValue === void 0 || defaultValue === null) throw new ConfigDirectorValidationError("Invalid default value. The default value for a config must be defined and non-null.");
|
|
1037
1041
|
if (typeof defaultValue === "function") throw new ConfigDirectorValidationError("Invalid default value. The default value for a config cannot be a function.");
|
|
@@ -1295,7 +1299,7 @@ var plugin_client_default = defineNuxtPlugin((nuxtApp) => {
|
|
|
1295
1299
|
const { clientSdkKey, appName, appVersion, baseUrl } = runtimeConfig.public.configdirector;
|
|
1296
1300
|
const client = createBrowserClient(clientSdkKey, {
|
|
1297
1301
|
sdkName: "nuxt-sdk",
|
|
1298
|
-
sdkVersion: "0.9.
|
|
1302
|
+
sdkVersion: "0.9.1"
|
|
1299
1303
|
}, {
|
|
1300
1304
|
metadata: {
|
|
1301
1305
|
appName,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configdirector/nuxt-sdk",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Nuxt SDK for ConfigDirector. ConfigDirector is a remote configuration and feature flag service.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ConfigDirector",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@nuxt/test-utils": "^4.0.2",
|
|
63
63
|
"@types/node": "latest",
|
|
64
64
|
"changelogen": "^0.6.2",
|
|
65
|
-
"eslint": "^10.
|
|
65
|
+
"eslint": "^10.7.0",
|
|
66
66
|
"nuxt": "^4.4.8",
|
|
67
67
|
"playwright": "^1.60.0",
|
|
68
68
|
"rimraf": "^6.1.3",
|