@configdirector/nuxt-sdk 1.14.1 → 1.14.2
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.d.mts +2 -1
- package/dist/module.json +1 -1
- package/dist/runtime/app/composables/useConfigDirectorClient.d.mts +1 -1
- package/dist/runtime/app/composables/useConfigDirectorClient.d.ts +1 -1
- package/dist/runtime/app/composables/useConfigDirectorClientHooks.d.mts +1 -1
- package/dist/runtime/app/composables/useConfigDirectorClientHooks.d.ts +1 -1
- package/dist/runtime/app/composables/useConfigDirectorContext.d.mts +1 -1
- package/dist/runtime/app/composables/useConfigDirectorContext.d.ts +1 -1
- package/dist/runtime/app/composables/useConfigDirectorValue.d.mts +1 -1
- package/dist/runtime/app/composables/useConfigDirectorValue.d.ts +1 -1
- package/dist/runtime/{native-values-Cq3SCmEH.d.mts → native-values-BjAsU5SD.d.mts} +2 -1
- package/dist/runtime/nitro/offline-values.d.mts +1 -1
- package/dist/runtime/nitro/offline-values.d.ts +1 -1
- package/dist/runtime/nitro/plugin.d.mts +2 -2
- package/dist/runtime/nitro/plugin.d.ts +2 -2
- package/dist/runtime/nitro/plugin.mjs +15 -17
- package/dist/runtime/plugin.client.mjs +1 -1
- package/dist/runtime/server/composables/useConfigDirectorServerClient.d.mts +1 -1
- package/dist/runtime/server/composables/useConfigDirectorServerClient.d.ts +1 -1
- package/dist/runtime/server/composables/useConfigDirectorServerHooks.d.mts +1 -1
- package/dist/runtime/server/composables/useConfigDirectorServerHooks.d.ts +1 -1
- package/dist/runtime/{types-BNw2c3C0.d.mts → types-BOsBpju5.d.mts} +1 -1
- package/dist/runtime/{types-CYquNKWW.d.mts → types-BeMbqkgk.d.mts} +1 -1
- package/dist/testing.d.mts +2 -1
- package/dist/testing.mjs +1 -1
- package/package.json +1 -1
package/dist/module.d.mts
CHANGED
|
@@ -10,7 +10,8 @@ type ConfigValueType = string | number | boolean | object | ConfigEnumLikeType;
|
|
|
10
10
|
* Why an evaluation returned the value it did. `found-match` returns a value from ConfigDirector,
|
|
11
11
|
* and `cached` a value kept on the device while a client SDK waits for live values.
|
|
12
12
|
* `rollout-skipped-no-identifier` returns the default targeting rule value: a server SDK skipped a
|
|
13
|
-
* percentage rollout because the context has no `id` to place it in a share
|
|
13
|
+
* percentage rollout because the context has no `id` to place it in a share, and no rule after
|
|
14
|
+
* the rollout applied. `value-missing`
|
|
14
15
|
* returns the in-code default value because the config has no value. Every other reason returns the
|
|
15
16
|
* in-code default value because of an error: the config does not exist (`config-state-missing`), no
|
|
16
17
|
* values have arrived yet (`client-not-ready`), or the value cannot be read as the type of the in-code
|
package/dist/module.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ClientHooks } from "../../types-
|
|
1
|
+
import { t as ClientHooks } from "../../types-BOsBpju5.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/runtime/app/composables/useConfigDirectorClientHooks.d.ts
|
|
4
4
|
declare const useConfigDirectorClientHooks: (hooks: ClientHooks) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ClientHooks } from "../../types-
|
|
1
|
+
import { t as ClientHooks } from "../../types-BOsBpju5.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/runtime/app/composables/useConfigDirectorClientHooks.d.ts
|
|
4
4
|
declare const useConfigDirectorClientHooks: (hooks: ClientHooks) => void;
|
|
@@ -22,7 +22,8 @@ type ConfigState = {
|
|
|
22
22
|
* Why an evaluation returned the value it did. `found-match` returns a value from ConfigDirector,
|
|
23
23
|
* and `cached` a value kept on the device while a client SDK waits for live values.
|
|
24
24
|
* `rollout-skipped-no-identifier` returns the default targeting rule value: a server SDK skipped a
|
|
25
|
-
* percentage rollout because the context has no `id` to place it in a share
|
|
25
|
+
* percentage rollout because the context has no `id` to place it in a share, and no rule after
|
|
26
|
+
* the rollout applied. `value-missing`
|
|
26
27
|
* returns the in-code default value because the config has no value. Every other reason returns the
|
|
27
28
|
* in-code default value because of an error: the config does not exist (`config-state-missing`), no
|
|
28
29
|
* values have arrived yet (`client-not-ready`), or the value cannot be read as the type of the in-code
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as ConnectionMode } from "../native-values-
|
|
2
|
-
import { n as ConfigDirectorClient } from "../types-
|
|
1
|
+
import { o as ConnectionMode } from "../native-values-BjAsU5SD.mjs";
|
|
2
|
+
import { n as ConfigDirectorClient } from "../types-BeMbqkgk.mjs";
|
|
3
3
|
import * as _$nitropack from "nitropack";
|
|
4
4
|
|
|
5
5
|
//#region src/runtime/nitro/plugin.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as ConnectionMode } from "../native-values-
|
|
2
|
-
import { n as ConfigDirectorClient } from "../types-
|
|
1
|
+
import { o as ConnectionMode } from "../native-values-BjAsU5SD.mjs";
|
|
2
|
+
import { n as ConfigDirectorClient } from "../types-BeMbqkgk.mjs";
|
|
3
3
|
import * as _$nitropack from "nitropack";
|
|
4
4
|
|
|
5
5
|
//#region src/runtime/nitro/plugin.d.ts
|
|
@@ -7281,8 +7281,9 @@ var ConfigEvaluator = class {
|
|
|
7281
7281
|
* Evaluate a config for a context and record how the value was reached: every rule in the
|
|
7282
7282
|
* order it was walked with its outcome, the conditions that were checked with what they
|
|
7283
7283
|
* resolved to, and the share a rollout assigned the context to. A rollout reached by a context
|
|
7284
|
-
* without an identifier is skipped
|
|
7285
|
-
*
|
|
7284
|
+
* without an identifier is skipped and the walk goes on to the next rule; when no later rule
|
|
7285
|
+
* applies, the default targeting rule value is served with the reason
|
|
7286
|
+
* `rollout-skipped-no-identifier`. `evaluate` is this walk with only
|
|
7286
7287
|
* the value, its value ID, its variation and the rollout share that served it kept, so the two
|
|
7287
7288
|
* cannot disagree. `segments` is the payload's segments map, which a segment condition looks
|
|
7288
7289
|
* its segment up in; a segment it does not hold never matches.
|
|
@@ -7293,7 +7294,7 @@ var ConfigEvaluator = class {
|
|
|
7293
7294
|
for (const rule of rules) {
|
|
7294
7295
|
const walkedRule = this.explainRule(rule, config, context, segments);
|
|
7295
7296
|
walkedRules.push(walkedRule);
|
|
7296
|
-
if (walkedRule.serving.kind
|
|
7297
|
+
if (walkedRule.serving.kind === "served") break;
|
|
7297
7298
|
}
|
|
7298
7299
|
const ruleExplanations = [...walkedRules.map((walkedRule) => walkedRule.explanation), ...rules.slice(walkedRules.length).map((rule) => ({
|
|
7299
7300
|
ruleId: rule.id,
|
|
@@ -7311,19 +7312,16 @@ var ConfigEvaluator = class {
|
|
|
7311
7312
|
rules: ruleExplanations
|
|
7312
7313
|
});
|
|
7313
7314
|
const lastServing = walkedRules[walkedRules.length - 1]?.serving ?? NOT_MATCHED;
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
|
|
7324
|
-
case "rollout-skipped-no-identifier": return defaultTargetingRuleValue("rollout-skipped-no-identifier");
|
|
7325
|
-
case "not-matched": return defaultTargetingRuleValue("found-match");
|
|
7326
|
-
}
|
|
7315
|
+
if (lastServing.kind === "served") return {
|
|
7316
|
+
...lastServing.servedValue,
|
|
7317
|
+
reason: "found-match",
|
|
7318
|
+
servedBy: {
|
|
7319
|
+
kind: "rule",
|
|
7320
|
+
ruleId: lastServing.ruleId
|
|
7321
|
+
},
|
|
7322
|
+
rules: ruleExplanations
|
|
7323
|
+
};
|
|
7324
|
+
return defaultTargetingRuleValue(walkedRules.some((walkedRule) => walkedRule.serving.kind === "rollout-skipped-no-identifier") ? "rollout-skipped-no-identifier" : "found-match");
|
|
7327
7325
|
}
|
|
7328
7326
|
explainRule(rule, config, context, segments) {
|
|
7329
7327
|
const explanation = {
|
|
@@ -8714,7 +8712,7 @@ var plugin_default = defineNitroPlugin((nitroApp) => {
|
|
|
8714
8712
|
logger.debug("Initializing ConfigDirector Nitro plugin");
|
|
8715
8713
|
const client = new DefaultConfigDirectorClient(serverSdkKey || void 0, {
|
|
8716
8714
|
sdkName: "nuxt-sdk",
|
|
8717
|
-
sdkVersion: "1.14.
|
|
8715
|
+
sdkVersion: "1.14.2"
|
|
8718
8716
|
}, {
|
|
8719
8717
|
logger,
|
|
8720
8718
|
metadata: {
|
|
@@ -2574,7 +2574,7 @@ const buildClient = async (configdirector, logger) => {
|
|
|
2574
2574
|
return {
|
|
2575
2575
|
client: createBrowserClient(configdirector?.clientSdkKey || void 0, {
|
|
2576
2576
|
sdkName: "nuxt-sdk",
|
|
2577
|
-
sdkVersion: "1.14.
|
|
2577
|
+
sdkVersion: "1.14.2"
|
|
2578
2578
|
}, {
|
|
2579
2579
|
metadata: {
|
|
2580
2580
|
appName: configdirector?.appName,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ConfigDirectorClient } from "../../types-
|
|
1
|
+
import { n as ConfigDirectorClient } from "../../types-BeMbqkgk.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/runtime/server/composables/useConfigDirectorServerClient.d.ts
|
|
4
4
|
declare const useConfigDirectorServerClient: () => ConfigDirectorClient;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ConfigDirectorClient } from "../../types-
|
|
1
|
+
import { n as ConfigDirectorClient } from "../../types-BeMbqkgk.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/runtime/server/composables/useConfigDirectorServerClient.d.ts
|
|
4
4
|
declare const useConfigDirectorServerClient: () => ConfigDirectorClient;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ClientHooks } from "../../types-
|
|
1
|
+
import { t as ClientHooks } from "../../types-BeMbqkgk.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/runtime/server/composables/useConfigDirectorServerHooks.d.ts
|
|
4
4
|
declare const useConfigDirectorServerHooks: (hooks: ClientHooks) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ClientHooks } from "../../types-
|
|
1
|
+
import { t as ClientHooks } from "../../types-BeMbqkgk.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/runtime/server/composables/useConfigDirectorServerHooks.d.ts
|
|
4
4
|
declare const useConfigDirectorServerHooks: (hooks: ClientHooks) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ConfigValueType, n as ConfigDirectorContext, r as ConfigEvaluation, s as TrackOptions } from "./native-values-
|
|
1
|
+
import { a as ConfigValueType, n as ConfigDirectorContext, r as ConfigEvaluation, s as TrackOptions } from "./native-values-BjAsU5SD.mjs";
|
|
2
2
|
|
|
3
3
|
//#region ../js-client-core/src/Emitter.d.ts
|
|
4
4
|
type EventType = string | symbol;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ConfigValueType, i as ConfigState, n as ConfigDirectorContext, r as ConfigEvaluation, s as TrackOptions } from "./native-values-
|
|
1
|
+
import { a as ConfigValueType, i as ConfigState, n as ConfigDirectorContext, r as ConfigEvaluation, s as TrackOptions } from "./native-values-BjAsU5SD.mjs";
|
|
2
2
|
|
|
3
3
|
//#region ../js-server-sdk/src/types.d.ts
|
|
4
4
|
type ClientEvents = {
|
package/dist/testing.d.mts
CHANGED
|
@@ -23,7 +23,8 @@ interface ConfigDirectorLogger {
|
|
|
23
23
|
* Why an evaluation returned the value it did. `found-match` returns a value from ConfigDirector,
|
|
24
24
|
* and `cached` a value kept on the device while a client SDK waits for live values.
|
|
25
25
|
* `rollout-skipped-no-identifier` returns the default targeting rule value: a server SDK skipped a
|
|
26
|
-
* percentage rollout because the context has no `id` to place it in a share
|
|
26
|
+
* percentage rollout because the context has no `id` to place it in a share, and no rule after
|
|
27
|
+
* the rollout applied. `value-missing`
|
|
27
28
|
* returns the in-code default value because the config has no value. Every other reason returns the
|
|
28
29
|
* in-code default value because of an error: the config does not exist (`config-state-missing`), no
|
|
29
30
|
* values have arrived yet (`client-not-ready`), or the value cannot be read as the type of the in-code
|
package/dist/testing.mjs
CHANGED
package/package.json
CHANGED