@vercel/flags-core 1.7.1 → 1.8.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.
@@ -1,5 +1,5 @@
1
- import { V as VariantId, R as ResolutionReason, D as DatafileInput, S as StreamOptions, P as PollingOptions, C as ControllerInterface, a as Datafile, B as BundledDefinitions, E as EvaluationParams, b as EvaluationResult, F as FlagsClient } from './types-DxdTzPS2.cjs';
2
- export { c as Packed, d as Value } from './types-DxdTzPS2.cjs';
1
+ import { V as VariantId, R as ResolutionReason, D as DatafileInput, S as StreamOptions, P as PollingOptions, M as MetricEnvironment, C as ControllerInterface, a as Datafile, B as BundledDefinitions, E as EvaluationParams, b as EvaluationResult, F as FlagsClient } from './types-C2-sIv2D.cjs';
2
+ export { c as Packed, d as Value } from './types-C2-sIv2D.cjs';
3
3
 
4
4
  interface TrackEvaluationOptions {
5
5
  flagKey: string;
@@ -62,6 +62,12 @@ type ControllerOptions = {
62
62
  * @default globalThis.fetch
63
63
  */
64
64
  fetch?: typeof globalThis.fetch;
65
+ /**
66
+ * Environment included with evaluation metrics sent to the ingest endpoint.
67
+ * Falls back to the `VERCEL_ENV` environment variable when not set.
68
+ * This does not select the environment used for flag evaluation.
69
+ */
70
+ metricEnvironment?: MetricEnvironment;
65
71
  /**
66
72
  * Custom client name included in evaluation telemetry.
67
73
  */
@@ -1,5 +1,5 @@
1
- import { V as VariantId, R as ResolutionReason, D as DatafileInput, S as StreamOptions, P as PollingOptions, C as ControllerInterface, a as Datafile, B as BundledDefinitions, E as EvaluationParams, b as EvaluationResult, F as FlagsClient } from './types-DxdTzPS2.js';
2
- export { c as Packed, d as Value } from './types-DxdTzPS2.js';
1
+ import { V as VariantId, R as ResolutionReason, D as DatafileInput, S as StreamOptions, P as PollingOptions, M as MetricEnvironment, C as ControllerInterface, a as Datafile, B as BundledDefinitions, E as EvaluationParams, b as EvaluationResult, F as FlagsClient } from './types-C2-sIv2D.js';
2
+ export { c as Packed, d as Value } from './types-C2-sIv2D.js';
3
3
 
4
4
  interface TrackEvaluationOptions {
5
5
  flagKey: string;
@@ -62,6 +62,12 @@ type ControllerOptions = {
62
62
  * @default globalThis.fetch
63
63
  */
64
64
  fetch?: typeof globalThis.fetch;
65
+ /**
66
+ * Environment included with evaluation metrics sent to the ingest endpoint.
67
+ * Falls back to the `VERCEL_ENV` environment variable when not set.
68
+ * This does not select the environment used for flag evaluation.
69
+ */
70
+ metricEnvironment?: MetricEnvironment;
65
71
  /**
66
72
  * Custom client name included in evaluation telemetry.
67
73
  */
@@ -7,7 +7,7 @@ import {
7
7
  evaluate,
8
8
  flagsClient,
9
9
  resetDefaultFlagsClient
10
- } from "./chunk-RH2MIZYW.js";
10
+ } from "./chunk-ZV3PRKK2.js";
11
11
  export {
12
12
  Controller,
13
13
  FallbackEntryNotFoundError,
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;
2
2
 
3
3
 
4
- var _chunkZ7PTTGMKcjs = require('./chunk-Z7PTTGMK.cjs');
4
+ var _chunkC3FUDFOPcjs = require('./chunk-C3FUDFOP.cjs');
5
5
 
6
6
  // src/openfeature.make.ts
7
7
 
@@ -150,7 +150,7 @@ function make(createClient2, defaultFlagsClient) {
150
150
  }
151
151
 
152
152
  // src/openfeature.default.ts
153
- var VercelProvider = make(_chunkZ7PTTGMKcjs.createClient, _chunkZ7PTTGMKcjs.flagsClient);
153
+ var VercelProvider = make(_chunkC3FUDFOPcjs.createClient, _chunkC3FUDFOPcjs.flagsClient);
154
154
 
155
155
 
156
156
  exports.VercelProvider = VercelProvider;
@@ -1,4 +1,4 @@
1
- import { F as FlagsClient } from './types-DxdTzPS2.cjs';
1
+ import { F as FlagsClient } from './types-C2-sIv2D.cjs';
2
2
  import * as _openfeature_server_sdk from '@openfeature/server-sdk';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { F as FlagsClient } from './types-DxdTzPS2.js';
1
+ import { F as FlagsClient } from './types-C2-sIv2D.js';
2
2
  import * as _openfeature_server_sdk from '@openfeature/server-sdk';
3
3
 
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createClient,
3
3
  flagsClient
4
- } from "./chunk-PLRBLION.js";
4
+ } from "./chunk-ZROGU3V7.js";
5
5
 
6
6
  // src/openfeature.make.ts
7
7
  import {
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;
2
2
 
3
3
 
4
- var _chunkY7HU5ZNTcjs = require('./chunk-Y7HU5ZNT.cjs');
4
+ var _chunkID4ZKPA3cjs = require('./chunk-ID4ZKPA3.cjs');
5
5
 
6
6
  // src/openfeature.make.ts
7
7
 
@@ -150,7 +150,7 @@ function make(createClient2, defaultFlagsClient) {
150
150
  }
151
151
 
152
152
  // src/openfeature.next-js.ts
153
- var VercelProvider = make(_chunkY7HU5ZNTcjs.createClient, _chunkY7HU5ZNTcjs.flagsClient);
153
+ var VercelProvider = make(_chunkID4ZKPA3cjs.createClient, _chunkID4ZKPA3cjs.flagsClient);
154
154
 
155
155
 
156
156
  exports.VercelProvider = VercelProvider;
@@ -1,4 +1,4 @@
1
- import { F as FlagsClient } from './types-DxdTzPS2.cjs';
1
+ import { F as FlagsClient } from './types-C2-sIv2D.cjs';
2
2
  import * as _openfeature_server_sdk from '@openfeature/server-sdk';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { F as FlagsClient } from './types-DxdTzPS2.js';
1
+ import { F as FlagsClient } from './types-C2-sIv2D.js';
2
2
  import * as _openfeature_server_sdk from '@openfeature/server-sdk';
3
3
 
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createClient,
3
3
  flagsClient
4
- } from "./chunk-RH2MIZYW.js";
4
+ } from "./chunk-ZV3PRKK2.js";
5
5
 
6
6
  // src/openfeature.make.ts
7
7
  import {
@@ -1,3 +1,4 @@
1
+ type MetricEnvironment = 'development' | 'preview' | 'production';
1
2
  /**
2
3
  * Options for stream connection behavior
3
4
  */
@@ -594,4 +595,4 @@ declare namespace Packed {
594
595
  };
595
596
  }
596
597
 
597
- export { type BundledDefinitions as B, type ControllerInterface as C, type DatafileInput as D, type EvaluationParams as E, type FlagsClient as F, type PollingOptions as P, ResolutionReason as R, type StreamOptions as S, type VariantId as V, type Datafile as a, type EvaluationResult as b, Packed as c, type Value as d };
598
+ export { type BundledDefinitions as B, type ControllerInterface as C, type DatafileInput as D, type EvaluationParams as E, type FlagsClient as F, type MetricEnvironment as M, type PollingOptions as P, ResolutionReason as R, type StreamOptions as S, type VariantId as V, type Datafile as a, type EvaluationResult as b, Packed as c, type Value as d };
@@ -1,3 +1,4 @@
1
+ type MetricEnvironment = 'development' | 'preview' | 'production';
1
2
  /**
2
3
  * Options for stream connection behavior
3
4
  */
@@ -594,4 +595,4 @@ declare namespace Packed {
594
595
  };
595
596
  }
596
597
 
597
- export { type BundledDefinitions as B, type ControllerInterface as C, type DatafileInput as D, type EvaluationParams as E, type FlagsClient as F, type PollingOptions as P, ResolutionReason as R, type StreamOptions as S, type VariantId as V, type Datafile as a, type EvaluationResult as b, Packed as c, type Value as d };
598
+ export { type BundledDefinitions as B, type ControllerInterface as C, type DatafileInput as D, type EvaluationParams as E, type FlagsClient as F, type MetricEnvironment as M, type PollingOptions as P, ResolutionReason as R, type StreamOptions as S, type VariantId as V, type Datafile as a, type EvaluationResult as b, Packed as c, type Value as d };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/flags-core",
3
- "version": "1.7.1",
3
+ "version": "1.8.0",
4
4
  "description": "A server-side client for Vercel Flags",
5
5
  "keywords": [
6
6
  "vercel",