@@ -212,53 +212,49 @@ export async function activate(context: vscode.ExtensionContext, perfStats: { lo
212212 const getSubscriptions : ( filter : boolean ) => Promise < AzureSubscription [ ] > =
213213 async ( filter : boolean ) => { return await ( await ext . subscriptionProviderFactory ( ) ) . getSubscriptions ( filter ) ; } ;
214214
215- const internalApiFactory : AzureExtensionApiFactory = {
216- apiVersion : InternalAzureResourceGroupsExtensionApi . apiVersion ,
217- createApi : ( ) => new InternalAzureResourceGroupsExtensionApi ( {
215+ const coreApiFactories : AzureExtensionApiFactory [ ] = [
216+ {
218217 apiVersion : InternalAzureResourceGroupsExtensionApi . apiVersion ,
219- appResourceTree : ext . appResourceTree ,
220- appResourceTreeView : ext . appResourceTreeView ,
221- workspaceResourceTree : ext . workspaceTree ,
222- workspaceResourceTreeView : ext . workspaceTreeView ,
223- registerApplicationResourceResolver,
224- registerWorkspaceResourceProvider,
225- registerActivity,
226- pickAppResource : createCompatibilityPickAppResource ( ) ,
227- getSubscriptions,
228- } ) ,
229- } ;
230-
231- /**
232- * This is a temporary API and will be removed in a future version once the staged introduction
233- * of the "DocumentDB for VS Code" extension is complete.
234- *
235- * The 3.0.0 API is *NOT* backward-compatible with 2.0.0 on purpose to prevent API users from upgrading to this
236- * temporary API.
237- *
238- * Its primary purpose is to support the user migration from the Azure Databases extension to the Azure DocumentDB extension.
239- * It provides a feature flag that allows dependent extensions (e.g., `vscode-cosmosdb`, `vscode-documentdb`) to detect
240- * when this new functionality is available.
241- *
242- * This API-based signal is necessary due to a staged rollout, allowing users time to upgrade.
243- * Dependent extensions should rely on this API signal rather than the extension version.
244- *
245- * This temporary API will be removed in a future version once the migration is complete.
246- * See: https://github.com/microsoft/vscode-azureresourcegroups/pull/1223
247- */
248- const v3ApiFactory : AzureExtensionApiFactory = {
249- apiVersion : '3.0.0' ,
250- createApi : ( ) => {
251- return {
252- apiVersion : '3.0.0' ,
253- isDocumentDbExtensionSupportEnabled : ( ) => true ,
254- } ;
218+ createApi : ( ) => new InternalAzureResourceGroupsExtensionApi ( {
219+ apiVersion : InternalAzureResourceGroupsExtensionApi . apiVersion ,
220+ appResourceTree : ext . appResourceTree ,
221+ appResourceTreeView : ext . appResourceTreeView ,
222+ workspaceResourceTree : ext . workspaceTree ,
223+ workspaceResourceTreeView : ext . workspaceTreeView ,
224+ registerApplicationResourceResolver,
225+ registerWorkspaceResourceProvider,
226+ registerActivity,
227+ pickAppResource : createCompatibilityPickAppResource ( ) ,
228+ getSubscriptions,
229+ } ) ,
255230 } ,
256- } ;
257-
258- const coreApiFactories : AzureExtensionApiFactory [ ] = [
259- internalApiFactory ,
260231 v2ApiFactory ,
261- v3ApiFactory ,
232+ /**
233+ * This is a temporary API and will be removed in a future version once the staged introduction
234+ * of the "DocumentDB for VS Code" extension is complete.
235+ *
236+ * The 3.0.0 API is *NOT* backward-compatible with 2.0.0 on purpose to prevent API users from upgrading to this
237+ * temporary API.
238+ *
239+ * Its primary purpose is to support the user migration from the Azure Databases extension to the Azure DocumentDB extension.
240+ * It provides a feature flag that allows dependent extensions (e.g., `vscode-cosmosdb`, `vscode-documentdb`) to detect
241+ * when this new functionality is available.
242+ *
243+ * This API-based signal is necessary due to a staged rollout, allowing users time to upgrade.
244+ * Dependent extensions should rely on this API signal rather than the extension version.
245+ *
246+ * This temporary API will be removed in a future version once the migration is complete.
247+ * See: https://github.com/microsoft/vscode-azureresourcegroups/pull/1223
248+ */
249+ {
250+ apiVersion : "3.0.0" ,
251+ createApi : ( ) => {
252+ return {
253+ apiVersion : "3.0.0" ,
254+ isDocumentDbExtensionSupportEnabled : ( ) => true ,
255+ } ;
256+ } ,
257+ } as AzureExtensionApiFactory
262258 ] ;
263259
264260 // Add test API when running tests
0 commit comments