import { MainDebugger } from './utils/main-debugger'; /** * Represents the type of upgrade that needs to be performed. */ export declare enum UpgradeType { WithBaseConfig = "WithBaseConfig", WithoutBaseConfig = "WithoutBaseConfig", NoOperation = "NoOperation" } /** * Represents the messages that are displayed during the upgrade process. */ export declare enum Angular15UpgraderMessages { StartingUpgrade = "Starting Angular 15 upgrade process...", UpdateBasicPaths = "Updating basic paths for the upgrade...", Initialization = "Initializing upgraders...", FinalizeInfoLintFix = "There are eslint violations that needs fix... After fixing the violations, please run the following commands:\n\n npx eslint . --fix \n\n gulp lintApp \n\n gulp build \n\n ", InternalCommandOnly = "This command is only available for internal extension.", Completed = "Upgrade completed!", StartMessageStage0 = "Starting stage 0: the default Angular 15 upgrade stage", StartMessageStage1 = "Starting stage 1: the Angular core stage", StartMessageStage2 = "Starting stage 2: the Angular 15 unit test stage", StartMessageStage3 = "Starting stage 3: the legacy ui-test-automation stage", StartMessageStage4 = "Starting stage 4: the eslint to support gulp lintApp --fix command stage" } /** * This is the main class of the EslintUpgrader tool. * It is responsible for upgrading the Tslint to Eslint. */ export declare class Angular15Upgrader { /** * The debug mode. */ protected debug: boolean; /** * It determines whether to run angualr 15 upgrade for the internal extension or external sdk. */ protected internal: boolean; /** * If running in the pipeline, the pipeline needs to automatically update for the @msft-sme pacakges instead of WAC CLI. */ protected pipeline: boolean; /** * The main debugger. */ protected mainDebugger: MainDebugger; /** * The main debugger version. */ private readonly version; /** * The paths of the configuration files. */ private tsconfigBaseFilePath; private tsconfigFilePath; private angularJsonFilePath; private gitIgnoreFilePath; private packageJsonFilePath; private versionJsonFilePath; private packageLockJsonFilePath; private nodeModulesFolderPath; private e2eFolderPath; private testTsFilePath; private testTsFileTemplatePath; private cIBuildYmlFilePath; private pullRequestYmlFilePath; private srcTsConfigSpecFilePath; private srcTsConfigLibProdFilePath; private gulpCompileTsFilePath; private gulpCompileTsTemplatePath; private gulpIndexTsFilePath; private gulpIndexTsTemplatePath; private uiTestAutomationLegacyFilePath; private uiTestAutomationLegacyFolderPath; private logFilePath; private eslintrcFilePath; /** * The upgrader for each configuration file. */ private packageJsonUpgrader; private versionJsonUpgrader; private tSConfigUpgrader; private tSConfigBaseUpgrader; private gitIgnoreUpgrader; private angularJsonUpgrader; private testTsUpgrader; private cIBuildUpgrader; private pullRequestUpgrader; private srcTsConfigLibProdUpgrader; private srcTsConfigSpecUpgrader; private gulpCompileTsUpgrader; private gulpIndexTsUpgrader; private logParser; private jasmineTestUpgrader; private uITestAutomationLegacyUpgrader; /** * The eslint fix upgrader to support linter fix command for stage 4. */ private eslintAutoFixUpgrader; /** * The file names for each configuration file. */ private readonly tsconfigBaseFileName; private readonly tsconfigFileName; private readonly packageJsonFileName; private readonly versionJsonFileName; private readonly packageLockJsonFileName; private readonly angularFileName; private readonly e2eFolderName; private readonly nodeModulesFolderName; private readonly gitIgnoreFileName; private readonly testTsFileName; private readonly cIBuildYmlFileName; private readonly pullRequestYmlFileName; private readonly srcTsConfigLibProdFileName; private readonly srcTsConfigSpecFileName; private readonly gulpCompileTsFileName; private readonly gulpIndexTsFileName; private readonly logFileName; private readonly eslintrcFileName; constructor(); /** * The upgrader main function. * If only runs the unit test * node ./node_modules/@microsoft/windows-admin-center-sdk/tools/wac-cli/src/index.js angular15Upgrade --pipeline false --stage 2 * @param pipeline It determines whether to run this command on the pipeline. * @param debug It determines whether to run the debug mode. * @param internal It determines whether to run angualr 15 upgrade for the internal extension or external sdk. * @param stage '0' - the default Angular 15 upgrade stage, * '1' - the Angular core stage, * '2' - the Angular 15 unit test stage, * '3' - the legacy ui-test-automation stage. * '4' - the eslint to support gulp lintApp --fix command. */ upgrade(pipeline?: boolean, stage?: number, internal?: boolean, debug?: boolean): Promise; protected criticalConfigurationFilesUpdates(): Promise; protected initialization(): void; protected updateBasicPaths(): void; protected gulpBuildPostAudit(): Promise; protected gulpLintFix(): Promise; protected gulpQuick(): Promise; protected gulpBuildProd(): Promise; protected gulpBuildProdPostAudit(): Promise; protected installUTALegacyDevDependency(): Promise; protected installDependenciesPreparation(): Promise; private checkEslintRCFile; private installMicrosftSignalR; private removePackageLockJsonFile; private removeNodeModuleFolder; private removeE2EFolder; private installDependencies; private installDependenciesForUITestAutomation; private fixEslintErrors; /** * electron-to-chromium 1.4.533 - 1.4.535 are bad versions that is also the latest, meaning any dependency uses ^1.4.xxx are also blocked, * below are the dependency list: * /@angular-devkit/build-angular@15.2.8 -> browserslist@4.21.5 that has dependency on ^1.4.284(which always grab 1.4.535) * always force 1.4.532 */ private installLKGElectronToChromium; }