mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 11:01:37 -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%",
|
"displayName": "%azdata.displayName%",
|
||||||
"description": "%azdata.description%",
|
"description": "%azdata.description%",
|
||||||
"version": "0.6.6",
|
"version": "0.1.0",
|
||||||
"publisher": "Microsoft",
|
"publisher": "Microsoft",
|
||||||
"preview": true,
|
"preview": true,
|
||||||
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
|
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
|
||||||
@@ -28,12 +28,12 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"title": "%azdata.config.title%",
|
"title": "%azdata.config.title%",
|
||||||
"properties": {
|
"properties": {
|
||||||
"azdata.logDebugInfo": {
|
"azcli.logDebugInfo": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false,
|
"default": false,
|
||||||
"description": "%azdata.config.debug%"
|
"description": "%azdata.config.debug%"
|
||||||
},
|
},
|
||||||
"azdata.acceptEula": {
|
"azcli.acceptEula": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "prompt",
|
"default": "prompt",
|
||||||
"enum": [
|
"enum": [
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
],
|
],
|
||||||
"description": "%azdata.acceptEula.description%"
|
"description": "%azdata.acceptEula.description%"
|
||||||
},
|
},
|
||||||
"azdata.install": {
|
"azcli.install": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "prompt",
|
"default": "prompt",
|
||||||
"enum": [
|
"enum": [
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
],
|
],
|
||||||
"description": "%azdata.install.description%"
|
"description": "%azdata.install.description%"
|
||||||
},
|
},
|
||||||
"azdata.update": {
|
"azcli.update": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "prompt",
|
"default": "prompt",
|
||||||
"enum": [
|
"enum": [
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
],
|
],
|
||||||
"description": "%azdata.update.description%"
|
"description": "%azdata.update.description%"
|
||||||
},
|
},
|
||||||
"azdata.requiredUpdate": {
|
"azcli.requiredUpdate": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "prompt",
|
"default": "prompt",
|
||||||
"enum": [
|
"enum": [
|
||||||
@@ -90,17 +90,17 @@
|
|||||||
],
|
],
|
||||||
"commands": [
|
"commands": [
|
||||||
{
|
{
|
||||||
"command": "azdata.acceptEula",
|
"command": "azcli.acceptEula",
|
||||||
"title": "%azdata.acceptEula.command.name%",
|
"title": "%azdata.acceptEula.command.name%",
|
||||||
"category": "%command.category%"
|
"category": "%command.category%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "azdata.install",
|
"command": "azcli.install",
|
||||||
"title": "%azdata.install.command.name%",
|
"title": "%azdata.install.command.name%",
|
||||||
"category": "%command.category%"
|
"category": "%command.category%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "azdata.update",
|
"command": "azcli.update",
|
||||||
"title": "%azdata.update.command.name%",
|
"title": "%azdata.update.command.name%",
|
||||||
"category": "%command.category%"
|
"category": "%command.category%"
|
||||||
}
|
}
|
||||||
@@ -108,16 +108,16 @@
|
|||||||
"menus": {
|
"menus": {
|
||||||
"commandPalette": [
|
"commandPalette": [
|
||||||
{
|
{
|
||||||
"command": "azdata.acceptEula",
|
"command": "azcli.acceptEula",
|
||||||
"when": "!azdata.eulaAccepted"
|
"when": "!azcli.eulaAccepted"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "azdata.install",
|
"command": "azcli.install",
|
||||||
"when": "!azdata.found"
|
"when": "!azcli.found"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "azdata.update",
|
"command": "azcli.update",
|
||||||
"when": "azdata.found"
|
"when": "azcli.found"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -150,10 +150,5 @@
|
|||||||
"sinon": "^9.0.2",
|
"sinon": "^9.0.2",
|
||||||
"typemoq": "^2.1.0",
|
"typemoq": "^2.1.0",
|
||||||
"vscodetestcover": "^1.1.0"
|
"vscodetestcover": "^1.1.0"
|
||||||
},
|
|
||||||
"__metadata": {
|
|
||||||
"id": "73",
|
|
||||||
"publisherDisplayName": "Microsoft",
|
|
||||||
"publisherId": "Microsoft"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
{
|
{
|
||||||
"azdata.displayName": "Azure Data CLI",
|
"azdata.displayName": "Azure CLI",
|
||||||
"azdata.description": "Support for Azure Data CLI.",
|
"azdata.description": "Support for Azure CLI.",
|
||||||
"azdata.config.title": "Azure Data CLI Configuration",
|
"azdata.config.title": "Azure CLI Configuration",
|
||||||
"azdata.config.debug": "Log debug info to the output channel for all executed azdata commands",
|
"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.acceptEula.command.name": "Accept Eula",
|
||||||
"azdata.install.command.name": "Install",
|
"azdata.install.command.name": "Install",
|
||||||
"azdata.update.command.name": "Check for Update",
|
"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.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 Data CLI",
|
"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 Data 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.description": "Choose how install of Azure CLI is done",
|
||||||
"azdata.install.prompt.description": "The user will be prompted for installation of the Azure Data CLI",
|
"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 Data 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.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 Data 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 Data CLI",
|
"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 Data CLI"
|
"azdata.update.dontPrompt.description": "The user will not be prompted for update of the Azure CLI"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
// config setting keys
|
// config setting keys
|
||||||
export const azdataConfigSection: string = 'azdata';
|
export const azdataConfigSection: string = 'azcli';
|
||||||
export const azdataAcceptEulaKey: string = 'acceptEula';
|
export const azdataAcceptEulaKey: string = 'acceptEula';
|
||||||
export const azdataInstallKey: string = 'install';
|
export const azdataInstallKey: string = 'install';
|
||||||
export const azdataUpdateKey: string = 'update';
|
export const azdataUpdateKey: string = 'update';
|
||||||
@@ -13,8 +13,8 @@ export const debugConfigKey = 'logDebugInfo';
|
|||||||
|
|
||||||
|
|
||||||
// context keys && memento keys
|
// context keys && memento keys
|
||||||
export const eulaAccepted = 'azdata.eulaAccepted';
|
export const eulaAccepted = 'azcli.eulaAccepted';
|
||||||
export const azdataFound = 'azdata.found';
|
export const azdataFound = 'azcli.found';
|
||||||
|
|
||||||
// other constants
|
// other constants
|
||||||
export const azdataHostname = 'https://aka.ms';
|
export const azdataHostname = 'https://aka.ms';
|
||||||
|
|||||||
@@ -4,28 +4,26 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as azdataExt from 'azdata-ext';
|
import * as azdataExt from 'azdata-ext';
|
||||||
import * as rd from 'resource-deployment';
|
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import { getExtensionApi } from './api';
|
import { getExtensionApi } from './api';
|
||||||
import { checkAndInstallAzdata, checkAndUpdateAzdata, findAzdata, isEulaAccepted, promptForEula } from './azdata';
|
import { checkAndInstallAzdata, checkAndUpdateAzdata, findAzdata, isEulaAccepted, promptForEula } from './azdata';
|
||||||
import Logger from './common/logger';
|
import Logger from './common/logger';
|
||||||
import * as constants from './constants';
|
import * as constants from './constants';
|
||||||
import * as loc from './localizedConstants';
|
import * as loc from './localizedConstants';
|
||||||
import { ArcControllerConfigProfilesOptionsSource } from './providers/arcControllerConfigProfilesOptionsSource';
|
|
||||||
import { AzdataToolService } from './services/azdataToolService';
|
import { AzdataToolService } from './services/azdataToolService';
|
||||||
|
|
||||||
export async function activate(context: vscode.ExtensionContext): Promise<azdataExt.IExtension> {
|
export async function activate(context: vscode.ExtensionContext): Promise<azdataExt.IExtension> {
|
||||||
const azdataToolService = new AzdataToolService();
|
const azdataToolService = new AzdataToolService();
|
||||||
let eulaAccepted: boolean = false;
|
let eulaAccepted: boolean = false;
|
||||||
vscode.commands.registerCommand('azdata.acceptEula', async () => {
|
vscode.commands.registerCommand('azcli.acceptEula', async () => {
|
||||||
await promptForEula(context.globalState, true /* userRequested */);
|
await promptForEula(context.globalState, true /* userRequested */);
|
||||||
});
|
});
|
||||||
|
|
||||||
vscode.commands.registerCommand('azdata.install', async () => {
|
vscode.commands.registerCommand('azcli.install', async () => {
|
||||||
azdataToolService.localAzdata = await checkAndInstallAzdata(true /* userRequested */);
|
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
|
if (await checkAndUpdateAzdata(azdataToolService.localAzdata, true /* userRequested */)) { // if an update was performed
|
||||||
azdataToolService.localAzdata = await findAzdata(); // find and save the currently installed azdata
|
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);
|
const azdataApi = getExtensionApi(context.globalState, azdataToolService, localAzdataDiscovered);
|
||||||
|
|
||||||
// register option source(s)
|
// register option source(s)
|
||||||
const rdApi = <rd.IExtension>vscode.extensions.getExtension(rd.extension.name)?.exports;
|
// TODO: Uncomment this once azdata extension is removed
|
||||||
context.subscriptions.push(rdApi.registerOptionsSourceProvider(new ArcControllerConfigProfilesOptionsSource(azdataApi)));
|
// const rdApi = <rd.IExtension>vscode.extensions.getExtension(rd.extension.name)?.exports;
|
||||||
|
// context.subscriptions.push(rdApi.registerOptionsSourceProvider(new ArcControllerConfigProfilesOptionsSource(azdataApi)));
|
||||||
|
|
||||||
return azdataApi;
|
return azdataApi;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user