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;YACW,4BAA4B;CAK7C","file":"main.d.ts","sourcesContent":["import { Common } from '../common';\r\nimport { PackageJsonUpgrader } from './upgrader/package-json-upgrader';\r\nimport { TSConfigUpgrader } from './upgrader/tsconfig-upgrader';\r\nimport { Logger } from './utils/logger';\r\nimport { GitIgnoreUpgrader } from './upgrader/git-ignore-upgrader';\r\nimport { AngularJsonUpgrader } from './upgrader/angular-json-upgrader';\r\nimport { FileReplacementUpgrader } from './upgrader/file-replacement-upgrader';\r\nimport { CIBuildYmlUpgrader } from './upgrader/ci-build-yml-upgrader';\r\nimport { ReplaceUpgrader } from './upgrader/replace-upgrader';\r\nimport { srcTsConfigLibProdReplaces, srcTsConfigSpecRemoves } from './configs/config';\r\nimport { RemoveUpgrader } from './upgrader/remove-upgrader';\r\nimport { MainDebugger } from './utils/main-debugger';\r\nimport { runCommand } from './utils/command-runner';\r\nimport { LogParser } from './upgrader/audit/log-parser';\r\nimport { VersionJsonUpgrader } from './upgrader/version-json-upgrader';\r\nimport { JasmineTestUpgrader } from './upgrader/jasmine-test-upgrader';\r\nimport { updateShellReferences } from './utils/update-shell-references';\r\nimport { EslintUpgrader } from '../eslint/main';\r\nimport { UITestAutomationLegacyUpgrader } from './upgrader/ui-test-automation-legacy-upgrader';\r\nimport { EslintAutoFixUpgrader } from './upgrader/eslint-auto-fix-upgrader';\r\n\r\n/**\r\n * Represents the type of upgrade that needs to be performed.\r\n */\r\nexport enum UpgradeType {\r\n    WithBaseConfig = 'WithBaseConfig',\r\n    WithoutBaseConfig = 'WithoutBaseConfig',\r\n    NoOperation = 'NoOperation'\r\n}\r\n\r\n/**\r\n * Represents the messages that are displayed during the upgrade process.\r\n */\r\nexport enum Angular15UpgraderMessages {\r\n    StartingUpgrade = 'Starting Angular 15 upgrade process...',\r\n    UpdateBasicPaths = 'Updating basic paths for the upgrade...',\r\n    Initialization = 'Initializing upgraders...',\r\n    FinalizeInfoLintFix = `There are eslint violations that needs fix... After fixing the violations, please run the following commands:\\n\r\n        npx eslint . --fix \\n\r\n        gulp lintApp \\n\r\n        gulp build \\n\r\n    `,\r\n    InternalCommandOnly = 'This command is only available for internal extension.',\r\n    Completed = 'Upgrade completed!',\r\n    StartMessageStage0 = 'Starting stage 0: the default Angular 15 upgrade stage',\r\n    StartMessageStage1 = 'Starting stage 1: the Angular core stage',\r\n    StartMessageStage2 = 'Starting stage 2: the Angular 15 unit test stage',\r\n    StartMessageStage3 = 'Starting stage 3: the legacy ui-test-automation stage',\r\n    StartMessageStage4 = 'Starting stage 4: the eslint to support gulp lintApp --fix command stage'\r\n}\r\n\r\n/**\r\n * This is the main class of the EslintUpgrader tool.\r\n * It is responsible for upgrading the Tslint to Eslint.\r\n */\r\nexport class Angular15Upgrader {\r\n    /**\r\n     * The debug mode.\r\n     */\r\n    protected debug = false;\r\n\r\n    /**\r\n     * It determines whether to run angualr 15 upgrade for the internal extension or external sdk.\r\n     */\r\n    protected internal = false;\r\n\r\n    /**\r\n     * If running in the pipeline, the pipeline needs to automatically update for the @msft-sme pacakges instead of WAC CLI.\r\n     */\r\n    protected pipeline = false;\r\n\r\n    /**\r\n     * The main debugger.\r\n     */\r\n    protected mainDebugger: MainDebugger;\r\n\r\n    /**\r\n     * The main debugger version.\r\n     */\r\n    private readonly version = '1.0.1';\r\n\r\n    /**\r\n     * The paths of the configuration files.\r\n     */\r\n    private tsconfigBaseFilePath: string;\r\n    private tsconfigFilePath: string;\r\n    private angularJsonFilePath: string;\r\n    private gitIgnoreFilePath: string;\r\n    private packageJsonFilePath: string;\r\n    private versionJsonFilePath: string;\r\n    private packageLockJsonFilePath: string;\r\n    private nodeModulesFolderPath: string;\r\n    private e2eFolderPath: string;\r\n    private testTsFilePath: string;\r\n    private testTsFileTemplatePath: string;\r\n    private cIBuildYmlFilePath: string;\r\n    private pullRequestYmlFilePath: string;\r\n    private srcTsConfigSpecFilePath: string;\r\n    private srcTsConfigLibProdFilePath: string;\r\n    private gulpCompileTsFilePath: string;\r\n    private gulpCompileTsTemplatePath: string;\r\n    private gulpIndexTsFilePath: string;\r\n    private gulpIndexTsTemplatePath: string;\r\n    private uiTestAutomationLegacyFilePath: string;\r\n    private uiTestAutomationLegacyFolderPath: string;\r\n    private logFilePath: string;\r\n    private eslintrcFilePath: string;\r\n\r\n    /**\r\n     * The upgrader for each configuration file.\r\n     */\r\n    private packageJsonUpgrader: PackageJsonUpgrader;\r\n    private versionJsonUpgrader: VersionJsonUpgrader;\r\n    private tSConfigUpgrader: TSConfigUpgrader;\r\n    private tSConfigBaseUpgrader: TSConfigUpgrader;\r\n    private gitIgnoreUpgrader: GitIgnoreUpgrader;\r\n    private angularJsonUpgrader: AngularJsonUpgrader;\r\n    private testTsUpgrader: FileReplacementUpgrader;\r\n    private cIBuildUpgrader: CIBuildYmlUpgrader;\r\n    private pullRequestUpgrader: CIBuildYmlUpgrader;\r\n    private srcTsConfigLibProdUpgrader: ReplaceUpgrader;\r\n    private srcTsConfigSpecUpgrader: RemoveUpgrader;\r\n    private gulpCompileTsUpgrader: FileReplacementUpgrader;\r\n    private gulpIndexTsUpgrader: FileReplacementUpgrader;\r\n    private logParser: LogParser;\r\n    private jasmineTestUpgrader: JasmineTestUpgrader;\r\n    private uITestAutomationLegacyUpgrader: UITestAutomationLegacyUpgrader;\r\n    /**\r\n     * The eslint fix upgrader to support linter fix command for stage 4.\r\n     */\r\n    private eslintAutoFixUpgrader: EslintAutoFixUpgrader;\r\n\r\n    /**\r\n     * The file names for each configuration file.\r\n     */\r\n    private readonly tsconfigBaseFileName = 'tsconfig.base.json';\r\n    private readonly tsconfigFileName = 'tsconfig.json';\r\n    private readonly packageJsonFileName = 'package.json';\r\n    private readonly versionJsonFileName = 'version.json';\r\n    private readonly packageLockJsonFileName = 'package-lock.json';\r\n    private readonly angularFileName = 'angular.json';\r\n    private readonly e2eFolderName = 'e2e';\r\n    private readonly nodeModulesFolderName = 'node_modules';\r\n    private readonly gitIgnoreFileName = '.gitignore';\r\n    private readonly testTsFileName = 'test.ts';\r\n    private readonly cIBuildYmlFileName = 'ci-build.yml';\r\n    private readonly pullRequestYmlFileName = 'pull-request.yml';\r\n    private readonly srcTsConfigLibProdFileName = 'tsconfig.lib.prod.json';\r\n    private readonly srcTsConfigSpecFileName = 'tsconfig.spec.json';\r\n    private readonly gulpCompileTsFileName = 'compile.ts';\r\n    private readonly gulpIndexTsFileName = 'index.ts';\r\n    private readonly logFileName = 'log.txt';\r\n    private readonly eslintrcFileName = '.eslintrc.json';\r\n\r\n    constructor() {\r\n        Logger.log(Angular15UpgraderMessages.StartingUpgrade);\r\n        Common.rootPath = process.cwd();\r\n        Logger.log(Common.rootPath);\r\n    }\r\n\r\n    /**\r\n     * The upgrader main function.\r\n     * If only runs the unit test\r\n     * node ./node_modules/@microsoft/windows-admin-center-sdk/tools/wac-cli/src/index.js angular15Upgrade --pipeline false --stage 2\r\n     * @param pipeline It determines whether to run this command on the pipeline.\r\n     * @param debug It determines whether to run the debug mode.\r\n     * @param internal It determines whether to run angualr 15 upgrade for the internal extension or external sdk.\r\n     * @param stage '0' - the default Angular 15 upgrade stage,\r\n     *              '1' - the Angular core stage,\r\n     *              '2' - the Angular 15 unit test stage,\r\n     *              '3' - the legacy ui-test-automation stage.\r\n     *              '4' - the eslint to support gulp lintApp --fix command.\r\n     */\r\n    public async upgrade(pipeline = false, stage = 0, internal = false, debug = false) {\r\n        this.debug = !!debug;\r\n        this.pipeline = !!pipeline;\r\n        this.internal = !!internal;\r\n        Logger.log(this.version);\r\n        Logger.log(Angular15UpgraderMessages.StartingUpgrade);\r\n        Logger.log('Passed in parameters: ' + this.pipeline + ' ' + stage + ' ' + this.internal + ' ' + this.debug );\r\n\r\n        this.mainDebugger = this.debug ? new MainDebugger(): undefined;\r\n\r\n        Logger.log(Angular15UpgraderMessages.UpdateBasicPaths);\r\n        this.updateBasicPaths();\r\n\r\n        Logger.log(Angular15UpgraderMessages.Initialization);\r\n        this.initialization();\r\n\r\n        switch (stage) {\r\n            case 0:\r\n                Logger.log(Angular15UpgraderMessages.StartMessageStage0);\r\n                await this.criticalConfigurationFilesUpdates();\r\n                await this.installDependenciesPreparation();\r\n                await this.installLKGElectronToChromium();\r\n                await this.installDependencies();\r\n                // Fix any eslint errors that doesn't match the latest eslint rules.\r\n                await this.fixEslintErrors(this.pipeline);\r\n                await this.gulpQuick();\r\n                await this.gulpBuildPostAudit();\r\n                // Fix any eslint errors that is triggered by audit.\r\n                await this.fixEslintErrors(this.pipeline);\r\n                await this.gulpBuildProd();\r\n                await this.gulpBuildProdPostAudit();\r\n                // Fix any eslint errors clean-ups.\r\n                await this.fixEslintErrors(this.pipeline);\r\n                await this.jasmineTestUpgrader.run();\r\n                break;\r\n            case 1:\r\n                Logger.log(Angular15UpgraderMessages.StartMessageStage1);\r\n                await this.criticalConfigurationFilesUpdates();\r\n                await this.installDependenciesPreparation();\r\n                await this.installLKGElectronToChromium();\r\n                await this.installDependencies();\r\n                // Fix any eslint errors that doesn't match the latest eslint rules.\r\n                await this.fixEslintErrors(this.pipeline);\r\n                await this.gulpQuick();\r\n                await this.gulpBuildPostAudit();\r\n                // Fix any eslint errors that is triggered by audit.\r\n                await this.fixEslintErrors(this.pipeline);\r\n                await this.gulpBuildProd();\r\n                await this.gulpBuildProdPostAudit();\r\n                // Fix any eslint errors clean-ups.\r\n                await this.fixEslintErrors(this.pipeline);\r\n                break;\r\n            case 2:\r\n                Logger.log(Angular15UpgraderMessages.StartMessageStage2);\r\n                await this.gulpIndexTsUpgrader.run();\r\n                await this.testTsUpgrader.run();\r\n                await this.jasmineTestUpgrader.run();\r\n                break;\r\n            case 3:\r\n                Logger.log(Angular15UpgraderMessages.StartMessageStage3);\r\n                if (!this.internal) {\r\n                    Logger.log(Angular15UpgraderMessages.InternalCommandOnly);\r\n                } else {\r\n                    await this.packageJsonUpgrader.run(this.pipeline),\r\n                    await this.installUTALegacyDevDependency();\r\n                    await this.uITestAutomationLegacyUpgrader.run();\r\n                    await this.installDependenciesForUITestAutomation();\r\n                }\r\n            case 4:\r\n                Logger.log(Angular15UpgraderMessages.StartMessageStage4);\r\n                if (!this.internal) {\r\n                    Logger.log(Angular15UpgraderMessages.InternalCommandOnly);\r\n                } else {\r\n                    await this.eslintAutoFixUpgrader.run();\r\n                    await this.gulpLintFix();\r\n                }\r\n            default:\r\n                Logger.log('default');\r\n                break;\r\n        }\r\n    }\r\n\r\n    protected async criticalConfigurationFilesUpdates(): Promise<void> {\r\n        Promise.all([\r\n            this.packageJsonUpgrader.run(this.pipeline),\r\n            this.versionJsonUpgrader.run(),\r\n            this.tSConfigBaseUpgrader.runBase(),\r\n            this.tSConfigUpgrader.run(),\r\n            this.gitIgnoreUpgrader.run(),\r\n            this.angularJsonUpgrader.run(),\r\n            this.testTsUpgrader.run(),\r\n            this.cIBuildUpgrader.run(),\r\n            this.pullRequestUpgrader.run(),\r\n            this.srcTsConfigLibProdUpgrader.run(),\r\n            this.srcTsConfigSpecUpgrader.run(),\r\n            this.gulpCompileTsUpgrader.run(),\r\n            this.gulpIndexTsUpgrader.run()\r\n        ]).then((results) => {\r\n            console.log('All Promises have completed:', results);\r\n\r\n            if (this.debug) {\r\n                this.mainDebugger.verifyTestData(this).then(() => {\r\n                    Logger.log(Angular15UpgraderMessages.Completed);\r\n                });\r\n            }\r\n        })\r\n        .catch((error) => {\r\n            Logger.error('At least one Promise encountered an error:' + error);\r\n        });\r\n    }\r\n\r\n    protected initialization() {\r\n        this.packageJsonUpgrader = new PackageJsonUpgrader(this.packageJsonFilePath);\r\n        this.versionJsonUpgrader = new VersionJsonUpgrader(this.versionJsonFilePath);\r\n        this.tSConfigBaseUpgrader = new TSConfigUpgrader(this.tsconfigBaseFilePath, this.tsconfigBaseFileName);\r\n        this.tSConfigUpgrader = new TSConfigUpgrader(this.tsconfigFilePath, this.tsconfigFileName);\r\n        this.gitIgnoreUpgrader = new GitIgnoreUpgrader(this.gitIgnoreFilePath);\r\n        this.angularJsonUpgrader = new AngularJsonUpgrader(this.angularJsonFilePath);\r\n        this.testTsUpgrader = new FileReplacementUpgrader(this.testTsFileTemplatePath, this.testTsFilePath);\r\n        this.cIBuildUpgrader = new CIBuildYmlUpgrader(this.cIBuildYmlFilePath, this.cIBuildYmlFileName);\r\n        this.pullRequestUpgrader = new CIBuildYmlUpgrader(this.pullRequestYmlFilePath, this.pullRequestYmlFileName);\r\n        this.srcTsConfigLibProdUpgrader = new ReplaceUpgrader(this.srcTsConfigLibProdFilePath, srcTsConfigLibProdReplaces, this.srcTsConfigLibProdFileName);\r\n        this.srcTsConfigSpecUpgrader = new RemoveUpgrader(this.srcTsConfigSpecFilePath, srcTsConfigSpecRemoves, this.srcTsConfigSpecFileName);\r\n        this.gulpCompileTsUpgrader = new FileReplacementUpgrader(this.gulpCompileTsTemplatePath, this.gulpCompileTsFilePath);\r\n        this.gulpIndexTsUpgrader = new FileReplacementUpgrader(this.gulpIndexTsTemplatePath, this.gulpIndexTsFilePath);\r\n        this.jasmineTestUpgrader = new JasmineTestUpgrader(this.testTsFilePath, this.debug);\r\n        this.uITestAutomationLegacyUpgrader = new UITestAutomationLegacyUpgrader(this.uiTestAutomationLegacyFilePath, this.packageJsonFileName);\r\n        this.eslintAutoFixUpgrader = new EslintAutoFixUpgrader(this.eslintrcFilePath);\r\n\r\n        this.logParser = new LogParser(this.logFilePath, this.logFileName);\r\n    }\r\n\r\n    protected updateBasicPaths(): void {\r\n        this.tsconfigBaseFilePath = Common.rootPath + '\\\\' + this.tsconfigBaseFileName;\r\n        this.tsconfigFilePath = Common.rootPath + '\\\\' + this.tsconfigFileName;\r\n        this.angularJsonFilePath = Common.rootPath + '\\\\' + this.angularFileName;\r\n        this.packageJsonFilePath = Common.rootPath + '\\\\' + this.packageJsonFileName;\r\n        this.versionJsonFilePath =  Common.rootPath + '\\\\' + this.versionJsonFileName;\r\n        this.packageLockJsonFilePath = Common.rootPath + '\\\\' + this.packageLockJsonFileName;\r\n        this.nodeModulesFolderPath = Common.rootPath + '\\\\' + this.nodeModulesFolderName;\r\n        this.e2eFolderPath = Common.rootPath + '\\\\' + this.e2eFolderName;\r\n        this.gitIgnoreFilePath = Common.rootPath + '\\\\' + this.gitIgnoreFileName;\r\n        this.eslintrcFilePath = Common.rootPath + '\\\\' + this.eslintrcFileName;\r\n\r\n        this.srcTsConfigLibProdFilePath = Common.rootPath + '\\\\src\\\\' + this.srcTsConfigLibProdFileName;\r\n        this.srcTsConfigSpecFilePath = Common.rootPath + '\\\\src\\\\' + this.srcTsConfigSpecFileName;\r\n\r\n        this.cIBuildYmlFilePath = Common.rootPath + '\\\\build\\\\pipelines\\\\' + this.cIBuildYmlFileName;\r\n        this.pullRequestYmlFilePath = Common.rootPath + '\\\\build\\\\pipelines\\\\' + this.pullRequestYmlFileName;\r\n\r\n        this.testTsFilePath = Common.rootPath + '\\\\src\\\\' + this.testTsFileName;\r\n        this.testTsFileTemplatePath = Common.cliRootPath.replace('wac-cli', 'module-template\\\\angular15\\\\test.ts');\r\n\r\n        this.gulpCompileTsFilePath = Common.rootPath + '\\\\gulpfile.ts\\\\common\\\\' + this.gulpCompileTsFileName;\r\n        this.gulpCompileTsTemplatePath = Common.cliRootPath.replace('wac-cli', 'module-template\\\\angular15\\\\gulpfile.ts\\\\common\\\\compile.ts');\r\n\r\n        this.gulpIndexTsFilePath = Common.rootPath + '\\\\gulpfile.ts\\\\' + this.gulpIndexTsFileName;\r\n        this.gulpIndexTsTemplatePath = Common.cliRootPath.replace('wac-cli', 'module-template\\\\angular15\\\\gulpfile.ts\\\\index.ts');\r\n\r\n        this.uiTestAutomationLegacyFilePath = Common.rootPath + '\\\\ui-test-automation\\\\' + this.packageJsonFileName;\r\n        this.uiTestAutomationLegacyFolderPath = Common.rootPath + '\\\\ui-test-automation\\\\';\r\n\r\n        this.logFilePath = Common.rootPath + '\\\\' + this.logFileName;\r\n\r\n        if (this.debug) {\r\n            this.mainDebugger.updateTestData(this);\r\n        }\r\n    }\r\n\r\n    protected async gulpBuildPostAudit(): Promise<void> {\r\n        return this.logParser.run();\r\n    }\r\n\r\n    protected gulpLintFix(): Promise<void> {\r\n        const gulpLintFixCmd = 'gulp lintApp --fix';\r\n        Logger.log(gulpLintFixCmd);\r\n        return runCommand(gulpLintFixCmd, this.debug, true, Angular15UpgraderMessages.Completed, this.logFileName).then((response) => {\r\n            console.log(response);\r\n        });\r\n    }\r\n\r\n    protected gulpQuick(): Promise<void> {\r\n        const gulpQuick = 'gulp quick';\r\n        Logger.log(gulpQuick);\r\n        return runCommand(gulpQuick, this.debug, true, Angular15UpgraderMessages.Completed, this.logFileName).then((response) => {\r\n            console.log(response);\r\n        });\r\n    }\r\n\r\n    protected gulpBuildProd(): Promise<void> {\r\n        const gulpBuild = 'gulp build --prod';\r\n        Logger.log(gulpBuild);\r\n        return runCommand(gulpBuild, this.debug, true, Angular15UpgraderMessages.Completed, this.logFileName).then((response) => {\r\n            console.log(response);\r\n        });\r\n    }\r\n\r\n    protected async gulpBuildProdPostAudit(): Promise<void> {\r\n        return this.logParser.run();\r\n    }\r\n\r\n    protected async installUTALegacyDevDependency(): Promise<void> {\r\n        const setprefixCmd = 'npm config set save-prefix=';\r\n        Logger.log(setprefixCmd);\r\n        await runCommand(setprefixCmd, this.debug);\r\n        const cmd = 'npm install @msft-sme/ui-test-automation@latest --save-dev --force';\r\n        Logger.log(cmd);\r\n        await runCommand(cmd, this.debug);\r\n    }\r\n\r\n    protected async installDependenciesPreparation(): Promise<void> {\r\n        await this.removeNodeModuleFolder();\r\n        await this.removePackageLockJsonFile();\r\n        await this.removeE2EFolder();\r\n        await this.checkEslintRCFile();\r\n        updateShellReferences('', this.internal);\r\n    }\r\n\r\n    private async checkEslintRCFile(): Promise<void> {\r\n        const esLintUpgrader = new EslintUpgrader();\r\n        await esLintUpgrader.replaceEslintConfig();\r\n    }\r\n\r\n    private async installMicrosftSignalR(): Promise<void> {\r\n        const cmd = 'npm install @microsoft/signalr@6.0.8 --save';\r\n\r\n        Logger.log(cmd);\r\n        await runCommand(cmd, this.debug);\r\n    }\r\n\r\n    private async removePackageLockJsonFile(): Promise<void> {\r\n        const cmd = `del ${this.packageLockJsonFilePath}`;\r\n\r\n        Logger.log(cmd);\r\n        await runCommand(cmd, this.debug);\r\n    }\r\n\r\n    private async removeNodeModuleFolder(): Promise<void> {\r\n        const cmd = `rmdir /s /q ${this.nodeModulesFolderPath}`;\r\n\r\n        Logger.log(cmd);\r\n        await runCommand(cmd, this.debug);\r\n    }\r\n\r\n    private async removeE2EFolder(): Promise<void> {\r\n        const cmd = `rmdir /s /q ${this.e2eFolderPath}`;\r\n\r\n        Logger.log(cmd);\r\n        await runCommand(cmd, this.debug);\r\n    }\r\n\r\n    private async installDependencies(): Promise<void> {\r\n        // Needs to be installed on the SDK root dependency.\r\n        if (!this.internal) {\r\n            await this.installMicrosftSignalR();\r\n        }\r\n        const cmd = 'npm install --force';\r\n\r\n        Logger.log(cmd);\r\n        await runCommand(cmd, this.debug);\r\n    }\r\n\r\n    private async installDependenciesForUITestAutomation(): Promise<void> {\r\n        const cmd = 'pushd ' + this.uiTestAutomationLegacyFolderPath + '&& del package-lock.json && npm install && popd';\r\n        await runCommand(cmd, this.debug);\r\n    }\r\n\r\n    private async fixEslintErrors(ignore = false): Promise<void> {\r\n        if (ignore) {\r\n            return;\r\n        }\r\n        \r\n        const rootFileLinterFix = 'npx eslint . --fix';\r\n        Logger.log(rootFileLinterFix);\r\n        await runCommand(rootFileLinterFix, this.debug, true, Angular15UpgraderMessages.FinalizeInfoLintFix);\r\n        const projectLinterFix = 'npx ng lint --fix';\r\n        Logger.log(projectLinterFix);\r\n        await runCommand(projectLinterFix, this.debug, true, Angular15UpgraderMessages.FinalizeInfoLintFix);\r\n    }\r\n\r\n    /**\r\n     * 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,\r\n     * below are the dependency list:\r\n     * /@angular-devkit/build-angular@15.2.8 -> browserslist@4.21.5 that has dependency on ^1.4.284(which always grab 1.4.535)\r\n     * always force 1.4.532\r\n     */\r\n    private async installLKGElectronToChromium(): Promise<void> {\r\n        const cmd = 'npm install electron-to-chromium@1.4.532 --force';\r\n        Logger.log(cmd);\r\n        await runCommand(cmd, this.debug);\r\n    }\r\n}\r\n"]}