diff --git a/utils/index.d.ts b/utils/index.d.ts index 76d37e91ff..2b1be49cd7 100644 --- a/utils/index.d.ts +++ b/utils/index.d.ts @@ -1755,6 +1755,16 @@ export declare namespace AzExtFsExtra { export declare function maskValue(data: string, valueToMask: string | undefined): string; +/** + * Best effort to mask all data that could potentially identify a user + * + * @param unknownArg Any unknown value. This value will be cast to a string and then masked before returning. + * @param actionValuesToMask An array of strings indicating additional values to mask. + * @param lessAggressive A boolean value that defaults to false. If set to true, the most aggressive masking will be skipped. + * @param getUsername To be used ONLY by test code. Function used to get the username. + */ +export declare function maskUserInfo(unknownArg: unknown, actionValuesToMask: string[], lessAggressive?: boolean, getUsername?: () => string): string; + export declare function openUrl(url: string): Promise; /** diff --git a/utils/package-lock.json b/utils/package-lock.json index 7a60bd6361..26093d4962 100644 --- a/utils/package-lock.json +++ b/utils/package-lock.json @@ -1,12 +1,12 @@ { "name": "@microsoft/vscode-azext-utils", - "version": "2.5.6", + "version": "2.5.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@microsoft/vscode-azext-utils", - "version": "2.5.6", + "version": "2.5.7", "license": "MIT", "dependencies": { "@microsoft/vscode-azureresources-api": "^2.3.1", diff --git a/utils/package.json b/utils/package.json index 882418eda3..721c9c3352 100644 --- a/utils/package.json +++ b/utils/package.json @@ -1,7 +1,7 @@ { "name": "@microsoft/vscode-azext-utils", "author": "Microsoft Corporation", - "version": "2.5.6", + "version": "2.5.7", "description": "Common UI tools for developing Azure extensions for VS Code", "tags": [ "azure", diff --git a/utils/src/index.ts b/utils/src/index.ts index 3955a98a3f..8a015ea43d 100644 --- a/utils/src/index.ts +++ b/utils/src/index.ts @@ -15,7 +15,7 @@ export * from './DialogResponses'; export * from './errors'; export * from './extensionUserAgent'; export { registerUIExtensionVariables } from './extensionVariables'; -export { addExtensionValueToMask, callWithMaskHandling, maskValue } from './masking'; +export { addExtensionValueToMask, callWithMaskHandling, maskUserInfo, maskValue } from './masking'; export * from './openReadOnlyContent'; export * from './parseError'; export * from './pickTreeItem/contextValue/ContextValueQuickPickStep';