File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,9 @@ function getUserAgent() {
4848 // `navigator.userAgent` is available in Node.js 21 and later.
4949 // It's also part of the WinterCG spec, so many edge runtimes provide it.
5050 // https://common-min-api.proposal.wintercg.org/#requirements-for-navigatoruseragent
51+ // @ts-ignore
5152 if (typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string') {
53+ // @ts-ignore
5254 ua += ` ${navigator.userAgent}`;
5355
5456 // Older Node.js versions don't have `navigator.userAgent`, so we have to use `process.version`.
@@ -62,8 +64,6 @@ function getUserAgent() {
6264class Client {
6365 static CHUNK_SIZE = 1024 * 1024 * 5;
6466
65- fetch = nodeFetch;
66-
6767 config = {
6868 endpoint: '{{ spec .endpoint }}',
6969 selfSigned: false,
@@ -105,6 +105,7 @@ class Client {
105105 * @returns {this}
106106 */
107107 setSelfSigned(selfSigned: boolean): this {
108+ // @ts-ignore
108109 if (typeof globalThis.EdgeRuntime !== 'undefined') {
109110 console.warn('setSelfSigned is not supported in edge runtimes.');
110111 }
Original file line number Diff line number Diff line change 1- import { File } from "node-fetch-native";
1+ import { File } from "node-fetch-native-with-agent ";
22import { realpathSync, readFileSync } from "fs";
33import type { BinaryLike } from "crypto";
44
You can’t perform that action at this time.
0 commit comments