@spotify-confidence/openfeature-server-provider-local 0.10.0 → 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 +14 -0
- package/dist/confidence_resolver.wasm +0 -0
- package/dist/index.fetch.d.ts +1 -0
- package/dist/index.fetch.js +18 -4
- package/dist/index.inlined.d.ts +1 -0
- package/dist/index.inlined.js +19 -5
- package/dist/index.node.d.ts +1 -0
- package/dist/index.node.js +18 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
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
|
+
|
|
3
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)
|
|
4
18
|
|
|
5
19
|
|
|
Binary file
|
package/dist/index.fetch.d.ts
CHANGED
|
@@ -297,6 +297,7 @@ interface MessageFns$2<T> {
|
|
|
297
297
|
interface SetResolverStateRequest {
|
|
298
298
|
state: Uint8Array;
|
|
299
299
|
accountId: string;
|
|
300
|
+
sdk?: Sdk | undefined;
|
|
300
301
|
}
|
|
301
302
|
declare const SetResolverStateRequest: MessageFns$1<SetResolverStateRequest>;
|
|
302
303
|
type Builtin$1 = Date | Function | Uint8Array | string | number | boolean | undefined;
|
package/dist/index.fetch.js
CHANGED
|
@@ -1410,7 +1410,7 @@ function isObject(value) {
|
|
|
1410
1410
|
function isSet$3(value) {
|
|
1411
1411
|
return value !== null && value !== void 0;
|
|
1412
1412
|
}
|
|
1413
|
-
const VERSION = "0.10.
|
|
1413
|
+
const VERSION = "0.10.1";
|
|
1414
1414
|
const NOOP_LOG_FN = Object.assign(() => {}, { enabled: false });
|
|
1415
1415
|
const debugBackend = loadDebug();
|
|
1416
1416
|
const logger$2 = new class LoggerImpl {
|
|
@@ -2392,13 +2392,15 @@ const Void = {
|
|
|
2392
2392
|
function createBaseSetResolverStateRequest() {
|
|
2393
2393
|
return {
|
|
2394
2394
|
state: new Uint8Array(0),
|
|
2395
|
-
accountId: ""
|
|
2395
|
+
accountId: "",
|
|
2396
|
+
sdk: void 0
|
|
2396
2397
|
};
|
|
2397
2398
|
}
|
|
2398
2399
|
const SetResolverStateRequest = {
|
|
2399
2400
|
encode(message, writer = new BinaryWriter()) {
|
|
2400
2401
|
if (message.state.length !== 0) writer.uint32(10).bytes(message.state);
|
|
2401
2402
|
if (message.accountId !== "") writer.uint32(18).string(message.accountId);
|
|
2403
|
+
if (message.sdk !== void 0) Sdk.encode(message.sdk, writer.uint32(26).fork()).join();
|
|
2402
2404
|
return writer;
|
|
2403
2405
|
},
|
|
2404
2406
|
decode(input, length) {
|
|
@@ -2416,6 +2418,10 @@ const SetResolverStateRequest = {
|
|
|
2416
2418
|
if (tag !== 18) break;
|
|
2417
2419
|
message.accountId = reader.string();
|
|
2418
2420
|
continue;
|
|
2421
|
+
case 3:
|
|
2422
|
+
if (tag !== 26) break;
|
|
2423
|
+
message.sdk = Sdk.decode(reader, reader.uint32());
|
|
2424
|
+
continue;
|
|
2419
2425
|
}
|
|
2420
2426
|
if ((tag & 7) === 4 || tag === 0) break;
|
|
2421
2427
|
reader.skip(tag & 7);
|
|
@@ -2425,13 +2431,15 @@ const SetResolverStateRequest = {
|
|
|
2425
2431
|
fromJSON(object) {
|
|
2426
2432
|
return {
|
|
2427
2433
|
state: isSet$1(object.state) ? bytesFromBase64$2(object.state) : new Uint8Array(0),
|
|
2428
|
-
accountId: isSet$1(object.accountId) ? globalThis.String(object.accountId) : ""
|
|
2434
|
+
accountId: isSet$1(object.accountId) ? globalThis.String(object.accountId) : "",
|
|
2435
|
+
sdk: isSet$1(object.sdk) ? Sdk.fromJSON(object.sdk) : void 0
|
|
2429
2436
|
};
|
|
2430
2437
|
},
|
|
2431
2438
|
toJSON(message) {
|
|
2432
2439
|
const obj = {};
|
|
2433
2440
|
if (message.state.length !== 0) obj.state = base64FromBytes$2(message.state);
|
|
2434
2441
|
if (message.accountId !== "") obj.accountId = message.accountId;
|
|
2442
|
+
if (message.sdk !== void 0) obj.sdk = Sdk.toJSON(message.sdk);
|
|
2435
2443
|
return obj;
|
|
2436
2444
|
},
|
|
2437
2445
|
create(base) {
|
|
@@ -2441,6 +2449,7 @@ const SetResolverStateRequest = {
|
|
|
2441
2449
|
const message = createBaseSetResolverStateRequest();
|
|
2442
2450
|
message.state = object.state ?? new Uint8Array(0);
|
|
2443
2451
|
message.accountId = object.accountId ?? "";
|
|
2452
|
+
message.sdk = object.sdk !== void 0 && object.sdk !== null ? Sdk.fromPartial(object.sdk) : void 0;
|
|
2444
2453
|
return message;
|
|
2445
2454
|
}
|
|
2446
2455
|
};
|
|
@@ -2813,7 +2822,12 @@ var ConfidenceServerProviderLocal = class ConfidenceServerProviderLocal {
|
|
|
2813
2822
|
if (!resp.ok) throw new Error(`Failed to fetch state: ${resp.status} ${resp.statusText}`);
|
|
2814
2823
|
this.stateEtag = resp.headers.get("etag");
|
|
2815
2824
|
const bytes = new Uint8Array(await resp.arrayBuffer());
|
|
2816
|
-
|
|
2825
|
+
const stateRequest = SetResolverStateRequest.decode(bytes);
|
|
2826
|
+
stateRequest.sdk = {
|
|
2827
|
+
id: SdkId.SDK_ID_JS_LOCAL_SERVER_PROVIDER,
|
|
2828
|
+
version: VERSION
|
|
2829
|
+
};
|
|
2830
|
+
this.resolver.setResolverState(stateRequest);
|
|
2817
2831
|
}
|
|
2818
2832
|
async flush(signal) {
|
|
2819
2833
|
const writeFlagLogRequest = this.resolver.flushLogs();
|
package/dist/index.inlined.d.ts
CHANGED
|
@@ -297,6 +297,7 @@ interface MessageFns$2<T> {
|
|
|
297
297
|
interface SetResolverStateRequest {
|
|
298
298
|
state: Uint8Array;
|
|
299
299
|
accountId: string;
|
|
300
|
+
sdk?: Sdk | undefined;
|
|
300
301
|
}
|
|
301
302
|
declare const SetResolverStateRequest: MessageFns$1<SetResolverStateRequest>;
|
|
302
303
|
type Builtin$1 = Date | Function | Uint8Array | string | number | boolean | undefined;
|