@spikard/wasm 0.7.0 → 0.7.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/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- export { Spikard, StreamingResponse, TestClient, background_exports as background, createFetchHandler, del, get, patch, post, put, route, runServer } from './chunk-DYTZ4RA2.mjs';
1
+ export { Spikard, StreamingResponse, TestClient, background_exports as background, createFetchHandler, del, get, patch, post, put, route, runServer } from './chunk-YO5KBN4A.mjs';
2
2
  //# sourceMappingURL=index.mjs.map
3
3
  //# sourceMappingURL=index.mjs.map
package/dist/node.js CHANGED
@@ -105,18 +105,19 @@ async function loadWasmBindings() {
105
105
  return wasmBindingsPromise;
106
106
  }
107
107
  wasmBindingsPromise = (async () => {
108
+ const distPath = "./spikard_wasm.js";
108
109
  const runtimePath = "../runtime/spikard_wasm.js";
109
110
  const webFallback = "../../../crates/spikard-wasm/dist-web/spikard_wasm.js";
110
111
  const nodeFallback = "../../../crates/spikard-wasm/dist-node/spikard_wasm.js";
111
112
  const preferNode = isNodeLikeEnvironment();
112
- const candidates = preferNode ? [nodeFallback, runtimePath, webFallback] : [runtimePath, webFallback, nodeFallback];
113
+ const candidates = preferNode ? [distPath, nodeFallback, runtimePath, webFallback] : [distPath, runtimePath, webFallback, nodeFallback];
113
114
  for (const candidate of candidates) {
114
115
  try {
115
116
  return await import(candidate);
116
117
  } catch {
117
118
  }
118
119
  }
119
- throw new Error("Failed to load WASM bindings (runtime, dist-web, dist-node).");
120
+ throw new Error("Failed to load WASM bindings (dist, runtime, dist-web, dist-node).");
120
121
  })();
121
122
  return wasmBindingsPromise;
122
123
  }