@upstash/redis 1.16.0-next.2 → 1.16.0-next.3
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/esm/pkg/http.js
CHANGED
|
@@ -31,7 +31,7 @@ export class HttpClient {
|
|
|
31
31
|
"Upstash-Encoding": "base64",
|
|
32
32
|
...config.headers,
|
|
33
33
|
};
|
|
34
|
-
this.options = { backend: config.options?.backend };
|
|
34
|
+
this.options = { backend: config.options?.backend, agent: config.agent };
|
|
35
35
|
if (typeof config?.retry === "boolean" && config?.retry === false) {
|
|
36
36
|
this.retry = {
|
|
37
37
|
attempts: 1,
|
|
@@ -52,6 +52,7 @@ export class HttpClient {
|
|
|
52
52
|
headers: this.headers,
|
|
53
53
|
body: JSON.stringify(req.body),
|
|
54
54
|
keepalive: true,
|
|
55
|
+
agent: this.options?.agent,
|
|
55
56
|
/**
|
|
56
57
|
* Fastly specific
|
|
57
58
|
*/
|
package/esm/platforms/nodejs.js
CHANGED
|
@@ -24,7 +24,7 @@ export class Redis extends core.Redis {
|
|
|
24
24
|
baseUrl: configOrRequester.url,
|
|
25
25
|
retry: configOrRequester.retry,
|
|
26
26
|
headers: { authorization: `Bearer ${configOrRequester.token}` },
|
|
27
|
-
|
|
27
|
+
agent: configOrRequester.agent,
|
|
28
28
|
});
|
|
29
29
|
super(client, {
|
|
30
30
|
automaticDeserialization: configOrRequester.automaticDeserialization,
|
package/package.json
CHANGED
package/script/pkg/http.js
CHANGED
|
@@ -34,7 +34,7 @@ class HttpClient {
|
|
|
34
34
|
"Upstash-Encoding": "base64",
|
|
35
35
|
...config.headers,
|
|
36
36
|
};
|
|
37
|
-
this.options = { backend: config.options?.backend };
|
|
37
|
+
this.options = { backend: config.options?.backend, agent: config.agent };
|
|
38
38
|
if (typeof config?.retry === "boolean" && config?.retry === false) {
|
|
39
39
|
this.retry = {
|
|
40
40
|
attempts: 1,
|
|
@@ -55,6 +55,7 @@ class HttpClient {
|
|
|
55
55
|
headers: this.headers,
|
|
56
56
|
body: JSON.stringify(req.body),
|
|
57
57
|
keepalive: true,
|
|
58
|
+
agent: this.options?.agent,
|
|
58
59
|
/**
|
|
59
60
|
* Fastly specific
|
|
60
61
|
*/
|
|
@@ -50,7 +50,7 @@ class Redis extends core.Redis {
|
|
|
50
50
|
baseUrl: configOrRequester.url,
|
|
51
51
|
retry: configOrRequester.retry,
|
|
52
52
|
headers: { authorization: `Bearer ${configOrRequester.token}` },
|
|
53
|
-
|
|
53
|
+
agent: configOrRequester.agent,
|
|
54
54
|
});
|
|
55
55
|
super(client, {
|
|
56
56
|
automaticDeserialization: configOrRequester.automaticDeserialization,
|
package/types/pkg/http.d.ts
CHANGED
|
@@ -37,12 +37,14 @@ export declare type HttpClientConfig = {
|
|
|
37
37
|
baseUrl: string;
|
|
38
38
|
options?: Options;
|
|
39
39
|
retry?: RetryConfig;
|
|
40
|
+
agent?: any;
|
|
40
41
|
};
|
|
41
42
|
export declare class HttpClient implements Requester {
|
|
42
43
|
baseUrl: string;
|
|
43
44
|
headers: Record<string, string>;
|
|
44
45
|
readonly options?: {
|
|
45
46
|
backend?: string;
|
|
47
|
+
agent: any;
|
|
46
48
|
};
|
|
47
49
|
readonly retry: {
|
|
48
50
|
attempts: number;
|