@vercel/flags-core 1.2.1 → 1.4.0-63fbe35-20260401181433
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/CHANGELOG.md +22 -0
- package/dist/{chunk-M2F32RZX.js → chunk-D3NMZBRA.js} +65 -8
- package/dist/chunk-D3NMZBRA.js.map +1 -0
- package/dist/{chunk-RVVI2JIT.cjs → chunk-PYADFLD4.cjs} +65 -8
- package/dist/chunk-PYADFLD4.cjs.map +1 -0
- package/dist/{chunk-Z62BONOI.js → chunk-T6BGVQQT.js} +65 -8
- package/dist/chunk-T6BGVQQT.js.map +1 -0
- package/dist/{chunk-OVHTANPT.cjs → chunk-WKJKSLD3.cjs} +65 -8
- package/dist/chunk-WKJKSLD3.cjs.map +1 -0
- package/dist/index.default.cjs +2 -2
- package/dist/index.default.d.cts +2 -2
- package/dist/index.default.d.ts +2 -2
- package/dist/index.default.js +1 -1
- package/dist/index.next-js.cjs +2 -2
- package/dist/index.next-js.d.cts +2 -2
- package/dist/index.next-js.d.ts +2 -2
- package/dist/index.next-js.js +1 -1
- package/dist/openfeature.default.cjs +2 -2
- package/dist/openfeature.default.d.cts +1 -1
- package/dist/openfeature.default.d.ts +1 -1
- package/dist/openfeature.default.js +1 -1
- package/dist/openfeature.next-js.cjs +2 -2
- package/dist/openfeature.next-js.d.cts +1 -1
- package/dist/openfeature.next-js.d.ts +1 -1
- package/dist/openfeature.next-js.js +1 -1
- package/dist/{types-CWK2gBCr.d.cts → types-b4-JWa-Z.d.cts} +46 -3
- package/dist/{types-CWK2gBCr.d.ts → types-b4-JWa-Z.d.ts} +46 -3
- package/package.json +1 -1
- package/dist/chunk-M2F32RZX.js.map +0 -1
- package/dist/chunk-OVHTANPT.cjs.map +0 -1
- package/dist/chunk-RVVI2JIT.cjs.map +0 -1
- package/dist/chunk-Z62BONOI.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkWKJKSLD3cjs = require('./chunk-WKJKSLD3.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(
|
|
153
|
+
var VercelProvider = make(_chunkWKJKSLD3cjs.createClient, _chunkWKJKSLD3cjs.flagsClient);
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
exports.VercelProvider = VercelProvider;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkPYADFLD4cjs = require('./chunk-PYADFLD4.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(
|
|
153
|
+
var VercelProvider = make(_chunkPYADFLD4cjs.createClient, _chunkPYADFLD4cjs.flagsClient);
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
exports.VercelProvider = VercelProvider;
|
|
@@ -190,7 +190,12 @@ type EvaluationResult<T> = {
|
|
|
190
190
|
type FlagKey = string;
|
|
191
191
|
type EnvironmentKey = string;
|
|
192
192
|
type SegmentId = string;
|
|
193
|
-
|
|
193
|
+
/**
|
|
194
|
+
* The value of a feature flag variant
|
|
195
|
+
*/
|
|
196
|
+
type Value = string | number | boolean | null | {
|
|
197
|
+
[key: string]: Value;
|
|
198
|
+
} | Value[];
|
|
194
199
|
declare enum ResolutionReason {
|
|
195
200
|
PAUSED = "paused",
|
|
196
201
|
TARGET_MATCH = "target_match",
|
|
@@ -398,6 +403,44 @@ declare namespace Packed {
|
|
|
398
403
|
*/
|
|
399
404
|
defaultVariant: VariantIndex;
|
|
400
405
|
};
|
|
406
|
+
type ProgressiveRolloutStep = {
|
|
407
|
+
/**
|
|
408
|
+
* Start of the rollout window in epoch milliseconds (inclusive).
|
|
409
|
+
*/
|
|
410
|
+
startMs: number;
|
|
411
|
+
/**
|
|
412
|
+
* End of the rollout window in epoch milliseconds (exclusive).
|
|
413
|
+
*/
|
|
414
|
+
endMs: number;
|
|
415
|
+
/**
|
|
416
|
+
* Rollout percentage for this window (0..100, decimals allowed).
|
|
417
|
+
*/
|
|
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;
|
|
426
|
+
/**
|
|
427
|
+
* This variant will be used when the hash falls within the rollout bucket.
|
|
428
|
+
*/
|
|
429
|
+
targetVariant: VariantIndex;
|
|
430
|
+
/**
|
|
431
|
+
* This variant will be used when the hash falls outside the rollout bucket,
|
|
432
|
+
* or when the base attribute does not exist.
|
|
433
|
+
*/
|
|
434
|
+
defaultVariant: VariantIndex;
|
|
435
|
+
/**
|
|
436
|
+
* Absolute rollout windows in epoch milliseconds.
|
|
437
|
+
*
|
|
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.
|
|
441
|
+
*/
|
|
442
|
+
schedule: ProgressiveRolloutStep[];
|
|
443
|
+
};
|
|
401
444
|
type SegmentAllOutcome = 1;
|
|
402
445
|
type SegmentSplitOutcome = {
|
|
403
446
|
type: 'split';
|
|
@@ -413,7 +456,7 @@ declare namespace Packed {
|
|
|
413
456
|
passPromille: number;
|
|
414
457
|
};
|
|
415
458
|
type SegmentOutcome = SegmentAllOutcome | SegmentSplitOutcome;
|
|
416
|
-
type Outcome = VariantIndex | SplitOutcome;
|
|
459
|
+
type Outcome = VariantIndex | SplitOutcome | ProgressiveRolloutOutcome;
|
|
417
460
|
type EntityAccessor = (string | number)[];
|
|
418
461
|
type SegmentAccessor = 'segment';
|
|
419
462
|
/**
|
|
@@ -524,4 +567,4 @@ declare namespace Packed {
|
|
|
524
567
|
};
|
|
525
568
|
}
|
|
526
569
|
|
|
527
|
-
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 Datafile as a, type EvaluationResult as b, Packed as c };
|
|
570
|
+
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 Value as V, type Datafile as a, type EvaluationResult as b, Packed as c };
|
|
@@ -190,7 +190,12 @@ type EvaluationResult<T> = {
|
|
|
190
190
|
type FlagKey = string;
|
|
191
191
|
type EnvironmentKey = string;
|
|
192
192
|
type SegmentId = string;
|
|
193
|
-
|
|
193
|
+
/**
|
|
194
|
+
* The value of a feature flag variant
|
|
195
|
+
*/
|
|
196
|
+
type Value = string | number | boolean | null | {
|
|
197
|
+
[key: string]: Value;
|
|
198
|
+
} | Value[];
|
|
194
199
|
declare enum ResolutionReason {
|
|
195
200
|
PAUSED = "paused",
|
|
196
201
|
TARGET_MATCH = "target_match",
|
|
@@ -398,6 +403,44 @@ declare namespace Packed {
|
|
|
398
403
|
*/
|
|
399
404
|
defaultVariant: VariantIndex;
|
|
400
405
|
};
|
|
406
|
+
type ProgressiveRolloutStep = {
|
|
407
|
+
/**
|
|
408
|
+
* Start of the rollout window in epoch milliseconds (inclusive).
|
|
409
|
+
*/
|
|
410
|
+
startMs: number;
|
|
411
|
+
/**
|
|
412
|
+
* End of the rollout window in epoch milliseconds (exclusive).
|
|
413
|
+
*/
|
|
414
|
+
endMs: number;
|
|
415
|
+
/**
|
|
416
|
+
* Rollout percentage for this window (0..100, decimals allowed).
|
|
417
|
+
*/
|
|
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;
|
|
426
|
+
/**
|
|
427
|
+
* This variant will be used when the hash falls within the rollout bucket.
|
|
428
|
+
*/
|
|
429
|
+
targetVariant: VariantIndex;
|
|
430
|
+
/**
|
|
431
|
+
* This variant will be used when the hash falls outside the rollout bucket,
|
|
432
|
+
* or when the base attribute does not exist.
|
|
433
|
+
*/
|
|
434
|
+
defaultVariant: VariantIndex;
|
|
435
|
+
/**
|
|
436
|
+
* Absolute rollout windows in epoch milliseconds.
|
|
437
|
+
*
|
|
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.
|
|
441
|
+
*/
|
|
442
|
+
schedule: ProgressiveRolloutStep[];
|
|
443
|
+
};
|
|
401
444
|
type SegmentAllOutcome = 1;
|
|
402
445
|
type SegmentSplitOutcome = {
|
|
403
446
|
type: 'split';
|
|
@@ -413,7 +456,7 @@ declare namespace Packed {
|
|
|
413
456
|
passPromille: number;
|
|
414
457
|
};
|
|
415
458
|
type SegmentOutcome = SegmentAllOutcome | SegmentSplitOutcome;
|
|
416
|
-
type Outcome = VariantIndex | SplitOutcome;
|
|
459
|
+
type Outcome = VariantIndex | SplitOutcome | ProgressiveRolloutOutcome;
|
|
417
460
|
type EntityAccessor = (string | number)[];
|
|
418
461
|
type SegmentAccessor = 'segment';
|
|
419
462
|
/**
|
|
@@ -524,4 +567,4 @@ declare namespace Packed {
|
|
|
524
567
|
};
|
|
525
568
|
}
|
|
526
569
|
|
|
527
|
-
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 Datafile as a, type EvaluationResult as b, Packed as c };
|
|
570
|
+
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 Value as V, type Datafile as a, type EvaluationResult as b, Packed as c };
|