Skip to content

Commit

Permalink
Add new command proxy and flags
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSaini101 committed Dec 9, 2024
1 parent 1ce4e9a commit a501e92
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/commands/config/proxy.ts
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);
}
}
12 changes: 12 additions & 0 deletions src/core/flags/config/proxy.flags.ts
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' }),

};
};

0 comments on commit a501e92

Please sign in to comment.