@spotify-confidence/openfeature-server-provider-local 0.11.1 → 0.12.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 +21 -0
- package/dist/confidence_resolver.wasm +0 -0
- package/dist/index.fetch.js +45 -6
- package/dist/index.inlined.js +46 -7
- package/dist/index.node.js +45 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.12.0](https://github.com/spotify/confidence-resolver/compare/openfeature-provider-js-v0.11.2...openfeature-provider-js-v0.12.0) (2026-04-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* improve Prometheus metrics API ([#371](https://github.com/spotify/confidence-resolver/issues/371)) ([efb8c16](https://github.com/spotify/confidence-resolver/commit/efb8c16a4ca9659c60e4f69611c80d3addb4e3fa))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* rust-guest bumped from 0.1.21 to 0.1.22
|
|
16
|
+
|
|
17
|
+
## [0.11.2](https://github.com/spotify/confidence-resolver/compare/openfeature-provider-js-v0.11.1...openfeature-provider-js-v0.11.2) (2026-04-14)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* free WASM guest request allocation in host functions ([#369](https://github.com/spotify/confidence-resolver/issues/369)) ([dd7ddac](https://github.com/spotify/confidence-resolver/commit/dd7ddac4e22e895c7b08b09064c9dc8bab54c716))
|
|
23
|
+
|
|
3
24
|
## [0.11.1](https://github.com/spotify/confidence-resolver/compare/openfeature-provider-js-v0.11.0...openfeature-provider-js-v0.11.1) (2026-03-26)
|
|
4
25
|
|
|
5
26
|
|
|
Binary file
|
package/dist/index.fetch.js
CHANGED
|
@@ -1418,7 +1418,7 @@ function isObject(value) {
|
|
|
1418
1418
|
function isSet$3(value) {
|
|
1419
1419
|
return value !== null && value !== void 0;
|
|
1420
1420
|
}
|
|
1421
|
-
const VERSION = "0.
|
|
1421
|
+
const VERSION = "0.12.0";
|
|
1422
1422
|
const NOOP_LOG_FN = Object.assign(() => {}, { enabled: false });
|
|
1423
1423
|
const debugBackend = loadDebug();
|
|
1424
1424
|
const logger$2 = new class LoggerImpl {
|
|
@@ -2559,11 +2559,17 @@ const Response$1 = {
|
|
|
2559
2559
|
}
|
|
2560
2560
|
};
|
|
2561
2561
|
function createBasePrometheusSnapshotRequest() {
|
|
2562
|
-
return {
|
|
2562
|
+
return {
|
|
2563
|
+
instance: "",
|
|
2564
|
+
bucketsPerDecade: 0,
|
|
2565
|
+
openmetrics: false
|
|
2566
|
+
};
|
|
2563
2567
|
}
|
|
2564
2568
|
const PrometheusSnapshotRequest = {
|
|
2565
2569
|
encode(message, writer = new BinaryWriter()) {
|
|
2566
2570
|
if (message.instance !== "") writer.uint32(10).string(message.instance);
|
|
2571
|
+
if (message.bucketsPerDecade !== 0) writer.uint32(16).uint32(message.bucketsPerDecade);
|
|
2572
|
+
if (message.openmetrics !== false) writer.uint32(24).bool(message.openmetrics);
|
|
2567
2573
|
return writer;
|
|
2568
2574
|
},
|
|
2569
2575
|
decode(input, length) {
|
|
@@ -2577,6 +2583,14 @@ const PrometheusSnapshotRequest = {
|
|
|
2577
2583
|
if (tag !== 10) break;
|
|
2578
2584
|
message.instance = reader.string();
|
|
2579
2585
|
continue;
|
|
2586
|
+
case 2:
|
|
2587
|
+
if (tag !== 16) break;
|
|
2588
|
+
message.bucketsPerDecade = reader.uint32();
|
|
2589
|
+
continue;
|
|
2590
|
+
case 3:
|
|
2591
|
+
if (tag !== 24) break;
|
|
2592
|
+
message.openmetrics = reader.bool();
|
|
2593
|
+
continue;
|
|
2580
2594
|
}
|
|
2581
2595
|
if ((tag & 7) === 4 || tag === 0) break;
|
|
2582
2596
|
reader.skip(tag & 7);
|
|
@@ -2584,11 +2598,17 @@ const PrometheusSnapshotRequest = {
|
|
|
2584
2598
|
return message;
|
|
2585
2599
|
},
|
|
2586
2600
|
fromJSON(object) {
|
|
2587
|
-
return {
|
|
2601
|
+
return {
|
|
2602
|
+
instance: isSet$1(object.instance) ? globalThis.String(object.instance) : "",
|
|
2603
|
+
bucketsPerDecade: isSet$1(object.bucketsPerDecade) ? globalThis.Number(object.bucketsPerDecade) : 0,
|
|
2604
|
+
openmetrics: isSet$1(object.openmetrics) ? globalThis.Boolean(object.openmetrics) : false
|
|
2605
|
+
};
|
|
2588
2606
|
},
|
|
2589
2607
|
toJSON(message) {
|
|
2590
2608
|
const obj = {};
|
|
2591
2609
|
if (message.instance !== "") obj.instance = message.instance;
|
|
2610
|
+
if (message.bucketsPerDecade !== 0) obj.bucketsPerDecade = Math.round(message.bucketsPerDecade);
|
|
2611
|
+
if (message.openmetrics !== false) obj.openmetrics = message.openmetrics;
|
|
2592
2612
|
return obj;
|
|
2593
2613
|
},
|
|
2594
2614
|
create(base) {
|
|
@@ -2597,6 +2617,8 @@ const PrometheusSnapshotRequest = {
|
|
|
2597
2617
|
fromPartial(object) {
|
|
2598
2618
|
const message = createBasePrometheusSnapshotRequest();
|
|
2599
2619
|
message.instance = object.instance ?? "";
|
|
2620
|
+
message.bucketsPerDecade = object.bucketsPerDecade ?? 0;
|
|
2621
|
+
message.openmetrics = object.openmetrics ?? false;
|
|
2600
2622
|
return message;
|
|
2601
2623
|
}
|
|
2602
2624
|
};
|
|
@@ -3557,11 +3579,12 @@ var UnsafeWasmResolver = class {
|
|
|
3557
3579
|
exports;
|
|
3558
3580
|
flushCount = 0;
|
|
3559
3581
|
constructor(module) {
|
|
3560
|
-
const { exports } = new WebAssembly.Instance(module, { wasm_msg: { wasm_msg_host_current_time: () => {
|
|
3582
|
+
const { exports } = new WebAssembly.Instance(module, { wasm_msg: { wasm_msg_host_current_time: (requestPtr) => {
|
|
3583
|
+
this.consumeRequest(requestPtr);
|
|
3561
3584
|
const epochMs = performance.timeOrigin + performance.now();
|
|
3562
3585
|
const seconds = Math.floor(epochMs / 1e3);
|
|
3563
3586
|
const nanos = Math.round((epochMs - seconds * 1e3) * 1e6);
|
|
3564
|
-
return this.
|
|
3587
|
+
return this.transferResponseSuccess({
|
|
3565
3588
|
seconds,
|
|
3566
3589
|
nanos
|
|
3567
3590
|
}, Timestamp);
|
|
@@ -3602,10 +3625,26 @@ var UnsafeWasmResolver = class {
|
|
|
3602
3625
|
this.consumeResponse(resPtr, Void);
|
|
3603
3626
|
}
|
|
3604
3627
|
prometheusSnapshot(instance) {
|
|
3605
|
-
const reqPtr = this.transferRequest({
|
|
3628
|
+
const reqPtr = this.transferRequest({
|
|
3629
|
+
instance,
|
|
3630
|
+
bucketsPerDecade: 0,
|
|
3631
|
+
openmetrics: false
|
|
3632
|
+
}, PrometheusSnapshotRequest);
|
|
3606
3633
|
const resPtr = this.exports.wasm_msg_guest_prometheus_snapshot(reqPtr);
|
|
3607
3634
|
return this.consumeResponse(resPtr, PrometheusSnapshotResponse).text;
|
|
3608
3635
|
}
|
|
3636
|
+
consumeRequest(ptr) {
|
|
3637
|
+
if (ptr === 0) return void 0;
|
|
3638
|
+
const { data } = this.consume(ptr, Request);
|
|
3639
|
+
return data;
|
|
3640
|
+
}
|
|
3641
|
+
transferResponseSuccess(value, codec) {
|
|
3642
|
+
const data = codec.encode(value).finish();
|
|
3643
|
+
return this.transfer({ data }, Response$1);
|
|
3644
|
+
}
|
|
3645
|
+
transferResponseError(error$1) {
|
|
3646
|
+
return this.transfer({ error: error$1 }, Response$1);
|
|
3647
|
+
}
|
|
3609
3648
|
transferRequest(value, codec) {
|
|
3610
3649
|
const data = codec.encode(value).finish();
|
|
3611
3650
|
return this.transfer({ data }, Request);
|