@superfaceai/one-sdk
Advanced tools
Comparing version 3.0.0-beta.18 to 3.0.0-beta.19
@@ -13,6 +13,10 @@ import fs from 'node:fs/promises'; | ||
const url = new URL('../assets/core-async.wasm', import.meta.url); | ||
// resolve in case we get a relative path, like with next | ||
let path = url.pathname; | ||
if (path.charAt(0) !== '/') { | ||
// when bundled with webpack (in nextjs at least), we get an invalid URL here where only the pathname is filled in | ||
// this pathname is additionally relative, so we must resolve it | ||
path = resolvePath(path); | ||
} | ||
// reconstruct the URL but only as a string and have node parse it using platform-specific code | ||
// if we reconstructed it as URL here we would get an mismatch because somehow there are two URL classes when bundled for next | ||
const path = resolvePath(url.pathname); | ||
// reconstruct the URL but only as a string and have node parse it using platform-specific code | ||
return fileURLToPath(`file://${path}`); | ||
@@ -19,0 +23,0 @@ } |
{ | ||
"name": "@superfaceai/one-sdk", | ||
"version": "3.0.0-beta.18", | ||
"version": "3.0.0-beta.19", | ||
"exports": { | ||
@@ -5,0 +5,0 @@ ".": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5327228
1583