@vercel/flags-core 1.5.0-dde2adb-20260526050633 → 1.5.1
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 -2
- package/dist/{chunk-UICJ4U6H.js → chunk-4B7CLR4J.js} +124 -57
- package/dist/chunk-4B7CLR4J.js.map +1 -0
- package/dist/{chunk-ZHIY5NVJ.cjs → chunk-AXRUQULC.cjs} +124 -57
- package/dist/chunk-AXRUQULC.cjs.map +1 -0
- package/dist/{chunk-CX2U3ZTN.js → chunk-ITF6ZJ32.js} +124 -57
- package/dist/chunk-ITF6ZJ32.js.map +1 -0
- package/dist/{chunk-XINPOF5O.cjs → chunk-JTIP7QPD.cjs} +125 -58
- package/dist/chunk-JTIP7QPD.cjs.map +1 -0
- package/dist/index.default.cjs +2 -2
- package/dist/index.default.d.cts +19 -6
- package/dist/index.default.d.ts +19 -6
- package/dist/index.default.js +1 -1
- package/dist/index.next-js.cjs +2 -2
- package/dist/index.next-js.d.cts +19 -6
- package/dist/index.next-js.d.ts +19 -6
- 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-C70GeY3G.d.cts → types-DkVz6AOY.d.cts} +3 -2
- package/dist/{types-C70GeY3G.d.ts → types-DkVz6AOY.d.ts} +3 -2
- package/package.json +2 -1
- package/dist/chunk-CX2U3ZTN.js.map +0 -1
- package/dist/chunk-UICJ4U6H.js.map +0 -1
- package/dist/chunk-XINPOF5O.cjs.map +0 -1
- package/dist/chunk-ZHIY5NVJ.cjs.map +0 -1
package/dist/index.next-js.d.ts
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
|
-
import { 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-
|
|
2
|
-
export { c as Packed, R as Reason, V as Value } from './types-
|
|
1
|
+
import { 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-DkVz6AOY.js';
|
|
2
|
+
export { c as Packed, R as Reason, V as Value } from './types-DkVz6AOY.js';
|
|
3
|
+
|
|
4
|
+
type BundledDefinitionsLookup = {
|
|
5
|
+
type: 'sdk-key';
|
|
6
|
+
sdkKey: string;
|
|
7
|
+
} | {
|
|
8
|
+
type: 'project-id';
|
|
9
|
+
projectId: string;
|
|
10
|
+
};
|
|
11
|
+
interface Auth {
|
|
12
|
+
sdkKey?: string;
|
|
13
|
+
resolveToken(): Promise<string>;
|
|
14
|
+
resolveBundledDefinitionsLookup(): Promise<BundledDefinitionsLookup>;
|
|
15
|
+
}
|
|
3
16
|
|
|
4
17
|
/**
|
|
5
18
|
* Configuration options for Controller
|
|
6
19
|
*/
|
|
7
20
|
type ControllerOptions = {
|
|
8
|
-
/**
|
|
9
|
-
|
|
21
|
+
/** Authentication which resolves the token for requests */
|
|
22
|
+
auth: Auth;
|
|
10
23
|
/**
|
|
11
24
|
* Initial datafile to use immediately
|
|
12
25
|
* - At runtime: used while waiting for stream/poll, then updated in background
|
|
@@ -192,7 +205,7 @@ declare class Controller implements ControllerInterface {
|
|
|
192
205
|
/**
|
|
193
206
|
* Options for createClient
|
|
194
207
|
*/
|
|
195
|
-
type CreateClientOptions = Omit<ControllerOptions, '
|
|
208
|
+
type CreateClientOptions = Omit<ControllerOptions, 'auth'>;
|
|
196
209
|
|
|
197
210
|
/**
|
|
198
211
|
* Error thrown when the fallback definitions file does not exist.
|
|
@@ -228,6 +241,6 @@ _visited?: Set<string>): EvaluationResult<T>;
|
|
|
228
241
|
|
|
229
242
|
declare const flagsClient: FlagsClient;
|
|
230
243
|
declare const resetDefaultFlagsClient: () => void;
|
|
231
|
-
declare const createClient: <Entities = Record<string, unknown>>(sdkKeyOrConnectionString
|
|
244
|
+
declare const createClient: <Entities = Record<string, unknown>>(sdkKeyOrConnectionString?: string, options?: CreateClientOptions) => FlagsClient<Entities>;
|
|
232
245
|
|
|
233
246
|
export { BundledDefinitions, Controller, type ControllerOptions, type CreateClientOptions, Datafile, DatafileInput, EvaluationParams, EvaluationResult, FallbackEntryNotFoundError, FallbackNotFoundError, Controller as FlagNetworkDataSource, type ControllerOptions as FlagNetworkDataSourceOptions, FlagsClient, PollingOptions, StreamOptions, createClient, evaluate, flagsClient, resetDefaultFlagsClient };
|
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 _chunkAXRUQULCcjs = require('./chunk-AXRUQULC.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(_chunkAXRUQULCcjs.createClient, _chunkAXRUQULCcjs.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 _chunkJTIP7QPDcjs = require('./chunk-JTIP7QPD.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(_chunkJTIP7QPDcjs.createClient, _chunkJTIP7QPDcjs.flagsClient);
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
exports.VercelProvider = VercelProvider;
|
|
@@ -104,11 +104,12 @@ type BulkEvaluateInput<T = Value> = {
|
|
|
104
104
|
*/
|
|
105
105
|
type FlagsClient<Entities = Record<string, unknown>> = {
|
|
106
106
|
/**
|
|
107
|
-
* Origin information for this client
|
|
107
|
+
* Origin information for this client.
|
|
108
|
+
* sdkKey is only present when the client was explicitly created with one.
|
|
108
109
|
*/
|
|
109
110
|
origin?: {
|
|
110
111
|
provider: string;
|
|
111
|
-
sdkKey
|
|
112
|
+
sdkKey?: string;
|
|
112
113
|
};
|
|
113
114
|
/**
|
|
114
115
|
* Evaluate a feature flag
|
|
@@ -104,11 +104,12 @@ type BulkEvaluateInput<T = Value> = {
|
|
|
104
104
|
*/
|
|
105
105
|
type FlagsClient<Entities = Record<string, unknown>> = {
|
|
106
106
|
/**
|
|
107
|
-
* Origin information for this client
|
|
107
|
+
* Origin information for this client.
|
|
108
|
+
* sdkKey is only present when the client was explicitly created with one.
|
|
108
109
|
*/
|
|
109
110
|
origin?: {
|
|
110
111
|
provider: string;
|
|
111
|
-
sdkKey
|
|
112
|
+
sdkKey?: string;
|
|
112
113
|
};
|
|
113
114
|
/**
|
|
114
115
|
* Evaluate a feature flag
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/flags-core",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "A server-side client for Vercel Flags",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vercel",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
],
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@vercel/functions": "^3.4.3",
|
|
69
|
+
"@vercel/oidc": "3.5.0",
|
|
69
70
|
"jose": "5.2.1",
|
|
70
71
|
"js-xxhash": "4.0.0"
|
|
71
72
|
},
|