@configdirector/nuxt-sdk 0.10.0 → 1.0.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/dist/module.json
CHANGED
|
@@ -610,18 +610,9 @@ const compareText = (value, operator, targetValues) => {
|
|
|
610
610
|
case "does not start with any of": return !targetValues.some((target) => value.startsWith(target));
|
|
611
611
|
case "ends with any of": return targetValues.some((target) => value.endsWith(target));
|
|
612
612
|
case "does not end with any of": return !targetValues.some((target) => value.endsWith(target));
|
|
613
|
-
case "matches regex": return first !== void 0 && matchesRegex(first, value);
|
|
614
|
-
case "does not match regex": return first !== void 0 && !matchesRegex(first, value);
|
|
615
613
|
default: return false;
|
|
616
614
|
}
|
|
617
615
|
};
|
|
618
|
-
const matchesRegex = (regexString, value) => {
|
|
619
|
-
try {
|
|
620
|
-
return new RegExp(regexString).test(value);
|
|
621
|
-
} catch {
|
|
622
|
-
return false;
|
|
623
|
-
}
|
|
624
|
-
};
|
|
625
616
|
//#endregion
|
|
626
617
|
//#region ../config-evaluator/src/numeric-comparison.ts
|
|
627
618
|
/**
|
|
@@ -7052,7 +7043,7 @@ var ConfigEvaluator = class {
|
|
|
7052
7043
|
let sum = 0;
|
|
7053
7044
|
let bucket = void 0;
|
|
7054
7045
|
for (const percentage of percentages) {
|
|
7055
|
-
if (assignedPercentage
|
|
7046
|
+
if (assignedPercentage < percentage.percentage + sum) {
|
|
7056
7047
|
bucket = percentage;
|
|
7057
7048
|
break;
|
|
7058
7049
|
}
|
|
@@ -7896,7 +7887,7 @@ var plugin_default = defineNitroPlugin((nitroApp) => {
|
|
|
7896
7887
|
const { serverSdkKey, baseUrl } = runtimeConfig.configdirector;
|
|
7897
7888
|
const client = new DefaultConfigDirectorClient(serverSdkKey, {
|
|
7898
7889
|
sdkName: "nuxt-sdk",
|
|
7899
|
-
sdkVersion: "0.
|
|
7890
|
+
sdkVersion: "1.0.0"
|
|
7900
7891
|
}, {
|
|
7901
7892
|
logger,
|
|
7902
7893
|
...baseUrl ? { connection: { url: baseUrl } } : {}
|
|
@@ -1317,7 +1317,7 @@ var plugin_client_default = defineNuxtPlugin((nuxtApp) => {
|
|
|
1317
1317
|
const { clientSdkKey, appName, appVersion, baseUrl } = runtimeConfig.public.configdirector;
|
|
1318
1318
|
const client = createBrowserClient(clientSdkKey, {
|
|
1319
1319
|
sdkName: "nuxt-sdk",
|
|
1320
|
-
sdkVersion: "0.
|
|
1320
|
+
sdkVersion: "1.0.0"
|
|
1321
1321
|
}, {
|
|
1322
1322
|
metadata: {
|
|
1323
1323
|
appName,
|
package/package.json
CHANGED