import * as path from 'path' ; import { Uri } from "vscode" ; import { IActionContext } from 'vscode-azureextensionui' ; import { ext } from "../../extensionVariables" ; import { localize } from '../../localize' ; import { cpUtils } from "../../utils/cpUtils" ; import { getLocalSettingsFile } from './getLocalSettingsFile' ; export async function encryptLocalSettings ( context , uri ? ) { const message = localize ( 'selectLocalSettings' , 'Select the settings file to encrypt.' ) ; const localSettingsPath = uri ? uri . fsPath : await getLocalSettingsFile ( context , message ) ; ext . outputChannel . show ( true ) ; await cpUtils . executeCommand ( ext . outputChannel , path . dirname ( localSettingsPath ) , 'func' , 'settings' , 'encrypt' ) ; }