@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.
- package/CHANGELOG.md +2 -4
- package/dist/{chunk-D3NMZBRA.js → chunk-2F6JQ5SL.js} +53 -48
- package/dist/chunk-2F6JQ5SL.js.map +1 -0
- package/dist/{chunk-PYADFLD4.cjs → chunk-3Z4P7Q6O.cjs} +53 -48
- package/dist/chunk-3Z4P7Q6O.cjs.map +1 -0
- package/dist/{chunk-T6BGVQQT.js → chunk-OABKRAPP.js} +53 -48
- package/dist/chunk-OABKRAPP.js.map +1 -0
- package/dist/{chunk-WKJKSLD3.cjs → chunk-WKSYRFUY.cjs} +53 -48
- package/dist/chunk-WKSYRFUY.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-b4-JWa-Z.d.cts → types-FKiSedQ9.d.cts} +22 -25
- package/dist/{types-b4-JWa-Z.d.ts → types-FKiSedQ9.d.ts} +22 -25
- package/package.json +1 -1
- package/dist/chunk-D3NMZBRA.js.map +0 -1
- package/dist/chunk-PYADFLD4.cjs.map +0 -1
- package/dist/chunk-T6BGVQQT.js.map +0 -1
- package/dist/chunk-WKJKSLD3.cjs.map +0 -1
package/dist/index.next-js.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
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(
|
|
153
|
+
var VercelProvider = make(_chunkWKSYRFUYcjs.createClient, _chunkWKSYRFUYcjs.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 _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(
|
|
153
|
+
var VercelProvider = make(_chunk3Z4P7Q6Ocjs.createClient, _chunk3Z4P7Q6Ocjs.flagsClient);
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
exports.VercelProvider = VercelProvider;
|
|
@@ -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
|
|
408
|
+
type RolloutOutcome = {
|
|
409
|
+
type: 'rollout';
|
|
407
410
|
/**
|
|
408
|
-
*
|
|
411
|
+
* Based on which attribute the traffic should be split.
|
|
409
412
|
*/
|
|
410
|
-
|
|
413
|
+
base: EntityAccessor;
|
|
411
414
|
/**
|
|
412
|
-
*
|
|
415
|
+
* Epoch ms when the rollout begins.
|
|
413
416
|
*/
|
|
414
|
-
|
|
417
|
+
startTimestamp: number;
|
|
415
418
|
/**
|
|
416
|
-
*
|
|
419
|
+
* Variant index to roll away from.
|
|
417
420
|
*/
|
|
418
|
-
|
|
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
|
-
*
|
|
423
|
+
* Variant index to roll towards.
|
|
428
424
|
*/
|
|
429
|
-
|
|
425
|
+
rollToVariant: VariantIndex;
|
|
430
426
|
/**
|
|
431
|
-
* This variant will be used when the
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
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 |
|
|
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
|
|
408
|
+
type RolloutOutcome = {
|
|
409
|
+
type: 'rollout';
|
|
407
410
|
/**
|
|
408
|
-
*
|
|
411
|
+
* Based on which attribute the traffic should be split.
|
|
409
412
|
*/
|
|
410
|
-
|
|
413
|
+
base: EntityAccessor;
|
|
411
414
|
/**
|
|
412
|
-
*
|
|
415
|
+
* Epoch ms when the rollout begins.
|
|
413
416
|
*/
|
|
414
|
-
|
|
417
|
+
startTimestamp: number;
|
|
415
418
|
/**
|
|
416
|
-
*
|
|
419
|
+
* Variant index to roll away from.
|
|
417
420
|
*/
|
|
418
|
-
|
|
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
|
-
*
|
|
423
|
+
* Variant index to roll towards.
|
|
428
424
|
*/
|
|
429
|
-
|
|
425
|
+
rollToVariant: VariantIndex;
|
|
430
426
|
/**
|
|
431
|
-
* This variant will be used when the
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
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 |
|
|
456
|
+
type Outcome = VariantIndex | SplitOutcome | RolloutOutcome;
|
|
460
457
|
type EntityAccessor = (string | number)[];
|
|
461
458
|
type SegmentAccessor = 'segment';
|
|
462
459
|
/**
|