(moduleName)
| 8488 | return true; |
| 8489 | } |
| 8490 | static getLatestModule(moduleName) { |
| 8491 | return __awaiter(this, void 0, void 0, function* () { |
| 8492 | let output = ""; |
| 8493 | const options = { |
| 8494 | listeners: { |
| 8495 | stdout: (data) => { |
| 8496 | output += data.toString(); |
| 8497 | } |
| 8498 | } |
| 8499 | }; |
| 8500 | yield PowerShellToolRunner_1.default.executePowerShellScriptBlock(new ScriptBuilder_1.default() |
| 8501 | .getLatestModuleScript(moduleName), options); |
| 8502 | const outputJson = JSON.parse(output.trim()); |
| 8503 | if (!(Constants_1.default.Success in outputJson)) { |
| 8504 | throw new Error(outputJson[Constants_1.default.Error]); |
| 8505 | } |
| 8506 | const azLatestVersion = outputJson[Constants_1.default.AzVersion]; |
| 8507 | if (!Utils.isValidVersion(azLatestVersion)) { |
| 8508 | throw new Error(`Invalid AzPSVersion: ${azLatestVersion}`); |
| 8509 | } |
| 8510 | return azLatestVersion; |
| 8511 | }); |
| 8512 | } |
| 8513 | static checkModuleVersion(moduleName, version) { |
| 8514 | return __awaiter(this, void 0, void 0, function* () { |
| 8515 | let output = ""; |
no test coverage detected