@microsoft/vscode-azext-utils
Advanced tools
Comparing version 2.5.4 to 2.5.5
@@ -0,0 +0,0 @@ import { AzureResourcesExtensionApi } from '@microsoft/vscode-azureresources-api'; |
@@ -0,0 +0,0 @@ MIT License |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -22,2 +22,4 @@ "use strict"; | ||
exports.apiUtils = exports.registerReportIssueCommand = exports.maskValue = exports.callWithMaskHandling = exports.addExtensionValueToMask = exports.registerUIExtensionVariables = exports.createExperimentationService = exports.activitySuccessIcon = exports.activitySuccessContext = exports.activityInfoIcon = exports.activityFailIcon = exports.activityFailContext = exports.createAzExtOutputChannel = exports.createAzExtLogOutputChannel = void 0; | ||
__exportStar(require("./activityLog/activities/ExecuteActivity"), exports); | ||
__exportStar(require("./activityLog/Activity"), exports); | ||
var AzExtOutputChannel_1 = require("./AzExtOutputChannel"); | ||
@@ -27,5 +29,2 @@ Object.defineProperty(exports, "createAzExtLogOutputChannel", { enumerable: true, get: function () { return AzExtOutputChannel_1.createAzExtLogOutputChannel; } }); | ||
__exportStar(require("./AzExtTreeFileSystem"), exports); | ||
__exportStar(require("./DialogResponses"), exports); | ||
__exportStar(require("./activityLog/Activity"), exports); | ||
__exportStar(require("./activityLog/activities/ExecuteActivity"), exports); | ||
__exportStar(require("./callWithTelemetryAndErrorHandling"), exports); | ||
@@ -41,2 +40,3 @@ var constants_1 = require("./constants"); | ||
Object.defineProperty(exports, "createExperimentationService", { enumerable: true, get: function () { return createExperimentationService_1.createExperimentationService; } }); | ||
__exportStar(require("./DialogResponses"), exports); | ||
__exportStar(require("./errors"), exports); | ||
@@ -52,3 +52,2 @@ __exportStar(require("./extensionUserAgent"), exports); | ||
__exportStar(require("./parseError"), exports); | ||
__exportStar(require("./pickTreeItem/GenericQuickPickStep"), exports); | ||
__exportStar(require("./pickTreeItem/contextValue/ContextValueQuickPickStep"), exports); | ||
@@ -60,2 +59,3 @@ __exportStar(require("./pickTreeItem/contextValue/RecursiveQuickPickStep"), exports); | ||
__exportStar(require("./pickTreeItem/experiences/subscriptionExperience"), exports); | ||
__exportStar(require("./pickTreeItem/GenericQuickPickStep"), exports); | ||
__exportStar(require("./pickTreeItem/quickPickAzureResource/QuickPickAzureResourceStep"), exports); | ||
@@ -76,4 +76,4 @@ __exportStar(require("./pickTreeItem/quickPickAzureResource/QuickPickAzureSubscriptionStep"), exports); | ||
__exportStar(require("./tree/isAzExtTreeItem"), exports); | ||
__exportStar(require("./tree/v2/createGenericElement"), exports); | ||
__exportStar(require("./tree/v2/TreeElementStateManager"), exports); | ||
__exportStar(require("./tree/v2/createGenericElement"), exports); | ||
__exportStar(require("./userInput/AzExtUserInputWithInputQueue"), exports); | ||
@@ -80,0 +80,0 @@ __exportStar(require("./utils/AzExtFsExtra"), exports); |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -16,3 +16,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ReadOnlyContent = exports.disposeReadOnlyContent = exports.disposeReadOnlyContents = exports.openReadOnlyContent = exports.stashReadOnlyContent = exports.openReadOnlyJson = void 0; | ||
exports.ReadOnlyContent = exports.disposeReadOnlyContent = exports.disposeReadOnlyContents = exports.openReadOnlyContent = exports.stashReadOnlyContentSync = exports.stashReadOnlyContent = exports.openReadOnlyJson = void 0; | ||
const util_1 = require("util"); | ||
@@ -63,2 +63,7 @@ const vscode_1 = require("vscode"); | ||
exports.stashReadOnlyContent = stashReadOnlyContent; | ||
function stashReadOnlyContentSync(node, content, fileExtension) { | ||
const contentProvider = getContentProvider(); | ||
return contentProvider.stashReadOnlyContentSync(node, content, fileExtension); | ||
} | ||
exports.stashReadOnlyContentSync = stashReadOnlyContentSync; | ||
function openReadOnlyContent(node, content, fileExtension, options) { | ||
@@ -114,14 +119,21 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
stashReadOnlyContentCore(label, fileId, fileExtension, content) { | ||
const scheme = getScheme(); | ||
// Remove special characters which may prove troublesome when parsing the uri. We'll allow the same set as `encodeUriComponent` | ||
const fileName = label.replace(/[^a-z0-9\-\_\.\!\~\*\'\(\)]/gi, '_'); | ||
const uri = vscode_1.Uri.parse(`${scheme}:///${fileId}/${fileName}${fileExtension}`); | ||
const readOnlyContent = new ReadOnlyContent(uri, this._onDidChangeEmitter, content); | ||
this._contentMap.set(uri.toString(), readOnlyContent); | ||
return readOnlyContent; | ||
} | ||
stashReadOnlyContent(node, content, fileExtension) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const scheme = getScheme(); | ||
const idHash = yield randomUtils_1.randomUtils.getPseudononymousStringHash(node.fullId); | ||
// Remove special characters which may prove troublesome when parsing the uri. We'll allow the same set as `encodeUriComponent` | ||
const fileName = node.label.replace(/[^a-z0-9\-\_\.\!\~\*\'\(\)]/gi, '_'); | ||
const uri = vscode_1.Uri.parse(`${scheme}:///${idHash}/${fileName}${fileExtension}`); | ||
const readOnlyContent = new ReadOnlyContent(uri, this._onDidChangeEmitter, content); | ||
this._contentMap.set(uri.toString(), readOnlyContent); | ||
return readOnlyContent; | ||
return this.stashReadOnlyContentCore(node.label, idHash, fileExtension, content); | ||
}); | ||
} | ||
stashReadOnlyContentSync(node, content, fileExtension) { | ||
const randomId = randomUtils_1.randomUtils.getRandomHexString(16); | ||
return this.stashReadOnlyContentCore(node.label, randomId, fileExtension, content); | ||
} | ||
openReadOnlyContent(node, content, fileExtension, options) { | ||
@@ -128,0 +140,0 @@ return __awaiter(this, void 0, void 0, function* () { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -7,3 +7,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parseContextValue = exports.createContextValue = void 0; | ||
exports.parseContextValue = exports.createUniversallyUniqueContextValue = exports.createContextValue = void 0; | ||
const crypto_1 = require("crypto"); | ||
function createContextValue(values) { | ||
@@ -13,2 +14,6 @@ return Array.from(new Set(values)).sort().join(';'); | ||
exports.createContextValue = createContextValue; | ||
function createUniversallyUniqueContextValue(values) { | ||
return createContextValue(values) + `;${(0, crypto_1.randomUUID)()}`; | ||
} | ||
exports.createUniversallyUniqueContextValue = createUniversallyUniqueContextValue; | ||
function parseContextValue(contextValue) { | ||
@@ -15,0 +20,0 @@ var _a; |
@@ -44,2 +44,4 @@ "use strict"; | ||
return Object.assign(Object.assign({ subscriptionDisplayName: subscription.name, userId: '', subscriptionPath: subscription.subscriptionId }, subscription), { credentials: createCredential(subscription.authentication.getSession), createCredentialsForScopes: (scopes) => __awaiter(this, void 0, void 0, function* () { | ||
// Have to use bind here because we need to pass a `getSessions` function with a `scopes` parameter to `createCredential` | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument | ||
return createCredential(subscription.authentication.getSessionWithScopes.bind(subscription.authentication, scopes)); | ||
@@ -46,0 +48,0 @@ }) }); |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -16,3 +16,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AzureWizard = void 0; | ||
exports.AzureWizard = exports.ActivityOutputType = void 0; | ||
const util_1 = require("util"); | ||
@@ -23,2 +23,3 @@ const vscode = require("vscode"); | ||
const errors_1 = require("../errors"); | ||
const extensionVariables_1 = require("../extensionVariables"); | ||
const parseError_1 = require("../parseError"); | ||
@@ -28,2 +29,8 @@ const showQuickPick_1 = require("../userInput/showQuickPick"); | ||
const SilentExecuteActivityContext_1 = require("./SilentExecuteActivityContext"); | ||
var ActivityOutputType; | ||
(function (ActivityOutputType) { | ||
ActivityOutputType["Item"] = "item"; | ||
ActivityOutputType["Message"] = "message"; | ||
ActivityOutputType["All"] = "all"; | ||
})(ActivityOutputType = exports.ActivityOutputType || (exports.ActivityOutputType = {})); | ||
class AzureWizard { | ||
@@ -149,2 +156,3 @@ constructor(context, options) { | ||
yield this.withProgress({ location: vscode_1.ProgressLocation.Notification }, (progress) => __awaiter(this, void 0, void 0, function* () { | ||
var _a, _b; | ||
let currentStep = 1; | ||
@@ -165,8 +173,24 @@ const steps = this._executeSteps.sort((a, b) => b.priority - a.priority); | ||
while (step) { | ||
if (step.shouldExecute(this._context)) { | ||
if (!step.shouldExecute(this._context)) { | ||
step = steps.pop(); | ||
continue; | ||
} | ||
let output; | ||
try { | ||
this._context.telemetry.properties.lastStep = `execute-${getEffectiveStepId(step)}`; | ||
yield step.execute(this._context, internalProgress); | ||
output = (_a = step.createSuccessOutput) === null || _a === void 0 ? void 0 : _a.call(step, this._context); | ||
} | ||
catch (e) { | ||
output = (_b = step.createFailOutput) === null || _b === void 0 ? void 0 : _b.call(step, this._context); | ||
if (!step.options.continueOnFail) { | ||
throw e; | ||
} | ||
} | ||
finally { | ||
output !== null && output !== void 0 ? output : (output = {}); | ||
this.displayActivityOutput(output, step.options); | ||
currentStep += 1; | ||
step = steps.pop(); | ||
} | ||
step = steps.pop(); | ||
} | ||
@@ -176,2 +200,15 @@ })); | ||
} | ||
displayActivityOutput(output, options) { | ||
var _a, _b; | ||
if (output.item && | ||
options.suppressActivityOutput !== ActivityOutputType.Item && | ||
options.suppressActivityOutput !== ActivityOutputType.All) { | ||
(_a = this._context.activityChildren) === null || _a === void 0 ? void 0 : _a.push(output.item); | ||
} | ||
if (output.message && | ||
options.suppressActivityOutput !== ActivityOutputType.Message && | ||
options.suppressActivityOutput !== ActivityOutputType.All) { | ||
(_b = extensionVariables_1.ext.outputChannel) === null || _b === void 0 ? void 0 : _b.appendLog(output.message); | ||
} | ||
} | ||
withProgress(options, task) { | ||
@@ -178,0 +215,0 @@ var _a, _b; |
@@ -9,4 +9,7 @@ "use strict"; | ||
class AzureWizardExecuteStep { | ||
constructor() { | ||
this.options = {}; | ||
} | ||
} | ||
exports.AzureWizardExecuteStep = AzureWizardExecuteStep; | ||
//# sourceMappingURL=AzureWizardExecuteStep.js.map |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "@microsoft/vscode-azext-utils", | ||
"author": "Microsoft Corporation", | ||
"version": "2.5.4", | ||
"version": "2.5.5", | ||
"description": "Common UI tools for developing Azure extensions for VS Code", | ||
@@ -6,0 +6,0 @@ "tags": [ |
@@ -0,0 +0,0 @@ # VSCode Azure SDK for Node.js - UI Tools (Preview) |
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
437875
91
8523