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() {
48
48
// `navigator.userAgent` is available in Node.js 21 and later.
49
49
// It's also part of the WinterCG spec, so many edge runtimes provide it.
50
50
// https://common-min-api.proposal.wintercg.org/#requirements-for-navigatoruseragent
51
+ // @ts-ignore
51
52
if (typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string') {
53
+ // @ts-ignore
52
54
ua += ` ${navigator.userAgent}`;
53
55
54
56
// Older Node.js versions don't have `navigator.userAgent`, so we have to use `process.version`.
@@ -62,8 +64,6 @@ function getUserAgent() {
62
64
class Client {
63
65
static CHUNK_SIZE = 1024 * 1024 * 5;
64
66
65
- fetch = nodeFetch;
66
-
67
67
config = {
68
68
endpoint: '{{ spec .endpoint }}',
69
69
selfSigned: false,
@@ -105,6 +105,7 @@ class Client {
105
105
* @returns {this}
106
106
*/
107
107
setSelfSigned(selfSigned: boolean): this {
108
+ // @ts-ignore
108
109
if (typeof globalThis.EdgeRuntime !== 'undefined') {
109
110
console.warn('setSelfSigned is not supported in edge runtimes.');
110
111
}
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 ";
2
2
import { realpathSync, readFileSync } from "fs";
3
3
import type { BinaryLike } from "crypto";
4
4
You can’t perform that action at this time.
0 commit comments