@microsoft/vscode-azext-azureappservice
Advanced tools
Comparing version 2.2.4 to 2.2.5
@@ -16,3 +16,3 @@ import { IActionContext } from '@microsoft/vscode-azext-utils'; | ||
*/ | ||
export declare function createSiteFilesUrl(site: ParsedSite, path: string): string; | ||
export declare function createSiteFilesUrl(site: ParsedSite, path: string, href?: string): string; | ||
export declare function getFile(context: IActionContext, site: ParsedSite, url: string): Promise<ISiteFile>; | ||
@@ -19,0 +19,0 @@ export declare function listFiles(context: IActionContext, site: ParsedSite, url: string): Promise<ISiteFileMetadata[]>; |
@@ -24,10 +24,9 @@ "use strict"; | ||
*/ | ||
function createSiteFilesUrl(site, path) { | ||
if (site.isFunctionApp) { | ||
if (site.isLinux) { | ||
path = path.replace(/^\/home\//, ''); | ||
} | ||
function createSiteFilesUrl(site, path, href) { | ||
// For Linux consumption function apps, the href doesn't work. So we build the url manually | ||
if (site.isFunctionApp && site.isLinux) { | ||
path = path.replace(/^\/home\//, ''); | ||
return `${site.id}/hostruntime/admin/vfs/home/${path}/?api-version=2022-03-01`; | ||
} | ||
return `${site.kuduUrl}/api/vfs/${path}`; | ||
return href !== null && href !== void 0 ? href : `${site.kuduUrl}/api/vfs/${path}`; | ||
} | ||
@@ -34,0 +33,0 @@ exports.createSiteFilesUrl = createSiteFilesUrl; |
@@ -50,3 +50,3 @@ "use strict"; | ||
return files.map(file => { | ||
const url = this.site.isFunctionApp ? (0, siteFiles_1.createSiteFilesUrl)(this.site, file.path) : file.href; | ||
const url = (0, siteFiles_1.createSiteFilesUrl)(this.site, file.path, file.href); | ||
return file.mime === 'inode/directory' ? new FolderTreeItem(this, { | ||
@@ -53,0 +53,0 @@ site: this.site, |
{ | ||
"name": "@microsoft/vscode-azext-azureappservice", | ||
"author": "Microsoft Corporation", | ||
"version": "2.2.4", | ||
"version": "2.2.5", | ||
"description": "Common tools for developing Azure App Service extensions for VS Code", | ||
@@ -6,0 +6,0 @@ "tags": [ |
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
372905
6761