@vercel/flags-core 1.4.0-63fbe35-20260401181433 → 1.4.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.
@@ -7,7 +7,7 @@ import {
7
7
  evaluate,
8
8
  flagsClient,
9
9
  resetDefaultFlagsClient
10
- } from "./chunk-D3NMZBRA.js";
10
+ } from "./chunk-2F6JQ5SL.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 _chunkWKJKSLD3cjs = require('./chunk-WKJKSLD3.cjs');
4
+ var _chunkWKSYRFUYcjs = require('./chunk-WKSYRFUY.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(_chunkWKJKSLD3cjs.createClient, _chunkWKJKSLD3cjs.flagsClient);
153
+ var VercelProvider = make(_chunkWKSYRFUYcjs.createClient, _chunkWKSYRFUYcjs.flagsClient);
154
154
 
155
155
 
156
156
  exports.VercelProvider = VercelProvider;
@@ -1,4 +1,4 @@
1
- import { F as FlagsClient } from './types-b4-JWa-Z.cjs';
1
+ import { F as FlagsClient } from './types-FKiSedQ9.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-b4-JWa-Z.js';
1
+ import { F as FlagsClient } from './types-FKiSedQ9.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-T6BGVQQT.js";
4
+ } from "./chunk-OABKRAPP.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 _chunkPYADFLD4cjs = require('./chunk-PYADFLD4.cjs');
4
+ var _chunk3Z4P7Q6Ocjs = require('./chunk-3Z4P7Q6O.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(_chunkPYADFLD4cjs.createClient, _chunkPYADFLD4cjs.flagsClient);
153
+ var VercelProvider = make(_chunk3Z4P7Q6Ocjs.createClient, _chunk3Z4P7Q6Ocjs.flagsClient);
154
154
 
155
155
 
156
156
  exports.VercelProvider = VercelProvider;
@@ -1,4 +1,4 @@
1
- import { F as FlagsClient } from './types-b4-JWa-Z.cjs';
1
+ import { F as FlagsClient } from './types-FKiSedQ9.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-b4-JWa-Z.js';
1
+ import { F as FlagsClient } from './types-FKiSedQ9.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-D3NMZBRA.js";
4
+ } from "./chunk-2F6JQ5SL.js";
5
5
 
6
6
  // src/openfeature.make.ts
7
7
  import {
@@ -207,7 +207,9 @@ declare enum OutcomeType {
207
207
  /** When the outcome type was a single variant */
208
208
  VALUE = "value",
209
209
  /** When the outcome type was a split */
210
- SPLIT = "split"
210
+ SPLIT = "split",
211
+ /** When the outcome type was a progressive rollout */
212
+ ROLLOUT = "rollout"
211
213
  }
212
214
  /**
213
215
  * Vercel Flags
@@ -403,43 +405,38 @@ declare namespace Packed {
403
405
  */
404
406
  defaultVariant: VariantIndex;
405
407
  };
406
- type ProgressiveRolloutStep = {
408
+ type RolloutOutcome = {
409
+ type: 'rollout';
407
410
  /**
408
- * Start of the rollout window in epoch milliseconds (inclusive).
411
+ * Based on which attribute the traffic should be split.
409
412
  */
410
- startMs: number;
413
+ base: EntityAccessor;
411
414
  /**
412
- * End of the rollout window in epoch milliseconds (exclusive).
415
+ * Epoch ms when the rollout begins.
413
416
  */
414
- endMs: number;
417
+ startTimestamp: number;
415
418
  /**
416
- * Rollout percentage for this window (0..100, decimals allowed).
419
+ * Variant index to roll away from.
417
420
  */
418
- percentage: number;
419
- };
420
- type ProgressiveRolloutOutcome = {
421
- type: 'progressive-rollout';
422
- /**
423
- * Based on which attribute the traffic should be split.
424
- */
425
- base: EntityAccessor;
421
+ rollFromVariant: VariantIndex;
426
422
  /**
427
- * This variant will be used when the hash falls within the rollout bucket.
423
+ * Variant index to roll towards.
428
424
  */
429
- targetVariant: VariantIndex;
425
+ rollToVariant: VariantIndex;
430
426
  /**
431
- * This variant will be used when the hash falls outside the rollout bucket,
432
- * or when the base attribute does not exist.
427
+ * This variant will be used when the base attribute does not exist.
433
428
  */
434
429
  defaultVariant: VariantIndex;
435
430
  /**
436
- * Absolute rollout windows in epoch milliseconds.
431
+ * Progressive rollout slots.
432
+ * Each tuple: [promille 0-100_000 for rollToVariant, durationMs (how long this slot is served)]
433
+ * 1 = 0.001%
434
+ * 1_000 = 1%
435
+ * 100_000 = 100%
437
436
  *
438
- * The active window is selected using startMs <= now < endMs.
439
- * Overlapping windows resolve to the latest startMs.
440
- * Outside active windows, the latest already-started step is held.
437
+ * Once all slots are exhausted, the rollout is complete (100% rollToVariant).
441
438
  */
442
- schedule: ProgressiveRolloutStep[];
439
+ slots: [number, number][];
443
440
  };
444
441
  type SegmentAllOutcome = 1;
445
442
  type SegmentSplitOutcome = {
@@ -456,7 +453,7 @@ declare namespace Packed {
456
453
  passPromille: number;
457
454
  };
458
455
  type SegmentOutcome = SegmentAllOutcome | SegmentSplitOutcome;
459
- type Outcome = VariantIndex | SplitOutcome | ProgressiveRolloutOutcome;
456
+ type Outcome = VariantIndex | SplitOutcome | RolloutOutcome;
460
457
  type EntityAccessor = (string | number)[];
461
458
  type SegmentAccessor = 'segment';
462
459
  /**
@@ -207,7 +207,9 @@ declare enum OutcomeType {
207
207
  /** When the outcome type was a single variant */
208
208
  VALUE = "value",
209
209
  /** When the outcome type was a split */
210
- SPLIT = "split"
210
+ SPLIT = "split",
211
+ /** When the outcome type was a progressive rollout */
212
+ ROLLOUT = "rollout"
211
213
  }
212
214
  /**
213
215
  * Vercel Flags
@@ -403,43 +405,38 @@ declare namespace Packed {
403
405
  */
404
406
  defaultVariant: VariantIndex;
405
407
  };
