From 3f0ea580f56d1341892fdd0fce90e81240144ad1 Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Wed, 7 Jul 2021 14:43:30 -0700 Subject: [PATCH] Update some key az CLI references (#16032) --- extensions/azcli/package.json | 37 +++++++++++++------------------ extensions/azcli/package.nls.json | 32 +++++++++++++------------- extensions/azcli/src/constants.ts | 6 ++--- extensions/azcli/src/extension.ts | 13 +++++------ 4 files changed, 41 insertions(+), 47 deletions(-) diff --git a/extensions/azcli/package.json b/extensions/azcli/package.json index 620430350c..de901b872c 100644 --- a/extensions/azcli/package.json +++ b/extensions/azcli/package.json @@ -1,8 +1,8 @@ { - "name": "azdata", + "name": "azcli", "displayName": "%azdata.displayName%", "description": "%azdata.description%", - "version": "0.6.6", + "version": "0.1.0", "publisher": "Microsoft", "preview": true, "license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt", @@ -28,12 +28,12 @@ "type": "object", "title": "%azdata.config.title%", "properties": { - "azdata.logDebugInfo": { + "azcli.logDebugInfo": { "type": "boolean", "default": false, "description": "%azdata.config.debug%" }, - "azdata.acceptEula": { + "azcli.acceptEula": { "type": "string", "default": "prompt", "enum": [ @@ -46,7 +46,7 @@ ], "description": "%azdata.acceptEula.description%" }, - "azdata.install": { + "azcli.install": { "type": "string", "default": "prompt", "enum": [ @@ -59,7 +59,7 @@ ], "description": "%azdata.install.description%" }, - "azdata.update": { + "azcli.update": { "type": "string", "default": "prompt", "enum": [ @@ -72,7 +72,7 @@ ], "description": "%azdata.update.description%" }, - "azdata.requiredUpdate": { + "azcli.requiredUpdate": { "type": "string", "default": "prompt", "enum": [ @@ -90,17 +90,17 @@ ], "commands": [ { - "command": "azdata.acceptEula", + "command": "azcli.acceptEula", "title": "%azdata.acceptEula.command.name%", "category": "%command.category%" }, { - "command": "azdata.install", + "command": "azcli.install", "title": "%azdata.install.command.name%", "category": "%command.category%" }, { - "command": "azdata.update", + "command": "azcli.update", "title": "%azdata.update.command.name%", "category": "%command.category%" } @@ -108,16 +108,16 @@ "menus": { "commandPalette": [ { - "command": "azdata.acceptEula", - "when": "!azdata.eulaAccepted" + "command": "azcli.acceptEula", + "when": "!azcli.eulaAccepted" }, { - "command": "azdata.install", - "when": "!azdata.found" + "command": "azcli.install", + "when": "!azcli.found" }, { - "command": "azdata.update", - "when": "azdata.found" + "command": "azcli.update", + "when": "azcli.found" } ] }, @@ -150,10 +150,5 @@ "sinon": "^9.0.2", "typemoq": "^2.1.0", "vscodetestcover": "^1.1.0" - }, - "__metadata": { - "id": "73", - "publisherDisplayName": "Microsoft", - "publisherId": "Microsoft" } } diff --git a/extensions/azcli/package.nls.json b/extensions/azcli/package.nls.json index e209128666..2421702f0a 100644 --- a/extensions/azcli/package.nls.json +++ b/extensions/azcli/package.nls.json @@ -1,25 +1,25 @@ { - "azdata.displayName": "Azure Data CLI", - "azdata.description": "Support for Azure Data CLI.", - "azdata.config.title": "Azure Data CLI Configuration", - "azdata.config.debug": "Log debug info to the output channel for all executed azdata commands", + "azdata.displayName": "Azure CLI", + "azdata.description": "Support for Azure CLI.", + "azdata.config.title": "Azure CLI Configuration", + "azdata.config.debug": "Log debug info to the output channel for all executed az commands", - "command.category": "Azure Data CLI", + "command.category": "Azure CLI", "azdata.acceptEula.command.name": "Accept Eula", "azdata.install.command.name": "Install", "azdata.update.command.name": "Check for Update", - "azdata.category": "Azure Data CLI", + "azdata.category": "Azure CLI", - "azdata.acceptEula.description": "Choose how acceptance of EULA for the Azure Data CLI is done", - "azdata.acceptEula.prompt.description": "The user will be prompted for acceptance of EULA for the Azure Data CLI", - "azdata.acceptEula.dontPrompt.description": "The user will not be prompted for acceptance of EULA for the Azure Data CLI", + "azdata.acceptEula.description": "Choose how acceptance of EULA for the Azure CLI is done", + "azdata.acceptEula.prompt.description": "The user will be prompted for acceptance of EULA for the Azure CLI", + "azdata.acceptEula.dontPrompt.description": "The user will not be prompted for acceptance of EULA for the Azure CLI", - "azdata.install.description": "Choose how install of Azure Data CLI is done", - "azdata.install.prompt.description": "The user will be prompted for installation of the Azure Data CLI", - "azdata.install.dontPrompt.description": "The user will not be prompted for installation of the Azure Data CLI", + "azdata.install.description": "Choose how install of Azure CLI is done", + "azdata.install.prompt.description": "The user will be prompted for installation of the Azure CLI", + "azdata.install.dontPrompt.description": "The user will not be prompted for installation of the Azure CLI", - "azdata.update.description": "Choose whether you will be prompted when an update of the Azure Data CLI is available.", - "azdata.requiredUpdate.description": "Choose whether you will be prompted when a required update of the Azure Data CLI is available.", - "azdata.update.prompt.description": "The user will be prompted for update of the Azure Data CLI", - "azdata.update.dontPrompt.description": "The user will not be prompted for update of the Azure Data CLI" + "azdata.update.description": "Choose whether you will be prompted when an update of the Azure CLI is available.", + "azdata.requiredUpdate.description": "Choose whether you will be prompted when a required update of the Azure CLI is available.", + "azdata.update.prompt.description": "The user will be prompted for update of the Azure CLI", + "azdata.update.dontPrompt.description": "The user will not be prompted for update of the Azure CLI" } diff --git a/extensions/azcli/src/constants.ts b/extensions/azcli/src/constants.ts index ac78f4ddcb..b51054d0b9 100644 --- a/extensions/azcli/src/constants.ts +++ b/extensions/azcli/src/constants.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // config setting keys -export const azdataConfigSection: string = 'azdata'; +export const azdataConfigSection: string = 'azcli'; export const azdataAcceptEulaKey: string = 'acceptEula'; export const azdataInstallKey: string = 'install'; export const azdataUpdateKey: string = 'update'; @@ -13,8 +13,8 @@ export const debugConfigKey = 'logDebugInfo'; // context keys && memento keys -export const eulaAccepted = 'azdata.eulaAccepted'; -export const azdataFound = 'azdata.found'; +export const eulaAccepted = 'azcli.eulaAccepted'; +export const azdataFound = 'azcli.found'; // other constants export const azdataHostname = 'https://aka.ms'; diff --git a/extensions/azcli/src/extension.ts b/extensions/azcli/src/extension.ts index 57bea887ad..5efb9cba42 100644 --- a/extensions/azcli/src/extension.ts +++ b/extensions/azcli/src/extension.ts @@ -4,28 +4,26 @@ *--------------------------------------------------------------------------------------------*/ import * as azdataExt from 'azdata-ext'; -import * as rd from 'resource-deployment'; import * as vscode from 'vscode'; import { getExtensionApi } from './api'; import { checkAndInstallAzdata, checkAndUpdateAzdata, findAzdata, isEulaAccepted, promptForEula } from './azdata'; import Logger from './common/logger'; import * as constants from './constants'; import * as loc from './localizedConstants'; -import { ArcControllerConfigProfilesOptionsSource } from './providers/arcControllerConfigProfilesOptionsSource'; import { AzdataToolService } from './services/azdataToolService'; export async function activate(context: vscode.ExtensionContext): Promise { const azdataToolService = new AzdataToolService(); let eulaAccepted: boolean = false; - vscode.commands.registerCommand('azdata.acceptEula', async () => { + vscode.commands.registerCommand('azcli.acceptEula', async () => { await promptForEula(context.globalState, true /* userRequested */); }); - vscode.commands.registerCommand('azdata.install', async () => { + vscode.commands.registerCommand('azcli.install', async () => { azdataToolService.localAzdata = await checkAndInstallAzdata(true /* userRequested */); }); - vscode.commands.registerCommand('azdata.update', async () => { + vscode.commands.registerCommand('azcli.update', async () => { if (await checkAndUpdateAzdata(azdataToolService.localAzdata, true /* userRequested */)) { // if an update was performed azdataToolService.localAzdata = await findAzdata(); // find and save the currently installed azdata } @@ -64,8 +62,9 @@ export async function activate(context: vscode.ExtensionContext): Promisevscode.extensions.getExtension(rd.extension.name)?.exports; - context.subscriptions.push(rdApi.registerOptionsSourceProvider(new ArcControllerConfigProfilesOptionsSource(azdataApi))); + // TODO: Uncomment this once azdata extension is removed + // const rdApi = vscode.extensions.getExtension(rd.extension.name)?.exports; + // context.subscriptions.push(rdApi.registerOptionsSourceProvider(new ArcControllerConfigProfilesOptionsSource(azdataApi))); return azdataApi; }