/**
 * Copyright(c) Microsoft Corporation.All rights reserved.
 * Licensed under the MIT License.
 */ import { readFileSync } from 'fs' ; const regexTrailingBackslash = /.*?(\\|\/)+$/ ; param path returns export function sanitizePath ( path ) { if ( regexTrailingBackslash . test ( path ) ) { return path . substring ( 0 , path . length - 1 ) ; } return path ; } param appsettings returns export function sanitizeAppSettingsProperties ( appsettings ) { return readFileSync ( appsettings , 'UTF8' ) . replace ( new RegExp ( '\\bBotFrameworkSkills\\b' , 'gi' ) , 'botFrameworkSkills' ) . replace ( new RegExp ( '\\bAppId\\b' , 'gi' ) , 'appId' ) . replace ( new RegExp ( '\\bId\\b' , 'gi' ) , 'id' ) . replace ( new RegExp ( '\\bSkillEndpoint\\b' , 'gi' ) , 'skillEndpoint' ) . replace ( new RegExp ( '\\bName\\b' , 'gi' ) , 'name' ) . replace ( new RegExp ( '\\bDescription\\b' , 'gi' ) , 'description' ) . replace ( new RegExp ( '\\bSkillHostEndpoint\\b' , 'gi' ) , 'skillHostEndpoint' ) ; } param path returns export function wrapPathWithQuotes ( path ) { return `"${ path }"` ; }