@spotify-confidence/openfeature-server-provider-local 0.11.2 → 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.
@@ -1421,7 +1421,7 @@ function isObject(value) {
1421
1421
  function isSet$3(value) {
1422
1422
  return value !== null && value !== void 0;
1423
1423
  }
1424
- const VERSION = "0.11.2";
1424
+ const VERSION = "0.12.0";
1425
1425
  const NOOP_LOG_FN = Object.assign(() => {}, { enabled: false });
1426
1426
  const debugBackend = loadDebug();
1427
1427
  const logger$2 = new class LoggerImpl {
@@ -2562,11 +2562,17 @@ const Response$1 = {
2562
2562
  }
2563
2563
  };
2564
2564
  function createBasePrometheusSnapshotRequest() {
2565
- return { instance: "" };
2565
+ return {
2566
+ instance: "",
2567
+ bucketsPerDecade: 0,
2568
+ openmetrics: false
2569
+ };
2566
2570
  }
2567
2571
  const PrometheusSnapshotRequest = {
2568
2572
  encode(message, writer = new BinaryWriter()) {
2569
2573
  if (message.instance !== "") writer.uint32(10).string(message.instance);
2574
+ if (message.bucketsPerDecade !== 0) writer.uint32(16).uint32(message.bucketsPerDecade);
2575
+ if (message.openmetrics !== false) writer.uint32(24).bool(message.openmetrics);
2570
2576
  return writer;
2571
2577
  },
2572
2578
  decode(input, length) {
@@ -2580,6 +2586,14 @@ const PrometheusSnapshotRequest = {
2580
2586
  if (tag !== 10) break;
2581
2587
  message.instance = reader.string();
2582
2588
  continue;
2589
+ case 2:
2590
+ if (tag !== 16) break;
2591
+ message.bucketsPerDecade = reader.uint32();
2592
+ continue;
2593
+ case 3:
2594
+ if (tag !== 24) break;
2595
+ message.openmetrics = reader.bool();
2596
+ continue;
2583
2597
  }
2584
2598
  if ((tag & 7) === 4 || tag === 0) break;
2585
2599
  reader.skip(tag & 7);
@@ -2587,11 +2601,17 @@ const PrometheusSnapshotRequest = {
2587
2601
  return message;
2588
2602
  },
2589
2603
  fromJSON(object) {
2590
- return { instance: isSet$1(object.instance) ? globalThis.String(object.instance) : "" };
2604
+ return {
2605
+ instance: isSet$1(object.instance) ? globalThis.String(object.instance) : "",
2606
+ bucketsPerDecade: isSet$1(object.bucketsPerDecade) ? globalThis.Number(object.bucketsPerDecade) : 0,
2607
+ openmetrics: isSet$1(object.openmetrics) ? globalThis.Boolean(object.openmetrics) : false
2608
+ };
2591
2609
  },
2592
2610
  toJSON(message) {
2593
2611
  const obj = {};
2594
2612
  if (message.instance !== "") obj.instance = message.instance;
2613
+ if (message.bucketsPerDecade !== 0) obj.bucketsPerDecade = Math.round(message.bucketsPerDecade);
2614
+ if (message.openmetrics !== false) obj.openmetrics = message.openmetrics;
2595
2615
  return obj;
2596
2616
  },
2597
2617
  create(base) {
@@ -2600,6 +2620,8 @@ const PrometheusSnapshotRequest = {
2600
2620
  fromPartial(object) {
2601
2621
  const message = createBasePrometheusSnapshotRequest();
2602
2622
  message.instance = object.instance ?? "";
2623
+ message.bucketsPerDecade = object.bucketsPerDecade ?? 0;
2624
+ message.openmetrics = object.openmetrics ?? false;
2603
2625
  return message;
2604
2626
  }
2605
2627
  };
@@ -3606,7 +3628,11 @@ var UnsafeWasmResolver = class {
3606
3628
  this.consumeResponse(resPtr, Void);
3607
3629
  }
3608
3630
  prometheusSnapshot(instance) {
3609
- const reqPtr = this.transferRequest({ instance }, PrometheusSnapshotRequest);
3631
+ const reqPtr = this.transferRequest({
3632
+ instance,
3633
+ bucketsPerDecade: 0,
3634
+ openmetrics: false
3635
+ }, PrometheusSnapshotRequest);
3610
3636
  const resPtr = this.exports.wasm_msg_guest_prometheus_snapshot(reqPtr);
3611
3637
  return this.consumeResponse(resPtr, PrometheusSnapshotResponse).text;
3612
3638
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spotify-confidence/openfeature-server-provider-local",
3
- "version": "0.11.2",
3
+ "version": "0.12.0",
4
4
  "description": "Spotify Confidence Open Feature provider",
5
5
  "type": "module",
6
6
  "files": [