diff --git a/actions/index.ts b/actions/index.ts index e70c1eabd..bc3eb35bd 100644 --- a/actions/index.ts +++ b/actions/index.ts @@ -3,6 +3,5 @@ export * from './build.action'; export * from './generate.action'; export * from './info.action'; export * from './new.action'; -export * from './update.action'; export * from './start.action'; export * from './add.action'; diff --git a/actions/update.action.ts b/actions/update.action.ts deleted file mode 100644 index 803ce66c1..000000000 --- a/actions/update.action.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Input } from '../commands'; -import { NestDependencyManager } from '../lib/dependency-managers'; -import { PackageManagerFactory } from '../lib/package-managers'; -import { AbstractAction } from './abstract.action'; - -export class UpdateAction extends AbstractAction { - public async handle(inputs: Input[], options: Input[]) { - const force = options.find((option) => option.name === 'force') as Input; - const tag = options.find((option) => option.name === 'tag') as Input; - - const manager = new NestDependencyManager( - await PackageManagerFactory.find(), - ); - await manager.update(force.value as boolean, tag.value as string); - } -} diff --git a/commands/command.loader.ts b/commands/command.loader.ts index 266547b53..d73a7d849 100644 --- a/commands/command.loader.ts +++ b/commands/command.loader.ts @@ -7,7 +7,6 @@ import { InfoAction, NewAction, StartAction, - UpdateAction, } from '../actions'; import { ERROR_PREFIX } from '../lib/ui'; import { AddCommand } from './add.command'; @@ -16,14 +15,12 @@ import { GenerateCommand } from './generate.command'; import { InfoCommand } from './info.command'; import { NewCommand } from './new.command'; import { StartCommand } from './start.command'; -import { UpdateCommand } from './update.command'; export class CommandLoader { public static load(program: CommanderStatic): void { new NewCommand(new NewAction()).load(program); new BuildCommand(new BuildAction()).load(program); new StartCommand(new StartAction()).load(program); new InfoCommand(new InfoAction()).load(program); - new UpdateCommand(new UpdateAction()).load(program); new AddCommand(new AddAction()).load(program); new GenerateCommand(new GenerateAction()).load(program); diff --git a/commands/update.command.ts b/commands/update.command.ts deleted file mode 100644 index ddbc25767..000000000 --- a/commands/update.command.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Command, CommanderStatic } from 'commander'; -import { AbstractCommand } from './abstract.command'; -import { Input } from './command.input'; - -export class UpdateCommand extends AbstractCommand { - public load(program: CommanderStatic) { - program - .command('update') - .alias('u') - .description('Update Nest dependencies.') - .option( - '-f, --force', - 'Remove and re-install dependencies (instead of update).', - ) - .option( - '-t, --tag ', - 'Upgrade to tagged packages (latest | beta | rc | next tag).', - ) - .action(async (command: Command) => { - const options: Input[] = []; - options.push({ name: 'force', value: !!command.force }); - options.push({ name: 'tag', value: command.tag }); - await this.action.handle([], options); - }); - } -}