@spotify-confidence/openfeature-server-provider-local 0.9.1 → 0.10.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 +33 -0
- package/dist/confidence_resolver.wasm +0 -0
- package/dist/index.fetch.d.ts +74 -71
- package/dist/index.fetch.js +456 -175
- package/dist/index.inlined.d.ts +74 -71
- package/dist/index.inlined.js +457 -176
- package/dist/index.node.d.ts +74 -71
- package/dist/index.node.js +456 -175
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.10.1](https://github.com/spotify/confidence-resolver/compare/openfeature-provider-js-v0.10.0...openfeature-provider-js-v0.10.1) (2026-03-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* pass the sdk with the state to get it into telemetry ([#332](https://github.com/spotify/confidence-resolver/issues/332)) ([1f22c5f](https://github.com/spotify/confidence-resolver/commit/1f22c5fa38c4e8a7d56ea4616db94f9b991d41ab))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* rust-guest bumped from 0.1.18 to 0.1.19
|
|
16
|
+
|
|
17
|
+
## [0.10.0](https://github.com/spotify/confidence-resolver/compare/openfeature-provider-js-v0.9.1...openfeature-provider-js-v0.10.0) (2026-03-06)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* metrics in telemetry data ([#266](https://github.com/spotify/confidence-resolver/issues/266)) ([965eff6](https://github.com/spotify/confidence-resolver/commit/965eff60b6c0377336e6e86624a78f6f3a859f73))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **js:** increase state fetch stall timeout to 1s ([#293](https://github.com/spotify/confidence-resolver/issues/293)) ([f95da45](https://github.com/spotify/confidence-resolver/commit/f95da455ef338b3e43604f4a2d76d008c9e63496))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Dependencies
|
|
31
|
+
|
|
32
|
+
* The following workspace dependencies were updated
|
|
33
|
+
* dependencies
|
|
34
|
+
* rust-guest bumped from 0.1.17 to 0.1.18
|
|
35
|
+
|
|
3
36
|
## [0.9.1](https://github.com/spotify/confidence-resolver/compare/openfeature-provider-js-v0.9.0...openfeature-provider-js-v0.9.1) (2026-02-20)
|
|
4
37
|
|
|
5
38
|
|
|
Binary file
|
package/dist/index.fetch.d.ts
CHANGED
|
@@ -80,6 +80,8 @@ declare enum ResolveReason {
|
|
|
80
80
|
RESOLVE_REASON_ERROR = 6,
|
|
81
81
|
/** RESOLVE_REASON_UNRECOGNIZED_TARGETING_RULE - The flag could not be resolved because a targeting rule was not recognized */
|
|
82
82
|
RESOLVE_REASON_UNRECOGNIZED_TARGETING_RULE = 7,
|
|
83
|
+
/** RESOLVE_REASON_MATERIALIZATION_NOT_SUPPORTED - The flag could not be resolved because a rule is using materialization */
|
|
84
|
+
RESOLVE_REASON_MATERIALIZATION_NOT_SUPPORTED = 8,
|
|
83
85
|
UNRECOGNIZED = -1,
|
|
84
86
|
}
|
|
85
87
|
declare enum SdkId {
|
|
@@ -233,45 +235,51 @@ interface MessageFns$3<T> {
|
|
|
233
235
|
fromPartial<I extends Exact$3<DeepPartial$3<T>, I>>(object: I): T;
|
|
234
236
|
}
|
|
235
237
|
//#endregion
|
|
236
|
-
//#region src/proto/confidence/
|
|
237
|
-
interface
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
238
|
+
//#region src/proto/confidence/wasm/wasm_api.d.ts
|
|
239
|
+
interface ResolveProcessRequest {
|
|
240
|
+
/** Materialization reads will "suspend" the resolve */
|
|
241
|
+
deferredMaterializations?: ResolveFlagsRequest | undefined;
|
|
242
|
+
/** Materializations will be read from a statically provided set */
|
|
243
|
+
staticMaterializations?: ResolveProcessRequest_StaticMaterializations | undefined;
|
|
244
|
+
/** No materialization support, reads will error the flag. */
|
|
245
|
+
withoutMaterializations?: ResolveFlagsRequest | undefined;
|
|
246
|
+
/** Resume a previously suspended resolve with requested materializations */
|
|
247
|
+
resume?: ResolveProcessRequest_Resume | undefined;
|
|
248
|
+
}
|
|
249
|
+
interface ResolveProcessRequest_StaticMaterializations {
|
|
250
|
+
resolveRequest?: ResolveFlagsRequest | undefined;
|
|
251
|
+
materializations: MaterializationRecord[];
|
|
241
252
|
}
|
|
242
|
-
interface
|
|
243
|
-
|
|
244
|
-
|
|
253
|
+
interface ResolveProcessRequest_Resume {
|
|
254
|
+
materializations: MaterializationRecord[];
|
|
255
|
+
state: Uint8Array;
|
|
245
256
|
}
|
|
246
|
-
interface
|
|
247
|
-
|
|
248
|
-
|
|
257
|
+
interface ResolveProcessResponse {
|
|
258
|
+
resolved?: ResolveProcessResponse_Resolved | undefined;
|
|
259
|
+
suspended?: ResolveProcessResponse_Suspended | undefined;
|
|
249
260
|
}
|
|
250
|
-
interface
|
|
251
|
-
|
|
261
|
+
interface ResolveProcessResponse_Resolved {
|
|
262
|
+
response?: ResolveFlagsResponse | undefined;
|
|
263
|
+
materializationsToWrite: MaterializationRecord[];
|
|
252
264
|
}
|
|
253
|
-
interface
|
|
265
|
+
interface ResolveProcessResponse_Suspended {
|
|
266
|
+
materializationsToRead: MaterializationRecord[];
|
|
267
|
+
state: Uint8Array;
|
|
268
|
+
}
|
|
269
|
+
/** This message is used both as a query and a result when reading materializations. */
|
|
270
|
+
interface MaterializationRecord {
|
|
254
271
|
unit: string;
|
|
255
272
|
materialization: string;
|
|
256
273
|
rule: string;
|
|
257
274
|
variant: string;
|
|
258
275
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
inclusionResult?: InclusionData | undefined;
|
|
267
|
-
}
|
|
268
|
-
declare const VariantReadOp: MessageFns$2<VariantReadOp>;
|
|
269
|
-
declare const InclusionReadOp: MessageFns$2<InclusionReadOp>;
|
|
270
|
-
declare const ReadOp$1: MessageFns$2<ReadOp$1>;
|
|
271
|
-
declare const ReadOperationsRequest: MessageFns$2<ReadOperationsRequest>;
|
|
272
|
-
declare const VariantData: MessageFns$2<VariantData>;
|
|
273
|
-
declare const InclusionData: MessageFns$2<InclusionData>;
|
|
274
|
-
declare const ReadResult: MessageFns$2<ReadResult>;
|
|
276
|
+
declare const ResolveProcessRequest: MessageFns$2<ResolveProcessRequest>;
|
|
277
|
+
declare const ResolveProcessRequest_StaticMaterializations: MessageFns$2<ResolveProcessRequest_StaticMaterializations>;
|
|
278
|
+
declare const ResolveProcessRequest_Resume: MessageFns$2<ResolveProcessRequest_Resume>;
|
|
279
|
+
declare const ResolveProcessResponse: MessageFns$2<ResolveProcessResponse>;
|
|
280
|
+
declare const ResolveProcessResponse_Resolved: MessageFns$2<ResolveProcessResponse_Resolved>;
|
|
281
|
+
declare const ResolveProcessResponse_Suspended: MessageFns$2<ResolveProcessResponse_Suspended>;
|
|
282
|
+
declare const MaterializationRecord: MessageFns$2<MaterializationRecord>;
|
|
275
283
|
type Builtin$2 = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
276
284
|
type DeepPartial$2<T> = T extends Builtin$2 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$2<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$2<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$2<T[K]> } : Partial<T>;
|
|
277
285
|
type KeysOfUnion$2<T> = T extends T ? keyof T : never;
|
|
@@ -285,32 +293,13 @@ interface MessageFns$2<T> {
|
|
|
285
293
|
fromPartial<I extends Exact$2<DeepPartial$2<T>, I>>(object: I): T;
|
|
286
294
|
}
|
|
287
295
|
//#endregion
|
|
288
|
-
//#region src/proto/confidence/wasm/
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
/** if a materialization info is missing, we want tor return to the caller immediately */
|
|
294
|
-
failFastOnSticky: boolean;
|
|
295
|
-
/** if we should support sticky or completely skip the flag if they had sticky rules */
|
|
296
|
-
notProcessSticky: boolean;
|
|
297
|
-
/** Context about the materialization required for the resolve */
|
|
298
|
-
materializations: ReadResult[];
|
|
299
|
-
}
|
|
300
|
-
/** Response from resolving with sticky assignments */
|
|
301
|
-
interface ResolveWithStickyResponse {
|
|
302
|
-
success?: ResolveWithStickyResponse_Success | undefined;
|
|
303
|
-
readOpsRequest?: ReadOperationsRequest | undefined;
|
|
304
|
-
}
|
|
305
|
-
/** Successful resolution with materialization updates */
|
|
306
|
-
interface ResolveWithStickyResponse_Success {
|
|
307
|
-
response?: ResolveFlagsResponse | undefined;
|
|
308
|
-
/** New assignments that should be stored */
|
|
309
|
-
materializationUpdates: VariantData[];
|
|
296
|
+
//#region src/proto/confidence/wasm/messages.d.ts
|
|
297
|
+
interface SetResolverStateRequest {
|
|
298
|
+
state: Uint8Array;
|
|
299
|
+
accountId: string;
|
|
300
|
+
sdk?: Sdk | undefined;
|
|
310
301
|
}
|
|
311
|
-
declare const
|
|
312
|
-
declare const ResolveWithStickyResponse: MessageFns$1<ResolveWithStickyResponse>;
|
|
313
|
-
declare const ResolveWithStickyResponse_Success: MessageFns$1<ResolveWithStickyResponse_Success>;
|
|
302
|
+
declare const SetResolverStateRequest: MessageFns$1<SetResolverStateRequest>;
|
|
314
303
|
type Builtin$1 = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
315
304
|
type DeepPartial$1<T> = T extends Builtin$1 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$1<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$1<U>> : T extends {} ? { [K in keyof T]?: DeepPartial$1<T[K]> } : Partial<T>;
|
|
316
305
|
type KeysOfUnion$1<T> = T extends T ? keyof T : never;
|
|
@@ -324,12 +313,34 @@ interface MessageFns$1<T> {
|
|
|
324
313
|
fromPartial<I extends Exact$1<DeepPartial$1<T>, I>>(object: I): T;
|
|
325
314
|
}
|
|
326
315
|
//#endregion
|
|
327
|
-
//#region src/
|
|
328
|
-
interface
|
|
329
|
-
|
|
330
|
-
|
|
316
|
+
//#region src/LocalResolver.d.ts
|
|
317
|
+
interface LocalResolver {
|
|
318
|
+
resolveProcess(request: ResolveProcessRequest): ResolveProcessResponse;
|
|
319
|
+
setResolverState(request: SetResolverStateRequest): void;
|
|
320
|
+
flushLogs(): Uint8Array;
|
|
321
|
+
flushAssigned(): Uint8Array;
|
|
322
|
+
applyFlags(request: ApplyFlagsRequest): void;
|
|
323
|
+
}
|
|
324
|
+
//#endregion
|
|
325
|
+
//#region src/proto/confidence/flags/resolver/v1/internal_api.d.ts
|
|
326
|
+
interface VariantData {
|
|
327
|
+
unit: string;
|
|
328
|
+
materialization: string;
|
|
329
|
+
rule: string;
|
|
330
|
+
variant: string;
|
|
331
|
+
}
|
|
332
|
+
interface InclusionData {
|
|
333
|
+
unit: string;
|
|
334
|
+
materialization: string;
|
|
335
|
+
isIncluded: boolean;
|
|
336
|
+
}
|
|
337
|
+
interface ReadResult {
|
|
338
|
+
variantResult?: VariantData | undefined;
|
|
339
|
+
inclusionResult?: InclusionData | undefined;
|
|
331
340
|
}
|
|
332
|
-
declare const
|
|
341
|
+
declare const VariantData: MessageFns<VariantData>;
|
|
342
|
+
declare const InclusionData: MessageFns<InclusionData>;
|
|
343
|
+
declare const ReadResult: MessageFns<ReadResult>;
|
|
333
344
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
334
345
|
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> } : Partial<T>;
|
|
335
346
|
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
@@ -343,15 +354,6 @@ interface MessageFns<T> {
|
|
|
343
354
|
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
344
355
|
}
|
|
345
356
|
//#endregion
|
|
346
|
-
//#region src/LocalResolver.d.ts
|
|
347
|
-
interface LocalResolver {
|
|
348
|
-
resolveWithSticky(request: ResolveWithStickyRequest): ResolveWithStickyResponse;
|
|
349
|
-
setResolverState(request: SetResolverStateRequest): void;
|
|
350
|
-
flushLogs(): Uint8Array;
|
|
351
|
-
flushAssigned(): Uint8Array;
|
|
352
|
-
applyFlags(request: ApplyFlagsRequest): void;
|
|
353
|
-
}
|
|
354
|
-
//#endregion
|
|
355
357
|
//#region src/materialization.d.ts
|
|
356
358
|
declare namespace MaterializationStore {
|
|
357
359
|
namespace ReadOp {
|
|
@@ -465,7 +467,7 @@ interface ProviderOptions {
|
|
|
465
467
|
initializeTimeout?: number;
|
|
466
468
|
/** Interval in milliseconds between state polling updates. Defaults to 30000ms. */
|
|
467
469
|
stateUpdateInterval?: number;
|
|
468
|
-
/** Interval in milliseconds between log flushes. Defaults to
|
|
470
|
+
/** Interval in milliseconds between log flushes. Defaults to 15000ms. */
|
|
469
471
|
flushInterval?: number;
|
|
470
472
|
fetch?: typeof fetch;
|
|
471
473
|
materializationStore?: MaterializationStore | "CONFIDENCE_REMOTE_STORE";
|
|
@@ -493,7 +495,8 @@ declare class ConfidenceServerProviderLocal implements Provider {
|
|
|
493
495
|
onClose(): Promise<void>;
|
|
494
496
|
resolve(context: EvaluationContext, flagNames: string[], apply?: boolean): Promise<FlagBundle$1>;
|
|
495
497
|
evaluate<T extends JsonValue>(flagKey: string, defaultValue: T, context: EvaluationContext): Promise<ResolutionDetails<T>>;
|
|
496
|
-
private
|
|
498
|
+
private resolveProcess;
|
|
499
|
+
private handleMaterializationWrites;
|
|
497
500
|
updateState(signal?: AbortSignal): Promise<void>;
|
|
498
501
|
flush(signal?: AbortSignal): Promise<void>;
|
|
499
502
|
private flushAssigned;
|