-
-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ce4e9a
commit a501e92
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import Command from '../../core/base'; | ||
import {proxyFlags} from '../../core/flags/config/proxy.flags'; | ||
|
||
export default class Proxy extends Command { | ||
static description = 'Add the proxy support in the CLI.'; | ||
|
||
static flags = proxyFlags(); | ||
|
||
async run() { | ||
const { args, flags } = await this.parse(Proxy); //NOSONAR | ||
console.log(args); | ||
console.log(flags); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Flags } from '@oclif/core'; | ||
|
||
export const proxyFlags = () => { | ||
return { | ||
help: Flags.help({ char: 'h' }), | ||
http_proxy: Flags.string({ string: 'http_proxy', description: 'add http_proxy', default: '' }), | ||
https_proxy: Flags.string({ string: 'https_proxy', description: 'add https_proxy', default: '' }), | ||
no_proxy: Flags.string({ string: 'no_proxy', description: 'remove all the proxies from the env' }), | ||
|
||
}; | ||
}; | ||
|