@configdirector/nuxt-sdk 1.9.2 → 1.11.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.
Files changed (40) hide show
  1. package/dist/module.d.mts +76 -15
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +13 -4
  4. package/dist/runtime/app/composables/useConfigDirectorClient.d.mts +1 -1
  5. package/dist/runtime/app/composables/useConfigDirectorClient.d.ts +1 -1
  6. package/dist/runtime/app/composables/useConfigDirectorClientHooks.d.mts +1 -1
  7. package/dist/runtime/app/composables/useConfigDirectorClientHooks.d.ts +1 -1
  8. package/dist/runtime/app/composables/useConfigDirectorContext.d.mts +1 -1
  9. package/dist/runtime/app/composables/useConfigDirectorContext.d.ts +1 -1
  10. package/dist/runtime/app/composables/useConfigDirectorContext.mjs +2 -1
  11. package/dist/runtime/app/composables/useConfigDirectorStatus.d.mts +1 -1
  12. package/dist/runtime/app/composables/useConfigDirectorStatus.d.ts +1 -1
  13. package/dist/runtime/app/composables/useConfigDirectorValue.d.mts +2 -2
  14. package/dist/runtime/app/composables/useConfigDirectorValue.d.ts +2 -2
  15. package/dist/runtime/context-kind-D6YBNij2.mjs +45 -0
  16. package/dist/runtime/native-values-BV2k_xR2.d.mts +83 -0
  17. package/dist/runtime/native-values-DZJjFBvk.mjs +116 -0
  18. package/dist/runtime/nitro/middleware.mjs +5 -1
  19. package/dist/runtime/nitro/offline-values.d.mts +7 -0
  20. package/dist/runtime/nitro/offline-values.d.ts +7 -0
  21. package/dist/runtime/nitro/offline-values.mjs +15 -0
  22. package/dist/runtime/nitro/plugin.d.mts +3 -1
  23. package/dist/runtime/nitro/plugin.d.ts +3 -1
  24. package/dist/runtime/nitro/plugin.mjs +329 -92
  25. package/dist/runtime/plugin.client.mjs +553 -118
  26. package/dist/runtime/plugin.server.mjs +50 -6
  27. package/dist/runtime/server/composables/useConfigDirectorServerClient.d.mts +6 -0
  28. package/dist/runtime/server/composables/useConfigDirectorServerClient.d.ts +6 -0
  29. package/dist/runtime/server/composables/{useConfigDirectorClient.mjs → useConfigDirectorServerClient.mjs} +3 -3
  30. package/dist/runtime/server/composables/useConfigDirectorServerHooks.d.mts +1 -1
  31. package/dist/runtime/server/composables/useConfigDirectorServerHooks.d.ts +1 -1
  32. package/dist/runtime/{types-Bgx2-3dY.d.mts → types-CS7AMNWe.d.mts} +1 -1
  33. package/dist/runtime/{types-CvmjergQ.d.mts → types-Dt3bENKf.d.mts} +13 -5
  34. package/dist/testing.d.mts +49 -27
  35. package/dist/testing.mjs +429 -185
  36. package/package.json +1 -1
  37. package/dist/runtime/server/composables/useConfigDirectorClient.d.mts +0 -6
  38. package/dist/runtime/server/composables/useConfigDirectorClient.d.ts +0 -6
  39. package/dist/runtime/types-CHmsCChN.d.mts +0 -60
  40. /package/dist/runtime/{types-CkzBXJwA.d.mts → types-C30VJ25l.d.mts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@configdirector/nuxt-sdk",
3
- "version": "1.9.2",
3
+ "version": "1.11.0",
4
4
  "description": "Nuxt SDK for ConfigDirector. ConfigDirector is a remote configuration and feature flag service.",
5
5
  "license": "MIT",
6
6
  "author": "ConfigDirector",
@@ -1,6 +0,0 @@
1
- import { n as ConfigDirectorClient } from "../../types-Bgx2-3dY.mjs";
2
-
3
- //#region src/runtime/server/composables/useConfigDirectorClient.d.ts
4
- declare const useConfigDirectorClient: () => ConfigDirectorClient;
5
- //#endregion
6
- export { useConfigDirectorClient };
@@ -1,6 +0,0 @@
1
- import { n as ConfigDirectorClient } from "../../types-Bgx2-3dY.mjs";
2
-
3
- //#region src/runtime/server/composables/useConfigDirectorClient.d.ts
4
- declare const useConfigDirectorClient: () => ConfigDirectorClient;
5
- //#endregion
6
- export { useConfigDirectorClient };
@@ -1,60 +0,0 @@
1
- //#region ../shared/src/types.d.ts
2
- declare const ConfigTypeList: readonly ["custom", "boolean", "string", "integer", "float", "enum", "url", "json"];
3
- type ConfigType = (typeof ConfigTypeList)[number];
4
- type ConfigEnumLikeType = {
5
- [key: string]: string | number;
6
- };
7
- type ConfigValueType = string | number | boolean | object | ConfigEnumLikeType;
8
- type ConfigState = {
9
- id: string;
10
- key: string;
11
- type: ConfigType;
12
- value: string | undefined | null;
13
- valueId?: string | undefined | null;
14
- };
15
- type EvaluationReason = "found-match" | "config-state-missing" | "client-not-ready" | "type-mismatch" | "value-missing" | "invalid-number" | "invalid-json" | "invalid-boolean";
16
- type ConfigEvaluation = {
17
- key: string;
18
- value: ConfigValueType;
19
- valueId?: string;
20
- isDefaultValue: boolean;
21
- reason: EvaluationReason;
22
- context?: ConfigDirectorContext;
23
- };
24
- /**
25
- * The user's context to be sent to ConfigDirector. This context will be used for targeting
26
- * rules evaluation.
27
- */
28
- type ConfigDirectorContext = {
29
- /**
30
- * The user's identifier. This should be a value that uniquely identifies an application
31
- * user.
32
- * In the case of anonymous users, you could generate a UUID or alternatively not provide
33
- * the {@link id} and the SDK will generate a random UUID. However, keep in mind that this
34
- * value is used for segmenting users in percentage rollouts, and changes to the {@link id}
35
- * could result in the user being assigned to a different percentile.
36
- */
37
- id?: string;
38
- /**
39
- * The user's display name. This will be shown in the ConfigDirector dashboard and may be
40
- * used for targeting rules.
41
- */
42
- name?: string;
43
- /**
44
- * Any arbitrary traits for the current user. They will be shown in the ConfigDirector
45
- * dashboard and may be used for targeting rules.
46
- */
47
- traits?: {
48
- [key: string]: unknown;
49
- };
50
- /**
51
- * Whether or not to treat the context as anonymous during evaluation. When `true`, the
52
- * context values will be used for targeting rules evaluation but the context will not be
53
- * persisted and will not appear in the dashboard.
54
- *
55
- * @default false
56
- */
57
- anonymous?: boolean;
58
- };
59
- //#endregion
60
- export { ConfigValueType as i, ConfigEvaluation as n, ConfigState as r, ConfigDirectorContext as t };