From 3985bdc59e658f6b8b615236e83dbd43d48bb15d Mon Sep 17 00:00:00 2001 From: raj pandey Date: Tue, 10 Oct 2023 16:46:08 +0530 Subject: [PATCH] fix for warning message. --- packages/contentstack-auth/src/base-command.ts | 11 ----------- packages/contentstack-config/src/base-command.ts | 10 ---------- 2 files changed, 21 deletions(-) diff --git a/packages/contentstack-auth/src/base-command.ts b/packages/contentstack-auth/src/base-command.ts index b621c6b85a..76188417bb 100644 --- a/packages/contentstack-auth/src/base-command.ts +++ b/packages/contentstack-auth/src/base-command.ts @@ -9,8 +9,6 @@ export abstract class BaseCommand extends Command { protected args!: Args; protected flags!: Flags; - // NOTE define flags that can be inherited by any command that extends BaseCommand - static baseFlags: FlagInput = {}; /** * The `init` function initializes the command by parsing arguments and flags, registering search @@ -18,15 +16,6 @@ export abstract class BaseCommand extends Command { */ public async init(): Promise { await super.init(); - const { args, flags } = await this.parse({ - flags: this.ctor.flags, - baseFlags: (super.ctor as typeof BaseCommand).baseFlags, - args: this.ctor.args, - strict: this.ctor.strict, - }); - this.flags = flags as Flags; - this.args = args as Args; - // Init logger this.logger = new LoggerService(process.cwd(), 'cli-log'); } diff --git a/packages/contentstack-config/src/base-command.ts b/packages/contentstack-config/src/base-command.ts index 5e123e111e..a1100c2669 100644 --- a/packages/contentstack-config/src/base-command.ts +++ b/packages/contentstack-config/src/base-command.ts @@ -9,8 +9,6 @@ export abstract class BaseCommand extends Command { protected args!: Args; protected flags!: Flags; - // NOTE define flags that canin be inherited by any command that extends BaseCommand - static baseFlags: FlagInput = {}; static args: ArgInput<{ [arg: string]: any; }>; /** * The `init` function initializes the command by parsing arguments and flags, registering search @@ -18,14 +16,6 @@ export abstract class BaseCommand extends Command { */ public async init(): Promise { await super.init(); - const { args, flags } = await this.parse({ - flags: this.ctor.flags, - baseFlags: (super.ctor as typeof BaseCommand).baseFlags, - args: this.ctor.args, - strict: this.ctor.strict, - }); - this.flags = flags as Flags; - this.args = args as Args; // Init logger this.logger = new LoggerService(process.cwd(), 'cli-log');