5
5
6
6
import { type IActionContext } from '@microsoft/vscode-azext-utils' ;
7
7
import * as semver from 'semver' ;
8
- import { ext , TemplateSource } from '../extensionVariables' ;
9
8
import { type IBundleMetadata , type IHostJsonV2 } from '../funcConfig/host' ;
10
9
import { localize } from '../localize' ;
11
10
import { type IBindingTemplate } from '../templates/IBindingTemplate' ;
@@ -86,7 +85,7 @@ export namespace bundleFeedUtils {
86
85
}
87
86
88
87
export async function getLatestVersionRange ( context : IActionContext ) : Promise < string > {
89
- const feed : IBundleFeed = await getBundleFeed ( context , undefined ) ;
88
+ const feed : IBundleFeed = await getBundleFeed ( context ) ;
90
89
return feed . defaultVersionRange ;
91
90
}
92
91
@@ -108,21 +107,8 @@ export namespace bundleFeedUtils {
108
107
return ! ! template . id ?. toLowerCase ( ) . includes ( templateType . toLowerCase ( ) ) ;
109
108
}
110
109
111
- async function getBundleFeed ( context : IActionContext , bundleMetadata : IBundleMetadata | undefined ) : Promise < IBundleFeed > {
112
- const bundleId : string = bundleMetadata && bundleMetadata . id || defaultBundleId ;
113
-
114
- const envVarUri : string | undefined = process . env . FUNCTIONS_EXTENSIONBUNDLE_SOURCE_URI ;
115
- // Only use an aka.ms link for the most common case, otherwise we will dynamically construct the url
116
- let url : string ;
117
- const templateProvider = ext . templateProvider . get ( context ) ;
118
- if ( ! envVarUri && bundleId === defaultBundleId && templateProvider . templateSource !== TemplateSource . Staging ) {
119
- url = 'https://aka.ms/bundleFeedUtilsV2' ;
120
- } else {
121
- const suffix : string = templateProvider . templateSource === TemplateSource . Staging ? '-staging' : '' ;
122
- const baseUrl : string = envVarUri || `https://cdn${ suffix } .functions.azure.com/public` ;
123
- url = `${ baseUrl } /ExtensionBundles/${ bundleId } /index-v2.json` ;
124
- }
125
-
110
+ async function getBundleFeed ( context : IActionContext ) : Promise < IBundleFeed > {
111
+ const url : string = 'https://aka.ms/funcStaticProperties' ;
126
112
return feedUtils . getJsonFeed ( context , url ) ;
127
113
}
128
114
0 commit comments