Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(turborepo): Add proxy support to create-turbo and turbo-gen #5554

Merged
merged 2 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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