UNPKG

rucken

Version:

Console tools and scripts for nx and not only that I (EndyKaufman) use to automate the workflow and speed up the development process

59 lines 2.73 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VersionUpdaterCommands = void 0; const tslib_1 = require("tslib"); const nestjs_console_1 = require("../../nestjs-console"); const utils_service_1 = require("../utils/utils.service"); const tools_config_1 = require("./tools.config"); const version_updater_service_1 = require("./version-updater.service"); let VersionUpdaterCommands = class VersionUpdaterCommands { versionUpdaterService; utilsService; config = {}; constructor(versionUpdaterService, utilsService) { this.versionUpdaterService = versionUpdaterService; this.utilsService = utilsService; this.config = this.utilsService.getRuckenConfig(tools_config_1.DEFAULT_TOOLS_CONFIG) .versionUpdater; } async versionUpdater({ updatePackageVersion, updateDependenciesVersion, } = {}) { this.versionUpdaterService.setLogger(version_updater_service_1.VersionUpdaterService.title); const shouldUpdatePackageVersion = updatePackageVersion ? updatePackageVersion.toUpperCase().trim() === 'TRUE' : this.config.updatePackageVersion; const shouldUpdateDependenciesVersion = updateDependenciesVersion ? updateDependenciesVersion.toUpperCase().trim() === 'TRUE' : this.config.updateDependenciesVersion; this.versionUpdaterService.versionUpdaterHandler({ updatePackageVersion: shouldUpdatePackageVersion, updateDependenciesVersion: shouldUpdateDependenciesVersion, }); } }; exports.VersionUpdaterCommands = VersionUpdaterCommands; tslib_1.__decorate([ (0, nestjs_console_1.Command)({ alias: 'vu', command: 'version-updater', description: 'update versions in all nx applications', options: [ { flags: '--update-package-version [boolean]', description: 'update package version (default: true)', }, { flags: '--update-dependencies-version [boolean]', description: 'update dependencies version (default: true)', }, ], }), tslib_1.__metadata("design:type", Function), tslib_1.__metadata("design:paramtypes", [Object]), tslib_1.__metadata("design:returntype", Promise) ], VersionUpdaterCommands.prototype, "versionUpdater", null); exports.VersionUpdaterCommands = VersionUpdaterCommands = tslib_1.__decorate([ (0, nestjs_console_1.Console)(), tslib_1.__metadata("design:paramtypes", [version_updater_service_1.VersionUpdaterService, utils_service_1.UtilsService]) ], VersionUpdaterCommands); //# sourceMappingURL=version-updater.commands.js.map