@microsoft/vscode-azext-utils
Advanced tools
Comparing version 2.5.0 to 2.5.1
@@ -23,2 +23,3 @@ "use strict"; | ||
const showWarningMessage_1 = require("./showWarningMessage"); | ||
const showWorkspaceFolderPick_1 = require("./showWorkspaceFolderPick"); | ||
class AzExtUserInput { | ||
@@ -93,2 +94,20 @@ constructor(context, onDidFinishPromptEmitter) { | ||
} | ||
showWorkspaceFolderPick(options) { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
addStepTelemetry(this._context, options.stepName, 'WorkspaceFolderPick', options.placeHolder); | ||
if ((_a = this._context.ui.wizard) === null || _a === void 0 ? void 0 : _a.cancellationToken.isCancellationRequested) { | ||
throw new errors_1.UserCancelledError(); | ||
} | ||
try { | ||
this._isPrompting = true; | ||
const result = yield (0, showWorkspaceFolderPick_1.showWorkspaceFolderPick)(options); | ||
this._onDidFinishPromptEmitter.fire({ value: result }); | ||
return result; | ||
} | ||
finally { | ||
this._isPrompting = false; | ||
} | ||
}); | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
@@ -95,0 +114,0 @@ showWarningMessage(message, ...args) { |
@@ -105,2 +105,23 @@ "use strict"; | ||
} | ||
showWorkspaceFolderPick(options) { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
(0, AzExtUserInput_1.addStepTelemetry)(this._context, options.stepName, 'WorkspaceFolderPick', options.placeHolder); | ||
if ((_a = this._context.ui.wizard) === null || _a === void 0 ? void 0 : _a.cancellationToken.isCancellationRequested) { | ||
throw new errors_1.UserCancelledError(); | ||
} | ||
this._isPrompting = true; | ||
let result; | ||
const nextItemInQueue = this._inputsQueue.shift(); | ||
if (!nextItemInQueue) { | ||
result = yield this._realAzureUserInput.showWorkspaceFolderPick(options); | ||
} | ||
else { | ||
result = nextItemInQueue; | ||
this._onDidFinishPromptEmitter.fire({ value: result }); | ||
} | ||
this._isPrompting = false; | ||
return result; | ||
}); | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
@@ -107,0 +128,0 @@ showWarningMessage(message, ...args) { |
{ | ||
"name": "@microsoft/vscode-azext-utils", | ||
"author": "Microsoft Corporation", | ||
"version": "2.5.0", | ||
"version": "2.5.1", | ||
"description": "Common UI tools for developing Azure extensions for VS Code", | ||
@@ -49,3 +49,3 @@ "tags": [ | ||
"@microsoft/eslint-config-azuretools": "^0.2.1", | ||
"@microsoft/vscode-azext-dev": "^2.0.0", | ||
"@microsoft/vscode-azext-dev": "^2.0.4", | ||
"@types/html-to-text": "^8.1.0", | ||
@@ -56,3 +56,3 @@ "@types/mocha": "^7.0.2", | ||
"@types/uuid": "^9.0.1", | ||
"@types/vscode": "1.76.0", | ||
"@types/vscode": "^1.82.0", | ||
"@typescript-eslint/eslint-plugin": "^5.53.0", | ||
@@ -59,0 +59,0 @@ "@vscode/test-electron": "^2.3.8", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
441073
91
8403
1