@spotify-confidence/openfeature-server-provider-local 0.11.1 → 0.11.2
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 +7 -0
- package/dist/confidence_resolver.wasm +0 -0
- package/dist/index.fetch.js +16 -3
- package/dist/index.inlined.js +17 -4
- package/dist/index.node.js +16 -3
- package/package.json +1 -1
package/dist/index.node.js
CHANGED
|
@@ -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.
|
|
1424
|
+
const VERSION = "0.11.2";
|
|
1425
1425
|
const NOOP_LOG_FN = Object.assign(() => {}, { enabled: false });
|
|
1426
1426
|
const debugBackend = loadDebug();
|
|
1427
1427
|
const logger$2 = new class LoggerImpl {
|
|
@@ -3560,11 +3560,12 @@ var UnsafeWasmResolver = class {
|
|
|
3560
3560
|
exports;
|
|
3561
3561
|
flushCount = 0;
|
|
3562
3562
|
constructor(module) {
|
|
3563
|
-
const { exports } = new WebAssembly.Instance(module, { wasm_msg: { wasm_msg_host_current_time: () => {
|
|
3563
|
+
const { exports } = new WebAssembly.Instance(module, { wasm_msg: { wasm_msg_host_current_time: (requestPtr) => {
|
|
3564
|
+
this.consumeRequest(requestPtr);
|
|
3564
3565
|
const epochMs = performance.timeOrigin + performance.now();
|
|
3565
3566
|
const seconds = Math.floor(epochMs / 1e3);
|
|
3566
3567
|
const nanos = Math.round((epochMs - seconds * 1e3) * 1e6);
|
|
3567
|
-
return this.
|
|
3568
|
+
return this.transferResponseSuccess({
|
|
3568
3569
|
seconds,
|
|
3569
3570
|
nanos
|
|
3570
3571
|
}, Timestamp);
|
|
@@ -3609,6 +3610,18 @@ var UnsafeWasmResolver = class {
|
|
|
3609
3610
|
const resPtr = this.exports.wasm_msg_guest_prometheus_snapshot(reqPtr);
|
|
3610
3611
|
return this.consumeResponse(resPtr, PrometheusSnapshotResponse).text;
|
|
3611
3612
|
}
|
|
3613
|
+
consumeRequest(ptr) {
|
|
3614
|
+
if (ptr === 0) return void 0;
|
|
3615
|
+
const { data } = this.consume(ptr, Request);
|
|
3616
|
+
return data;
|
|
3617
|
+
}
|
|
3618
|
+
transferResponseSuccess(value, codec) {
|
|
3619
|
+
const data = codec.encode(value).finish();
|
|
3620
|
+
return this.transfer({ data }, Response$1);
|
|
3621
|
+
}
|
|
3622
|
+
transferResponseError(error$1) {
|
|
3623
|
+
return this.transfer({ error: error$1 }, Response$1);
|
|
3624
|
+
}
|
|
3612
3625
|
transferRequest(value, codec) {
|
|
3613
3626
|
const data = codec.encode(value).finish();
|
|
3614
3627
|
return this.transfer({ data }, Request);
|