{"version":3,"sources":["../../../packages/tools/wac-cli/src/angular15/upgrader/audit/error-updater-angular15.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAGnE;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,YAAY;IACnD;;;;;OAKG;IACU,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,GAAE,MAAM,EAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAO7F;;;;;OAKG;IACU,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,GAAE,MAAM,EAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAM/F;;;;OAIG;IACH,SAAS,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,EAAE;IAIzD;;;;OAIG;IACH,SAAS,CAAC,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,EAAE;IAI1D;;;OAGG;IACH,SAAS,CAAC,uBAAuB,CAAC,GAAG,EAAE,MAAM;CAKhD","file":"error-updater-angular15.d.ts","sourcesContent":["import { ErrorUpdater } from \"../../../upgrade/error-updater\";\r\nimport { ErrorResult } from \"../../../upgrade/models/error-result\";\r\nimport { Logger } from \"../../utils/logger\";\r\n\r\n/**\r\n * Updater for Angular 15 errors.\r\n */\r\nexport class ErrorUpdaterAngular15 extends ErrorUpdater {\r\n    /**\r\n     * The function to parse the log file and update the errors.\r\n     * @param log the input log.txt file data.\r\n     * @param updateSource the update source.\r\n     * @returns the count for unresolved errors.\r\n     */\r\n    public async resolveLogBuildErrors(log: string, updateSource: string[] = []): Promise<number> {\r\n        const unresolvedErrorCount = await this.fixErrors(false, this.parseLogBuildErrors(log), updateSource, '15');\r\n        Logger.log('INFO - unresolvedErrorCount:' + unresolvedErrorCount);\r\n        this.checkNestedDependencies(log);\r\n        return new Promise((resolve) => resolve(unresolvedErrorCount));\r\n    }\r\n\r\n    /**\r\n     * The function to parse the log file and update the warnings.\r\n     * @param log the input log.txt file data.\r\n     * @param updateSource the update source.\r\n     * @returns the count for unresolved errors.\r\n     */\r\n    public async resolveLogBuildWarnings(log: string, updateSource: string[] = []): Promise<number> {\r\n        const unresolvedWarningCount = await this.fixErrors(false, this.parseLogBuildWarning(log), updateSource, '15');\r\n        Logger.log('INFO - unresolvedWarningCount:' + unresolvedWarningCount);\r\n        return new Promise((resolve) => resolve(unresolvedWarningCount));\r\n    }\r\n\r\n    /**\r\n     * Gets the error results from the log file data.\r\n     * @param log the log file data.\r\n     * @returns the parsed error results.\r\n     */\r\n    protected parseLogBuildErrors(log: string): ErrorResult[] {\r\n        return this.parseBuildErrorsCore(log);\r\n    }\r\n\r\n    /**\r\n     * Gets the warning results from the log file data.\r\n     * @param log the log file data.\r\n     * @returns the parsed warning results.\r\n     */\r\n    protected parseLogBuildWarning(log: string): ErrorResult[] {\r\n        return this.parseBuildWarningsCore(log);\r\n    }\r\n\r\n    /**\r\n     * Checks if there are nested dependencies.\r\n     * @param log the log file data.\r\n     */\r\n    protected checkNestedDependencies(log: string) {\r\n        log.includes('NG3003') ?\r\n            Logger.log('INFO - Nested dependencies found. Please manually fix them and verify by running: gulp build --prod\\n') :\r\n            Logger.log('INFO - No nested dependencies found.');\r\n    }\r\n}\r\n"]}