1 | "use strict";
|
2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4 | return new (P || (P = Promise))(function (resolve, reject) {
|
5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8 | step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9 | });
|
10 | };
|
11 | Object.defineProperty(exports, "__esModule", { value: true });
|
12 | const abstract_command_1 = require("./abstract.command");
|
13 | class UpdateCommand extends abstract_command_1.AbstractCommand {
|
14 | load(program) {
|
15 | program
|
16 | .command('update')
|
17 | .alias('u')
|
18 | .description('Update Nest dependencies.')
|
19 | .option('-f, --force', 'Remove and re-install dependencies (instead of update).')
|
20 | .option('-t, --tag <tag>', 'Upgrade to tagged packages (latest | beta | rc | next tag).')
|
21 | .action((command) => __awaiter(this, void 0, void 0, function* () {
|
22 | const options = [];
|
23 | options.push({ name: 'force', value: !!command.force });
|
24 | options.push({ name: 'tag', value: command.tag });
|
25 | yield this.action.handle([], options);
|
26 | }));
|
27 | }
|
28 | }
|
29 | exports.UpdateCommand = UpdateCommand;
|