406
- type ProgressiveRolloutStep = {
408
+ type RolloutOutcome = {
409
+ type: 'rollout';
407
410
  /**
408
- * Start of the rollout window in epoch milliseconds (inclusive).
411
+ * Based on which attribute the traffic should be split.
409
412
  */
410
- startMs: number;
413
+ base: EntityAccessor;
411
414
  /**
412
- * End of the rollout window in epoch milliseconds (exclusive).
415
+ * Epoch ms when the rollout begins.
413
416
  */
414
- endMs: number;
417
+ startTimestamp: number;
415
418
  /**
416
- * Rollout percentage for this window (0..100, decimals allowed).
419
+ * Variant index to roll away from.
417
420
  */
418
- percentage: number;
419
- };
420
- type ProgressiveRolloutOutcome = {
421
- type: 'progressive-rollout';
422
- /**
423
- * Based on which attribute the traffic should be split.
424
- */
425
- base: EntityAccessor;
421
+ rollFromVariant: VariantIndex;
426
422
  /**
427
- * This variant will be used when the hash falls within the rollout bucket.
423
+ * Variant index to roll towards.
428
424
  */
429
- targetVariant: VariantIndex;
425
+ rollToVariant: VariantIndex;
430
426
  /**
431
- * This variant will be used when the hash falls outside the rollout bucket,
432
- * or when the base attribute does not exist.
427
+ * This variant will be used when the base attribute does not exist.
433
428
  */
434
429
  defaultVariant: VariantIndex;
435
430
  /**
436
- * Absolute rollout windows in epoch milliseconds.
431
+ * Progressive rollout slots.
432
+ * Each tuple: [promille 0-100_000 for rollToVariant, durationMs (how long this slot is served)]
433
+ * 1 = 0.001%
434
+ * 1_000 = 1%
435
+ * 100_000 = 100%
437
436
  *
438
- * The active window is selected using startMs <= now < endMs.
439
- * Overlapping windows resolve to the latest startMs.
440
- * Outside active windows, the latest already-started step is held.
437
+ * Once all slots are exhausted, the rollout is complete (100% rollToVariant).
441
438
  */
442
- schedule: ProgressiveRolloutStep[];
439
+ slots: [number, number][];
443
440
  };
444
441
  type SegmentAllOutcome = 1;
445
442
  type SegmentSplitOutcome = {
@@ -456,7 +453,7 @@ declare namespace Packed {
456
453
  passPromille: number;
457
454
  };
458
455
  type SegmentOutcome = SegmentAllOutcome | SegmentSplitOutcome;
459
- type Outcome = VariantIndex | SplitOutcome | ProgressiveRolloutOutcome;
456
+ type Outcome = VariantIndex | SplitOutcome | RolloutOutcome;
460
457
  type EntityAccessor = (string | number)[];
461
458
  type SegmentAccessor = 'segment';
462
459
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/flags-core",
3
- "version": "1.4.0-63fbe35-20260401181433",
3
+ "version": "1.4.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",