supabase 1.93.2 → 1.95.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supabase",
3
- "version": "1.93.2",
3
+ "version": "1.95.0",
4
4
  "description": "Supabase CLI",
5
5
  "repository": "supabase/cli",
6
6
  "homepage": "https://supabase.com/docs/reference/cli",
@@ -23,6 +23,7 @@
23
23
  "dependencies": {
24
24
  "bin-links": "^4.0.1",
25
25
  "node-fetch": "^3.2.10",
26
+ "proxy-agent": "^6.3.1",
26
27
  "tar": "6.1.15"
27
28
  },
28
29
  "release": {
@@ -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 { ProxyAgent } from "proxy-agent";
11
12
  import path from "path";
12
13
  import tar from "tar";
13
14
  import zlib from "zlib";
@@ -63,7 +64,7 @@ const parsePackageJson = (packageJson) => {
63
64
  return { binPath, url };
64
65
  };
65
66
 
66
- const fetchAndParseCheckSumFile = async (packageJson) => {
67
+ const fetchAndParseCheckSumFile = async (packageJson, agent) => {
67
68
  const version = packageJson.version;
68
69
  const pkgName = packageJson.name;
69
70
  const repo = packageJson.repository;
@@ -71,7 +72,7 @@ const fetchAndParseCheckSumFile = async (packageJson) => {
71
72
 
72
73
  // Fetch the checksum file
73
74
  console.info("Downloading", checksumFileUrl);
74
- const response = await fetch(checksumFileUrl);
75
+ const response = await fetch(checksumFileUrl, { agent });
75
76
  if (response.ok) {
76
77
  const checkSumContent = await response.text();
77
78
  const lines = checkSumContent.split("\n");
@@ -123,11 +124,12 @@ async function main() {
123
124
  const untar = tar.x({ cwd: binDir }, [binName]);
124
125
 
125
126
  console.info("Downloading", url);
126
- const resp = await fetch(url);
127
+ const agent = new ProxyAgent();
128
+ const resp = await fetch(url, { agent });
127
129
 
128
130
  const hash = createHash("sha256");
129
131
  const pkgNameWithPlatform = `${pkg.name}_${platform}_${arch}.tar.gz`;
130
- const checksumMap = await fetchAndParseCheckSumFile(pkg);
132
+ const checksumMap = await fetchAndParseCheckSumFile(pkg, agent);
131
133
 
132
134
  resp.body
133
135
  .on("data", (chunk) => {