@ai-sdk/provider-utils 4.0.42 → 4.0.44
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 +13 -0
- package/dist/index.js +5 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/safe-node-fetch.ts +11 -18
package/dist/index.mjs
CHANGED
|
@@ -475,12 +475,10 @@ async function loadNodeModule(id) {
|
|
|
475
475
|
var _a2;
|
|
476
476
|
const processWithBuiltins = globalThis.process;
|
|
477
477
|
const builtinModule = (_a2 = processWithBuiltins == null ? void 0 : processWithBuiltins.getBuiltinModule) == null ? void 0 : _a2.call(processWithBuiltins, id);
|
|
478
|
-
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
dynamicImport != null ? dynamicImport : dynamicImport = Function("specifier", "return import(specifier)");
|
|
483
|
-
return dynamicImport(id);
|
|
478
|
+
if (builtinModule == null) {
|
|
479
|
+
throw new Error(`Node.js built-in module ${id} is unavailable`);
|
|
480
|
+
}
|
|
481
|
+
return builtinModule;
|
|
484
482
|
}
|
|
485
483
|
function getCurrentModulePath() {
|
|
486
484
|
const originalPrepareStackTrace = Error.prepareStackTrace;
|
|
@@ -791,7 +789,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
|
|
|
791
789
|
}
|
|
792
790
|
|
|
793
791
|
// src/version.ts
|
|
794
|
-
var VERSION = true ? "4.0.
|
|
792
|
+
var VERSION = true ? "4.0.44" : "0.0.0-test";
|
|
795
793
|
|
|
796
794
|
// src/get-from-api.ts
|
|
797
795
|
var getOriginalFetch = () => globalThis.fetch;
|