"use strict";
/**
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateToV22 = updateToV22;
exports.postUpdate = postUpdate;
const schematics_1 = require("@angular/cdk/schematics");
const migrations_1 = require("./migrations");
const upgrade_data_1 = require("./upgrade-data");
const upgrade_rules_1 = require("./upgrade-rules");
function updateToV22() {
    return (0, schematics_1.createMigrationSchematicRule)(schematics_1.TargetVersion.V22, [...upgrade_rules_1.nzUpgradeRules, ...migrations_1.nzMigrations], upgrade_data_1.nzUpgradeData, postUpdate);
}
/** Post-update schematic to be called when update is finished. */
function postUpdate(context, targetVersion, hasFailures) {
    context.logger.info('');
    context.logger.info(`  ✓  Updated NG-ZORRO to ${targetVersion}`);
    context.logger.info('');
    if (hasFailures) {
        context.logger.warn('  ⚠  Some issues were detected but could not be fixed automatically. Please check the ' +
            'output above and fix these issues manually.');
    }
}
//# sourceMappingURL=index.js.map