mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
Update some key az CLI references (#16032)
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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<azdataExt.IExtension> {
|
||||
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): Promise<azdata
|
||||
const azdataApi = getExtensionApi(context.globalState, azdataToolService, localAzdataDiscovered);
|
||||
|
||||
// register option source(s)
|
||||
const rdApi = <rd.IExtension>vscode.extensions.getExtension(rd.extension.name)?.exports;
|
||||
context.subscriptions.push(rdApi.registerOptionsSourceProvider(new ArcControllerConfigProfilesOptionsSource(azdataApi)));
|
||||
// TODO: Uncomment this once azdata extension is removed
|
||||
// const rdApi = <rd.IExtension>vscode.extensions.getExtension(rd.extension.name)?.exports;
|
||||
// context.subscriptions.push(rdApi.registerOptionsSourceProvider(new ArcControllerConfigProfilesOptionsSource(azdataApi)));
|
||||
|
||||
return azdataApi;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user