signal-desktop/patches/node-fetch+2.6.7.patch

100 lines
3.1 KiB
Diff
Raw Normal View History

diff --git a/node_modules/node-fetch/lib/index.es.js b/node_modules/node-fetch/lib/index.es.js
2022-02-11 19:32:37 +00:00
index 4852f7c..ae9611f 100644
--- a/node_modules/node-fetch/lib/index.es.js
+++ b/node_modules/node-fetch/lib/index.es.js
2022-02-11 19:32:37 +00:00
@@ -1253,6 +1253,9 @@ class Request {
2020-11-13 19:57:55 +00:00
this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
this.counter = init.counter || input.counter || 0;
this.agent = init.agent || input.agent;
+
+ // Custom Signal Desktop option
+ this.ca = init.ca || input.ca;
}
get method() {
2022-02-11 19:32:37 +00:00
@@ -1372,7 +1375,7 @@ function getNodeRequestOptions(request) {
2020-11-13 19:57:55 +00:00
method: request.method,
headers: exportNodeCompatibleHeaders(headers),
agent
- });
+ }, request.ca ? { ca: request.ca } : {});
}
/**
2022-02-11 19:32:37 +00:00
@@ -1556,7 +1559,8 @@ function fetch(url, opts) {
2020-11-13 19:57:55 +00:00
body: request.body,
signal: request.signal,
timeout: request.timeout,
- size: request.size
+ size: request.size,
+ ca: request.ca,
};
2022-02-11 19:32:37 +00:00
if (!isDomainOrSubdomain(request.url, locationURL)) {
diff --git a/node_modules/node-fetch/lib/index.js b/node_modules/node-fetch/lib/index.js
2022-02-11 19:32:37 +00:00
index e5b04f1..ed8d34a 100644
--- a/node_modules/node-fetch/lib/index.js
+++ b/node_modules/node-fetch/lib/index.js
2022-02-11 19:32:37 +00:00
@@ -1257,6 +1257,9 @@ class Request {
2020-11-13 19:57:55 +00:00
this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
this.counter = init.counter || input.counter || 0;
this.agent = init.agent || input.agent;
+
+ // Custom Signal Desktop option
+ this.ca = init.ca || input.ca;
}
get method() {
2022-02-11 19:32:37 +00:00
@@ -1376,7 +1379,7 @@ function getNodeRequestOptions(request) {
2020-11-13 19:57:55 +00:00
method: request.method,
headers: exportNodeCompatibleHeaders(headers),
agent
- });
+ }, request.ca ? { ca: request.ca } : {});
}
/**
2022-02-11 19:32:37 +00:00
@@ -1560,7 +1563,8 @@ function fetch(url, opts) {
2020-11-13 19:57:55 +00:00
body: request.body,
signal: request.signal,
timeout: request.timeout,
- size: request.size
+ size: request.size,
+ ca: request.ca,
};
2022-02-11 19:32:37 +00:00
if (!isDomainOrSubdomain(request.url, locationURL)) {
diff --git a/node_modules/node-fetch/lib/index.mjs b/node_modules/node-fetch/lib/index.mjs
2022-02-11 19:32:37 +00:00
index 49ee05e..bc639aa 100644
--- a/node_modules/node-fetch/lib/index.mjs
+++ b/node_modules/node-fetch/lib/index.mjs
2022-02-11 19:32:37 +00:00
@@ -1251,6 +1251,9 @@ class Request {
2020-11-13 19:57:55 +00:00
this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
this.counter = init.counter || input.counter || 0;
this.agent = init.agent || input.agent;
+
+ // Custom Signal Desktop option
+ this.ca = init.ca || input.ca;
}
get method() {
2022-02-11 19:32:37 +00:00
@@ -1370,7 +1373,7 @@ function getNodeRequestOptions(request) {
method: request.method,
headers: exportNodeCompatibleHeaders(headers),
agent
- });
+ }, request.ca ? { ca: request.ca } : {});
}
/**
@@ -1554,7 +1557,8 @@ function fetch(url, opts) {
2020-11-13 19:57:55 +00:00
body: request.body,
signal: request.signal,
timeout: request.timeout,
- size: request.size
+ size: request.size,
+ ca: request.ca,
};
2022-02-11 19:32:37 +00:00
if (!isDomainOrSubdomain(request.url, locationURL)) {