feat(sat): parchea librería SAT para soportar agente proxy
- HttpsWebClient acepta un cuarto parámetro opcional 'agent'. - El agente se pasa a https.request() para tunelar conexiones. - Mantiene el parche anterior de fallback para getResponse.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/build/index.js b/build/index.js
|
||||
index bf7a6aafce966c4ab44ba3abb240578cc68779d6..4678df8734b098f20c7e14d8593bd4328fe759d8 100644
|
||||
index bf7a6aafce966c4ab44ba3abb240578cc68779d6..df01102262bbe6d544a5a1b4453977be8a826d0d 100644
|
||||
--- a/build/index.js
|
||||
+++ b/build/index.js
|
||||
@@ -266,7 +266,13 @@ var ServiceConsumer = class _ServiceConsumer {
|
||||
@@ -17,3 +17,27 @@ index bf7a6aafce966c4ab44ba3abb240578cc68779d6..4678df8734b098f20c7e14d8593bd432
|
||||
}
|
||||
this.checkErrors(request, response, exception);
|
||||
return response.getBody();
|
||||
@@ -2660,10 +2666,12 @@ var HttpsWebClient = class {
|
||||
_fireRequestClosure;
|
||||
_fireResponseClosure;
|
||||
_timeout;
|
||||
- constructor(onFireRequest, onFireResponse, timeout) {
|
||||
+ _agent;
|
||||
+ constructor(onFireRequest, onFireResponse, timeout, agent = void 0) {
|
||||
this._fireRequestClosure = onFireRequest;
|
||||
this._fireResponseClosure = onFireResponse;
|
||||
this._timeout = timeout;
|
||||
+ this._agent = agent;
|
||||
}
|
||||
fireRequest(request) {
|
||||
if (this._fireRequestClosure) {
|
||||
@@ -2679,7 +2687,8 @@ var HttpsWebClient = class {
|
||||
const options = {
|
||||
method: request.getMethod(),
|
||||
headers: request.getHeaders(),
|
||||
- timeout: this._timeout ?? request.getTimeout() ?? void 0
|
||||
+ timeout: this._timeout ?? request.getTimeout() ?? void 0,
|
||||
+ agent: this._agent
|
||||
};
|
||||
return new Promise((resolve, reject) => {
|
||||
let clientRequest;
|
||||
|
||||
Reference in New Issue
Block a user