Skip to content

Commit

Permalink
feat(turborepo): Add proxy support to create-turbo and turbo-gen (#5554)
Browse files Browse the repository at this point in the history
Co-authored-by: Greg Soltis <Greg Soltis>
  • Loading branch information
Greg Soltis authored Jul 19, 2023
1 parent 5ab8ac0 commit c78593b
Show file tree
Hide file tree
Showing 5 changed files with 180 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/create-turbo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"commander": "^10.0.0",
"fs-extra": "^10.1.0",
"inquirer": "^8.0.0",
"proxy-agent": "^6.2.2",
"rimraf": "^3.0.2",
"semver": "^7.3.8",
"update-check": "^1.5.4"
Expand Down
9 changes: 9 additions & 0 deletions packages/create-turbo/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ import { logger } from "@turbo/utils";
import { create } from "./commands";
import cliPkg from "../package.json";

import { ProxyAgent } from "proxy-agent";
import http from "http";
import https from "https";

// Support http proxy vars
const agent = new ProxyAgent();
http.globalAgent = agent;
https.globalAgent = agent;

const createTurboCli = new Command();

// create
Expand Down
1 change: 1 addition & 0 deletions packages/turbo-gen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"inquirer": "^8.2.4",
"minimatch": "^9.0.0",
"node-plop": "^0.26.3",
"proxy-agent": "^6.2.2",
"semver": "^7.3.8",
"ts-node": "^10.9.1",
"update-check": "^1.5.4",
Expand Down
9 changes: 9 additions & 0 deletions packages/turbo-gen/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ import { workspace, run, raw } from "./commands";
import cliPkg from "../package.json";
import { GeneratorError } from "./utils/error";

import { ProxyAgent } from "proxy-agent";
import http from "http";
import https from "https";

// Support http proxy vars
const agent = new ProxyAgent();
http.globalAgent = agent;
https.globalAgent = agent;

const turboGenCli = new Command();

turboGenCli
Expand Down
Loading

1 comment on commit c78593b

@vercel
Copy link

@vercel vercel bot commented on c78593b Jul 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.