diff --git a/src/commands/config/proxy.ts b/src/commands/config/proxy.ts new file mode 100644 index 00000000000..773a6d337b4 --- /dev/null +++ b/src/commands/config/proxy.ts @@ -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); + } +} diff --git a/src/core/flags/config/proxy.flags.ts b/src/core/flags/config/proxy.flags.ts new file mode 100644 index 00000000000..3bbac3b5cd3 --- /dev/null +++ b/src/core/flags/config/proxy.flags.ts @@ -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' }), + + }; +}; +