Skip to content

Commit

Permalink
fix(shadcn): use system proxy settings (#3869)
Browse files Browse the repository at this point in the history
  • Loading branch information
pomeh committed Nov 28, 2024
1 parent 805ed41 commit ac92fd0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 31 deletions.
2 changes: 1 addition & 1 deletion packages/shadcn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@
"execa": "^7.0.0",
"fast-glob": "^3.3.2",
"fs-extra": "^11.1.0",
"https-proxy-agent": "^6.2.0",
"kleur": "^4.1.5",
"lodash.template": "^4.5.0",
"node-fetch": "^3.3.0",
"ora": "^6.1.2",
"postcss": "^8.4.24",
"prompts": "^2.4.2",
"proxy-agent": "^6.4.0",
"recast": "^0.23.2",
"stringify-object": "^5.0.0",
"ts-morph": "^18.0.0",
Expand Down
6 changes: 2 additions & 4 deletions packages/shadcn/src/utils/registry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ import {
} from "@/src/utils/registry/schema"
import { buildTailwindThemeColorsFromCssVars } from "@/src/utils/updaters/update-tailwind-config"
import deepmerge from "deepmerge"
import { HttpsProxyAgent } from "https-proxy-agent"
import { ProxyAgent } from 'proxy-agent'
import fetch from "node-fetch"
import { z } from "zod"

const REGISTRY_URL = process.env.REGISTRY_URL ?? "https://ui.shadcn.com/r"

const agent = process.env.https_proxy
? new HttpsProxyAgent(process.env.https_proxy)
: undefined
const agent = new ProxyAgent()

export async function getRegistryIndex() {
try {
Expand Down
52 changes: 26 additions & 26 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ac92fd0

Please sign in to comment.