supabase 1.129.0 → 1.129.2
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/package.json +1 -1
- package/scripts/postinstall.js +7 -1
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -8,6 +8,7 @@ import binLinks from "bin-links";
|
|
|
8
8
|
import { createHash } from "crypto";
|
|
9
9
|
import fs from "fs";
|
|
10
10
|
import fetch from "node-fetch";
|
|
11
|
+
import { Agent } from "https";
|
|
11
12
|
import { HttpsProxyAgent } from "https-proxy-agent";
|
|
12
13
|
import path from "path";
|
|
13
14
|
import tar from "tar";
|
|
@@ -128,7 +129,12 @@ async function main() {
|
|
|
128
129
|
process.env.npm_config_https_proxy ||
|
|
129
130
|
process.env.npm_config_http_proxy ||
|
|
130
131
|
process.env.npm_config_proxy;
|
|
131
|
-
|
|
132
|
+
|
|
133
|
+
// Keeps the TCP connection alive when sending multiple requests
|
|
134
|
+
// Ref: https://github.com/node-fetch/node-fetch/issues/1735
|
|
135
|
+
const agent = proxyUrl
|
|
136
|
+
? new HttpsProxyAgent(proxyUrl, { keepAlive: true })
|
|
137
|
+
: new Agent({ keepAlive: true });
|
|
132
138
|
const resp = await fetch(url, { agent });
|
|
133
139
|
|
|
134
140
|
const hash = createHash("sha256");
|