@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.
Files changed (26) hide show
  1. package/dist/module.d.mts +2 -1
  2. package/dist/module.json +1 -1
  3. package/dist/runtime/app/composables/useConfigDirectorClient.d.mts +1 -1
  4. package/dist/runtime/app/composables/useConfigDirectorClient.d.ts +1 -1
  5. package/dist/runtime/app/composables/useConfigDirectorClientHooks.d.mts +1 -1
  6. package/dist/runtime/app/composables/useConfigDirectorClientHooks.d.ts +1 -1
  7. package/dist/runtime/app/composables/useConfigDirectorContext.d.mts +1 -1
  8. package/dist/runtime/app/composables/useConfigDirectorContext.d.ts +1 -1
  9. package/dist/runtime/app/composables/useConfigDirectorValue.d.mts +1 -1
  10. package/dist/runtime/app/composables/useConfigDirectorValue.d.ts +1 -1
  11. package/dist/runtime/{native-values-Cq3SCmEH.d.mts → native-values-BjAsU5SD.d.mts} +2 -1
  12. package/dist/runtime/nitro/offline-values.d.mts +1 -1
  13. package/dist/runtime/nitro/offline-values.d.ts +1 -1
  14. package/dist/runtime/nitro/plugin.d.mts +2 -2
  15. package/dist/runtime/nitro/plugin.d.ts +2 -2
  16. package/dist/runtime/nitro/plugin.mjs +15 -17
  17. package/dist/runtime/plugin.client.mjs +1 -1
  18. package/dist/runtime/server/composables/useConfigDirectorServerClient.d.mts +1 -1
  19. package/dist/runtime/server/composables/useConfigDirectorServerClient.d.ts +1 -1
  20. package/dist/runtime/server/composables/useConfigDirectorServerHooks.d.mts +1 -1
  21. package/dist/runtime/server/composables/useConfigDirectorServerHooks.d.ts +1 -1
  22. package/dist/runtime/{types-BNw2c3C0.d.mts → types-BOsBpju5.d.mts} +1 -1
  23. package/dist/runtime/{types-CYquNKWW.d.mts → types-BeMbqkgk.d.mts} +1 -1
  24. package/dist/testing.d.mts +2 -1
  25. package/dist/testing.mjs +1 -1
  26. 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. `value-missing`
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
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=4.0.0"
6
6
  },
7
- "version": "1.14.1"
7
+ "version": "1.14.2"
8
8
  }
@@ -1,4 +1,4 @@
1
- import { n as ConfigDirectorClient } from "../../types-BNw2c3C0.mjs";
1
+ import { n as ConfigDirectorClient } from "../../types-BOsBpju5.mjs";
2
2
 
3
3
  //#region src/runtime/app/composables/useConfigDirectorClient.d.ts
4
4
  declare const useConfigDirectorClient: () => {
@@ -1,4 +1,4 @@
1
- import { n as ConfigDirectorClient } from "../../types-BNw2c3C0.mjs";
1
+ import { n as ConfigDirectorClient } from "../../types-BOsBpju5.mjs";
2
2
 
3
3
  //#region src/runtime/app/composables/useConfigDirectorClient.d.ts
4
4
  declare const useConfigDirectorClient: () => {
@@ -1,4 +1,4 @@
1
- import { t as ClientHooks } from "../../types-BNw2c3C0.mjs";
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-BNw2c3C0.mjs";
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 { n as ConfigDirectorContext } from "../../native-values-Cq3SCmEH.mjs";
1
+ import { n as ConfigDirectorContext } from "../../native-values-BjAsU5SD.mjs";
2
2
  import { Ref } from "vue";
3
3
 
4
4
  //#region src/runtime/app/composables/useConfigDirectorContext.d.ts
@@ -1,4 +1,4 @@
1
- import { n as ConfigDirectorContext } from "../../native-values-Cq3SCmEH.mjs";
1
+ import { n as ConfigDirectorContext } from "../../native-values-BjAsU5SD.mjs";
2
2
  import { Ref } from "vue";
3
3
 
4
4
  //#region src/runtime/app/composables/useConfigDirectorContext.d.ts
@@ -1,4 +1,4 @@
1
- import { a as ConfigValueType } from "../../native-values-Cq3SCmEH.mjs";
1
+ import { a as ConfigValueType } from "../../native-values-BjAsU5SD.mjs";
2
2
  import { t as ClientStatus } from "../../types-C30VJ25l.mjs";
3
3
  import { DeepReadonly, Ref, ShallowRef } from "vue";
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as ConfigValueType } from "../../native-values-Cq3SCmEH.mjs";
1
+ import { a as ConfigValueType } from "../../native-values-BjAsU5SD.mjs";
2
2
  import { t as ClientStatus } from "../../types-C30VJ25l.mjs";
3
3
  import { DeepReadonly, Ref, ShallowRef } from "vue";
4
4
 
@@ -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. `value-missing`
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,4 +1,4 @@
1
- import { t as NativeValues } from "../native-values-Cq3SCmEH.mjs";
1
+ import { t as NativeValues } from "../native-values-BjAsU5SD.mjs";
2
2
  import * as _$h3 from "h3";
3
3
 
4
4
  //#region src/runtime/nitro/offline-values.d.ts
@@ -1,4 +1,4 @@
1
- import { t as NativeValues } from "../native-values-Cq3SCmEH.mjs";
1
+ import { t as NativeValues } from "../native-values-BjAsU5SD.mjs";
2
2
  import * as _$h3 from "h3";
3
3
 
4
4
  //#region src/runtime/nitro/offline-values.d.ts
@@ -1,5 +1,5 @@
1
- import { o as ConnectionMode } from "../native-values-Cq3SCmEH.mjs";
2
- import { n as ConfigDirectorClient } from "../types-CYquNKWW.mjs";
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-Cq3SCmEH.mjs";
2
- import { n as ConfigDirectorClient } from "../types-CYquNKWW.mjs";
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: the walk ends there and the default targeting rule value
7285
- * is served with the reason `rollout-skipped-no-identifier`. `evaluate` is this walk with only
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 !== "not-matched") break;
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
- switch (lastServing.kind) {
7315
- case "served": return {
7316
- ...lastServing.servedValue,
7317
- reason: "found-match",
7318
- servedBy: {
7319
- kind: "rule",
7320
- ruleId: lastServing.ruleId
7321
- },
7322
- rules: ruleExplanations
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.1"
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.1"
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-CYquNKWW.mjs";
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-CYquNKWW.mjs";
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-CYquNKWW.mjs";
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-CYquNKWW.mjs";
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-Cq3SCmEH.mjs";
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-Cq3SCmEH.mjs";
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 = {
@@ -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. `value-missing`
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
@@ -2312,7 +2312,7 @@ const installTestClient = (testClient) => {
2312
2312
  const createTestClient = (options) => {
2313
2313
  return createTestClient$1({
2314
2314
  sdkName: "nuxt-sdk",
2315
- sdkVersion: "1.14.1"
2315
+ sdkVersion: "1.14.2"
2316
2316
  }, options);
2317
2317
  };
2318
2318
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@configdirector/nuxt-sdk",
3
- "version": "1.14.1",
3
+ "version": "1.14.2",
4
4
  "description": "Nuxt SDK for ConfigDirector. ConfigDirector is a remote configuration and feature flag service.",
5
5
  "license": "MIT",
6
6
  "author": "ConfigDirector",