mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
use azurecore and azureresource as typings (#11892)
* use azurecore and azureresource as typings * Remove unrelated file
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as azurecore from '../../../azurecore/src/azurecore';
|
import * as azurecore from 'azurecore';
|
||||||
import * as loc from '../localizedConstants';
|
import * as loc from '../localizedConstants';
|
||||||
import { IconPathHelper, IconPath, ResourceType, ConnectionMode } from '../constants';
|
import { IconPathHelper, IconPath, ResourceType, ConnectionMode } from '../constants';
|
||||||
|
|
||||||
|
|||||||
1
extensions/arc/src/typings/refs.d.ts
vendored
1
extensions/arc/src/typings/refs.d.ts
vendored
@@ -5,4 +5,5 @@
|
|||||||
|
|
||||||
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||||
|
/// <reference path='../../../azurecore/src/azurecore.d.ts'/>
|
||||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { TreeDataProvider } from 'vscode';
|
declare module 'azureResource' {
|
||||||
import { DataProvider, Account, TreeItem } from 'azdata';
|
import { TreeDataProvider } from 'vscode';
|
||||||
|
import { DataProvider, Account, TreeItem } from 'azdata';
|
||||||
export namespace azureResource {
|
export namespace azureResource {
|
||||||
export interface IAzureResourceProvider extends DataProvider {
|
export interface IAzureResourceProvider extends DataProvider {
|
||||||
getTreeDataProvider(): IAzureResourceTreeDataProvider;
|
getTreeDataProvider(): IAzureResourceTreeDataProvider;
|
||||||
}
|
}
|
||||||
@@ -48,4 +48,5 @@ export namespace azureResource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import * as nls from 'vscode-nls';
|
|||||||
const localize = nls.loadMessageBundle();
|
const localize = nls.loadMessageBundle();
|
||||||
|
|
||||||
import { AppContext } from '../appContext';
|
import { AppContext } from '../appContext';
|
||||||
import { azureResource } from './azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { TreeNode } from './treeNode';
|
import { TreeNode } from './treeNode';
|
||||||
import { AzureResourceCredentialError } from './errors';
|
import { AzureResourceCredentialError } from './errors';
|
||||||
import { AzureResourceTreeProvider } from './tree/treeProvider';
|
import { AzureResourceTreeProvider } from './tree/treeProvider';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as msRest from '@azure/ms-rest-js';
|
|||||||
|
|
||||||
import { Account } from 'azdata';
|
import { Account } from 'azdata';
|
||||||
|
|
||||||
import { azureResource } from './azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { AzureAccount, Tenant } from '../account-provider/interfaces';
|
import { AzureAccount, Tenant } from '../account-provider/interfaces';
|
||||||
|
|
||||||
export interface IAzureResourceSubscriptionService {
|
export interface IAzureResourceSubscriptionService {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
import { ExtensionContext } from 'vscode';
|
import { ExtensionContext } from 'vscode';
|
||||||
|
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { AzureResourceDatabaseTreeDataProvider } from './databaseTreeDataProvider';
|
import { AzureResourceDatabaseTreeDataProvider } from './databaseTreeDataProvider';
|
||||||
import { IAzureResourceService } from '../../interfaces';
|
import { IAzureResourceService } from '../../interfaces';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { ServiceClientCredentials } from '@azure/ms-rest-js';
|
import { ServiceClientCredentials } from '@azure/ms-rest-js';
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { IAzureResourceService } from '../../interfaces';
|
import { IAzureResourceService } from '../../interfaces';
|
||||||
import { serversQuery, DbServerGraphData } from '../databaseServer/databaseServerService';
|
import { serversQuery, DbServerGraphData } from '../databaseServer/databaseServerService';
|
||||||
import { ResourceGraphClient } from '@azure/arm-resourcegraph';
|
import { ResourceGraphClient } from '@azure/arm-resourcegraph';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import * as vscode from 'vscode';
|
|||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
const localize = nls.loadMessageBundle();
|
const localize = nls.loadMessageBundle();
|
||||||
|
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { AzureResourceItemType } from '../../../azureResource/constants';
|
import { AzureResourceItemType } from '../../../azureResource/constants';
|
||||||
import { generateGuid } from '../../utils';
|
import { generateGuid } from '../../utils';
|
||||||
import { IAzureResourceService } from '../../interfaces';
|
import { IAzureResourceService } from '../../interfaces';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import { ExtensionContext } from 'vscode';
|
import { ExtensionContext } from 'vscode';
|
||||||
|
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { IAzureResourceService } from '../../interfaces';
|
import { IAzureResourceService } from '../../interfaces';
|
||||||
import { AzureResourceDatabaseServerTreeDataProvider } from './databaseServerTreeDataProvider';
|
import { AzureResourceDatabaseServerTreeDataProvider } from './databaseServerTreeDataProvider';
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
|
|
||||||
|
|
||||||
export interface DbServerGraphData extends GraphData {
|
export interface DbServerGraphData extends GraphData {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { AzureResourceItemType } from '../../../azureResource/constants';
|
|||||||
import { generateGuid } from '../../utils';
|
import { generateGuid } from '../../utils';
|
||||||
import { IAzureResourceService } from '../../interfaces';
|
import { IAzureResourceService } from '../../interfaces';
|
||||||
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
|
|
||||||
export class AzureResourceDatabaseServerTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
export class AzureResourceDatabaseServerTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
||||||
private static readonly containerId = 'azure.resource.providers.databaseServer.treeDataProvider.databaseServerContainer';
|
private static readonly containerId = 'azure.resource.providers.databaseServer.treeDataProvider.databaseServerContainer';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import { ExtensionContext } from 'vscode';
|
import { ExtensionContext } from 'vscode';
|
||||||
|
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { IAzureResourceService } from '../../interfaces';
|
import { IAzureResourceService } from '../../interfaces';
|
||||||
import { KustoTreeDataProvider as KustoTreeDataProvider } from './kustoTreeDataProvider';
|
import { KustoTreeDataProvider as KustoTreeDataProvider } from './kustoTreeDataProvider';
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
||||||
|
|
||||||
export interface KustoGraphData extends GraphData {
|
export interface KustoGraphData extends GraphData {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { AzureResourceItemType } from '../../constants';
|
|||||||
import { generateGuid } from '../../utils';
|
import { generateGuid } from '../../utils';
|
||||||
import { IAzureResourceService } from '../../interfaces';
|
import { IAzureResourceService } from '../../interfaces';
|
||||||
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
|
|
||||||
export class KustoTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
export class KustoTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
||||||
private static readonly containerId = 'azure.resource.providers.KustoContainer';
|
private static readonly containerId = 'azure.resource.providers.KustoContainer';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import { ExtensionContext } from 'vscode';
|
import { ExtensionContext } from 'vscode';
|
||||||
|
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { IAzureResourceService } from '../../interfaces';
|
import { IAzureResourceService } from '../../interfaces';
|
||||||
import { PostgresServerArcTreeDataProvider as PostgresServerArcTreeDataProvider } from './postgresServerTreeDataProvider';
|
import { PostgresServerArcTreeDataProvider as PostgresServerArcTreeDataProvider } from './postgresServerTreeDataProvider';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
|
|
||||||
export interface PostgresArcServerGraphData extends GraphData {
|
export interface PostgresArcServerGraphData extends GraphData {
|
||||||
properties: {
|
properties: {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { AzureResourceItemType } from '../../constants';
|
|||||||
import { generateGuid } from '../../utils';
|
import { generateGuid } from '../../utils';
|
||||||
import { IAzureResourceService } from '../../interfaces';
|
import { IAzureResourceService } from '../../interfaces';
|
||||||
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
|
|
||||||
export class PostgresServerArcTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
export class PostgresServerArcTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
||||||
private static readonly containerId = 'azure.resource.providers.postgresArcServer.treeDataProvider.postgresServerContainer';
|
private static readonly containerId = 'azure.resource.providers.postgresArcServer.treeDataProvider.postgresServerContainer';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import { ExtensionContext } from 'vscode';
|
import { ExtensionContext } from 'vscode';
|
||||||
|
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { IAzureResourceService } from '../../interfaces';
|
import { IAzureResourceService } from '../../interfaces';
|
||||||
import { PostgresServerTreeDataProvider as PostgresServerTreeDataProvider } from './postgresServerTreeDataProvider';
|
import { PostgresServerTreeDataProvider as PostgresServerTreeDataProvider } from './postgresServerTreeDataProvider';
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
|
|
||||||
|
|
||||||
interface DbServerGraphData extends GraphData {
|
interface DbServerGraphData extends GraphData {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { AzureResourceItemType } from '../../constants';
|
|||||||
import { generateGuid } from '../../utils';
|
import { generateGuid } from '../../utils';
|
||||||
import { IAzureResourceService } from '../../interfaces';
|
import { IAzureResourceService } from '../../interfaces';
|
||||||
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
|
|
||||||
export class PostgresServerTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
export class PostgresServerTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
||||||
private static readonly containerId = 'azure.resource.providers.databaseServer.treeDataProvider.postgresServerContainer';
|
private static readonly containerId = 'azure.resource.providers.databaseServer.treeDataProvider.postgresServerContainer';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { DbServerGraphData } from '../databaseServer/databaseServerService';
|
import { DbServerGraphData } from '../databaseServer/databaseServerService';
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { ResourceServiceBase } from '../resourceTreeDataProviderBase';
|
import { ResourceServiceBase } from '../resourceTreeDataProviderBase';
|
||||||
|
|
||||||
export class AzureResourceGroupService extends ResourceServiceBase<DbServerGraphData, azureResource.AzureResourceResourceGroup> {
|
export class AzureResourceGroupService extends ResourceServiceBase<DbServerGraphData, azureResource.AzureResourceResourceGroup> {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as msRest from '@azure/ms-rest-js';
|
import * as msRest from '@azure/ms-rest-js';
|
||||||
|
|
||||||
import { azureResource } from '../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { IAzureResourceService } from '../interfaces';
|
import { IAzureResourceService } from '../interfaces';
|
||||||
import { AzureResourceErrorMessageUtil } from '../utils';
|
import { AzureResourceErrorMessageUtil } from '../utils';
|
||||||
import { ResourceGraphClient } from '@azure/arm-resourcegraph';
|
import { ResourceGraphClient } from '@azure/arm-resourcegraph';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import { ExtensionContext } from 'vscode';
|
import { ExtensionContext } from 'vscode';
|
||||||
|
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { IAzureResourceService } from '../../interfaces';
|
import { IAzureResourceService } from '../../interfaces';
|
||||||
import { SqlInstanceTreeDataProvider as SqlInstanceTreeDataProvider } from './sqlInstanceTreeDataProvider';
|
import { SqlInstanceTreeDataProvider as SqlInstanceTreeDataProvider } from './sqlInstanceTreeDataProvider';
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
||||||
|
|
||||||
interface SqlInstanceGraphData extends GraphData {
|
interface SqlInstanceGraphData extends GraphData {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { AzureResourceItemType } from '../../constants';
|
|||||||
import { generateGuid } from '../../utils';
|
import { generateGuid } from '../../utils';
|
||||||
import { IAzureResourceService } from '../../interfaces';
|
import { IAzureResourceService } from '../../interfaces';
|
||||||
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
|
|
||||||
export class SqlInstanceTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
export class SqlInstanceTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
||||||
private static readonly containerId = 'azure.resource.providers.sqlInstanceContainer';
|
private static readonly containerId = 'azure.resource.providers.sqlInstanceContainer';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import { ExtensionContext } from 'vscode';
|
import { ExtensionContext } from 'vscode';
|
||||||
|
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { IAzureResourceService } from '../../interfaces';
|
import { IAzureResourceService } from '../../interfaces';
|
||||||
import { SqlInstanceArcTreeDataProvider as SqlInstanceArcTreeDataProvider } from './sqlInstanceArcTreeDataProvider';
|
import { SqlInstanceArcTreeDataProvider as SqlInstanceArcTreeDataProvider } from './sqlInstanceArcTreeDataProvider';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
import { ResourceServiceBase, GraphData } from '../resourceTreeDataProviderBase';
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
|
|
||||||
export interface SqlInstanceArcGraphData extends GraphData {
|
export interface SqlInstanceArcGraphData extends GraphData {
|
||||||
properties: {
|
properties: {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { AzureResourceItemType } from '../../constants';
|
|||||||
import { generateGuid } from '../../utils';
|
import { generateGuid } from '../../utils';
|
||||||
import { IAzureResourceService } from '../../interfaces';
|
import { IAzureResourceService } from '../../interfaces';
|
||||||
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
import { ResourceTreeDataProviderBase } from '../resourceTreeDataProviderBase';
|
||||||
import { azureResource } from '../../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
|
|
||||||
export class SqlInstanceArcTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
export class SqlInstanceArcTreeDataProvider extends ResourceTreeDataProviderBase<azureResource.AzureResourceDatabaseServer> {
|
||||||
private static readonly containerId = 'azure.resource.providers.sqlInstanceArcContainer';
|
private static readonly containerId = 'azure.resource.providers.sqlInstanceArcContainer';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import { extensions, TreeItem } from 'vscode';
|
import { extensions, TreeItem } from 'vscode';
|
||||||
import { Account } from 'azdata';
|
import { Account } from 'azdata';
|
||||||
|
|
||||||
import { azureResource } from './azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { IAzureResourceNodeWithProviderId } from './interfaces';
|
import { IAzureResourceNodeWithProviderId } from './interfaces';
|
||||||
|
|
||||||
export class AzureResourceService {
|
export class AzureResourceService {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import { Account } from 'azdata';
|
import { Account } from 'azdata';
|
||||||
|
|
||||||
import { azureResource } from '../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { IAzureResourceSubscriptionFilterService, IAzureResourceCacheService } from '../interfaces';
|
import { IAzureResourceSubscriptionFilterService, IAzureResourceCacheService } from '../interfaces';
|
||||||
|
|
||||||
interface AzureResourceSelectedSubscriptionsCache {
|
interface AzureResourceSelectedSubscriptionsCache {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import { Account } from 'azdata';
|
import { Account } from 'azdata';
|
||||||
import { SubscriptionClient } from '@azure/arm-subscriptions';
|
import { SubscriptionClient } from '@azure/arm-subscriptions';
|
||||||
|
|
||||||
import { azureResource } from '../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { IAzureResourceSubscriptionService } from '../interfaces';
|
import { IAzureResourceSubscriptionService } from '../interfaces';
|
||||||
|
|
||||||
export class AzureResourceSubscriptionService implements IAzureResourceSubscriptionService {
|
export class AzureResourceSubscriptionService implements IAzureResourceSubscriptionService {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import * as nls from 'vscode-nls';
|
|||||||
const localize = nls.loadMessageBundle();
|
const localize = nls.loadMessageBundle();
|
||||||
|
|
||||||
import { AppContext } from '../../appContext';
|
import { AppContext } from '../../appContext';
|
||||||
import { azureResource } from '../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { TreeNode } from '../treeNode';
|
import { TreeNode } from '../treeNode';
|
||||||
import { AzureResourceCredentialError } from '../errors';
|
import { AzureResourceCredentialError } from '../errors';
|
||||||
import { AzureResourceContainerTreeNodeBase } from './baseTreeNodes';
|
import { AzureResourceContainerTreeNodeBase } from './baseTreeNodes';
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { AppContext } from '../../appContext';
|
|||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
const localize = nls.loadMessageBundle();
|
const localize = nls.loadMessageBundle();
|
||||||
|
|
||||||
import { azureResource } from '../azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { TreeNode } from '../treeNode';
|
import { TreeNode } from '../treeNode';
|
||||||
import { IAzureResourceNodeWithProviderId } from '../interfaces';
|
import { IAzureResourceNodeWithProviderId } from '../interfaces';
|
||||||
import { AzureResourceContainerTreeNodeBase } from './baseTreeNodes';
|
import { AzureResourceContainerTreeNodeBase } from './baseTreeNodes';
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import { azureResource } from './azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { GetResourceGroupsResult, GetSubscriptionsResult } from '../azurecore';
|
import { GetResourceGroupsResult, GetSubscriptionsResult } from 'azurecore';
|
||||||
import { isArray } from 'util';
|
import { isArray } from 'util';
|
||||||
import { AzureResourceGroupService } from './providers/resourceGroup/resourceGroupService';
|
import { AzureResourceGroupService } from './providers/resourceGroup/resourceGroupService';
|
||||||
import { TokenCredentials } from '@azure/ms-rest-js';
|
import { TokenCredentials } from '@azure/ms-rest-js';
|
||||||
|
|||||||
27
extensions/azurecore/src/azurecore.d.ts
vendored
27
extensions/azurecore/src/azurecore.d.ts
vendored
@@ -3,23 +3,23 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
declare module 'azurecore' {
|
||||||
import { azureResource } from './azureResource/azure-resource';
|
import * as azdata from 'azdata';
|
||||||
|
import { azureResource } from 'azureResource';
|
||||||
/**
|
/**
|
||||||
* Covers defining what the azurecore extension exports to other extensions
|
* Covers defining what the azurecore extension exports to other extensions
|
||||||
*
|
*
|
||||||
* IMPORTANT: THIS IS NOT A HARD DEFINITION unlike vscode; therefore no enums or classes should be defined here
|
* IMPORTANT: THIS IS NOT A HARD DEFINITION unlike vscode; therefore no enums or classes should be defined here
|
||||||
* (const enums get evaluated when typescript -> javascript so those are fine)
|
* (const enums get evaluated when typescript -> javascript so those are fine)
|
||||||
*/
|
*/
|
||||||
export const enum extension {
|
export const enum extension {
|
||||||
name = 'Microsoft.azurecore'
|
name = 'Microsoft.azurecore'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enumeration of the Azure datacenter regions. See https://docs.microsoft.com/dotnet/api/microsoft.azure.management.resourcemanager.fluent.core.region
|
* Enumeration of the Azure datacenter regions. See https://docs.microsoft.com/dotnet/api/microsoft.azure.management.resourcemanager.fluent.core.region
|
||||||
*/
|
*/
|
||||||
export const enum AzureRegion {
|
export const enum AzureRegion {
|
||||||
australiacentral = 'australiacentral',
|
australiacentral = 'australiacentral',
|
||||||
australiacentral2 = 'australiacentral2',
|
australiacentral2 = 'australiacentral2',
|
||||||
australiaeast = 'australiaeast',
|
australiaeast = 'australiaeast',
|
||||||
@@ -60,9 +60,9 @@ export const enum AzureRegion {
|
|||||||
westindia = 'westindia',
|
westindia = 'westindia',
|
||||||
westus = 'westus',
|
westus = 'westus',
|
||||||
westus2 = 'westus2',
|
westus2 = 'westus2',
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IExtension {
|
export interface IExtension {
|
||||||
getSubscriptions(account?: azdata.Account, ignoreErrors?: boolean): Thenable<GetSubscriptionsResult>;
|
getSubscriptions(account?: azdata.Account, ignoreErrors?: boolean): Thenable<GetSubscriptionsResult>;
|
||||||
getResourceGroups(account?: azdata.Account, subscription?: azureResource.AzureResourceSubscription, ignoreErrors?: boolean): Thenable<GetResourceGroupsResult>;
|
getResourceGroups(account?: azdata.Account, subscription?: azureResource.AzureResourceSubscription, ignoreErrors?: boolean): Thenable<GetResourceGroupsResult>;
|
||||||
/**
|
/**
|
||||||
@@ -71,7 +71,8 @@ export interface IExtension {
|
|||||||
*/
|
*/
|
||||||
getRegionDisplayName(region?: string): string;
|
getRegionDisplayName(region?: string): string;
|
||||||
provideResources(): azureResource.IAzureResourceProvider[];
|
provideResources(): azureResource.IAzureResourceProvider[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GetSubscriptionsResult = { subscriptions: azureResource.AzureResourceSubscription[], errors: Error[] };
|
export type GetSubscriptionsResult = { subscriptions: azureResource.AzureResourceSubscription[], errors: Error[] };
|
||||||
export type GetResourceGroupsResult = { resourceGroups: azureResource.AzureResourceResourceGroup[], errors: Error[] };
|
export type GetResourceGroupsResult = { resourceGroups: azureResource.AzureResourceResourceGroup[], errors: Error[] };
|
||||||
|
}
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ import { SqlInstanceArcProvider } from './azureResource/providers/sqlinstanceArc
|
|||||||
import { SqlInstanceArcResourceService } from './azureResource/providers/sqlinstanceArc/sqlInstanceArcService';
|
import { SqlInstanceArcResourceService } from './azureResource/providers/sqlinstanceArc/sqlInstanceArcService';
|
||||||
import { PostgresServerArcProvider } from './azureResource/providers/postgresArcServer/postgresServerProvider';
|
import { PostgresServerArcProvider } from './azureResource/providers/postgresArcServer/postgresServerProvider';
|
||||||
import { PostgresServerArcService } from './azureResource/providers/postgresArcServer/postgresServerService';
|
import { PostgresServerArcService } from './azureResource/providers/postgresArcServer/postgresServerService';
|
||||||
import { azureResource } from './azureResource/azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import * as azurecore from './azurecore';
|
import * as azurecore from 'azurecore';
|
||||||
import * as azureResourceUtils from './azureResource/utils';
|
import * as azureResourceUtils from './azureResource/utils';
|
||||||
import * as utils from './utils';
|
import * as utils from './utils';
|
||||||
import * as loc from './localizedConstants';
|
import * as loc from './localizedConstants';
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import * as vscode from 'vscode';
|
|||||||
import * as sinon from 'sinon';
|
import * as sinon from 'sinon';
|
||||||
import 'mocha';
|
import 'mocha';
|
||||||
|
|
||||||
import { azureResource } from '../../../../azureResource/azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { AzureResourceDatabaseTreeDataProvider } from '../../../../azureResource/providers/database/databaseTreeDataProvider';
|
import { AzureResourceDatabaseTreeDataProvider } from '../../../../azureResource/providers/database/databaseTreeDataProvider';
|
||||||
import { AzureResourceItemType } from '../../../../azureResource/constants';
|
import { AzureResourceItemType } from '../../../../azureResource/constants';
|
||||||
import { IAzureResourceService } from '../../../../azureResource/interfaces';
|
import { IAzureResourceService } from '../../../../azureResource/interfaces';
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import * as vscode from 'vscode';
|
|||||||
import * as sinon from 'sinon';
|
import * as sinon from 'sinon';
|
||||||
import 'mocha';
|
import 'mocha';
|
||||||
|
|
||||||
import { azureResource } from '../../../../azureResource/azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { AzureResourceDatabaseServerTreeDataProvider } from '../../../../azureResource/providers/databaseServer/databaseServerTreeDataProvider';
|
import { AzureResourceDatabaseServerTreeDataProvider } from '../../../../azureResource/providers/databaseServer/databaseServerTreeDataProvider';
|
||||||
import { AzureResourceItemType } from '../../../../azureResource/constants';
|
import { AzureResourceItemType } from '../../../../azureResource/constants';
|
||||||
import { IAzureResourceService } from '../../../../azureResource/interfaces';
|
import { IAzureResourceService } from '../../../../azureResource/interfaces';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import * as TypeMoq from 'typemoq';
|
|||||||
import 'mocha';
|
import 'mocha';
|
||||||
import { fail } from 'assert';
|
import { fail } from 'assert';
|
||||||
|
|
||||||
import { azureResource } from '../../azureResource/azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { AzureResourceService } from '../../azureResource/resourceService';
|
import { AzureResourceService } from '../../azureResource/resourceService';
|
||||||
import { AzureAccount } from '../../account-provider/interfaces';
|
import { AzureAccount } from '../../account-provider/interfaces';
|
||||||
import settings from '../../account-provider/providerSettings';
|
import settings from '../../account-provider/providerSettings';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import * as TypeMoq from 'typemoq';
|
|||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import 'mocha';
|
import 'mocha';
|
||||||
|
|
||||||
import { azureResource } from '../../azureResource/azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { AzureResourceService } from '../../azureResource/resourceService';
|
import { AzureResourceService } from '../../azureResource/resourceService';
|
||||||
import { AzureResourceResourceTreeNode } from '../../azureResource/resourceTreeNode';
|
import { AzureResourceResourceTreeNode } from '../../azureResource/resourceTreeNode';
|
||||||
import { AppContext } from '../../appContext';
|
import { AppContext } from '../../appContext';
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import 'mocha';
|
|||||||
import { TokenCredentials } from '@azure/ms-rest-js';
|
import { TokenCredentials } from '@azure/ms-rest-js';
|
||||||
import { AppContext } from '../../../appContext';
|
import { AppContext } from '../../../appContext';
|
||||||
|
|
||||||
import { azureResource } from '../../../azureResource/azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import {
|
import {
|
||||||
IAzureResourceCacheService,
|
IAzureResourceCacheService,
|
||||||
IAzureResourceSubscriptionService,
|
IAzureResourceSubscriptionService,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import * as vscode from 'vscode';
|
|||||||
import 'mocha';
|
import 'mocha';
|
||||||
import { AppContext } from '../../../appContext';
|
import { AppContext } from '../../../appContext';
|
||||||
|
|
||||||
import { azureResource } from '../../../azureResource/azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { IAzureResourceTreeChangeHandler } from '../../../azureResource/tree/treeChangeHandler';
|
import { IAzureResourceTreeChangeHandler } from '../../../azureResource/tree/treeChangeHandler';
|
||||||
import { AzureResourceSubscriptionTreeNode } from '../../../azureResource/tree/subscriptionTreeNode';
|
import { AzureResourceSubscriptionTreeNode } from '../../../azureResource/tree/subscriptionTreeNode';
|
||||||
import { AzureResourceItemType, AzureResourceServiceNames } from '../../../azureResource/constants';
|
import { AzureResourceItemType, AzureResourceServiceNames } from '../../../azureResource/constants';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import * as should from 'should';
|
import * as should from 'should';
|
||||||
import 'mocha';
|
import 'mocha';
|
||||||
import { getRegionDisplayName } from '../utils';
|
import { getRegionDisplayName } from '../utils';
|
||||||
import { AzureRegion } from '../azurecore';
|
import { AzureRegion } from 'azurecore';
|
||||||
import * as loc from '../localizedConstants';
|
import * as loc from '../localizedConstants';
|
||||||
|
|
||||||
describe('Azurecore Utils Tests', function (): void {
|
describe('Azurecore Utils Tests', function (): void {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as loc from './localizedConstants';
|
import * as loc from './localizedConstants';
|
||||||
import { AzureRegion } from './azurecore';
|
import { AzureRegion } from 'azurecore';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts a region value (@see AzureRegion) into the localized Display Name
|
* Converts a region value (@see AzureRegion) into the localized Display Name
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as azurecore from '../../../azurecore/src/azurecore';
|
import * as azurecore from 'azurecore';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper class to act as a facade over VSCode and Data APIs and allow us to test / mock callbacks into
|
* Wrapper class to act as a facade over VSCode and Data APIs and allow us to test / mock callbacks into
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as azurecore from '../../../azurecore/src/azurecore';
|
import * as azurecore from 'azurecore';
|
||||||
import { azureResource } from '../../../azurecore/src/azureResource/azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
|
|
||||||
export class AzurecoreApiStub implements azurecore.IExtension {
|
export class AzurecoreApiStub implements azurecore.IExtension {
|
||||||
getSubscriptions(_account?: azdata.Account | undefined, _ignoreErrors?: boolean | undefined): Thenable<azurecore.GetSubscriptionsResult> {
|
getSubscriptions(_account?: azdata.Account | undefined, _ignoreErrors?: boolean | undefined): Thenable<azurecore.GetSubscriptionsResult> {
|
||||||
|
|||||||
@@ -6,4 +6,6 @@
|
|||||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||||
|
/// <reference path='../../../azurecore/src/azurecore.d.ts'/>
|
||||||
|
/// <reference path='../../../azurecore/src/azureResource/azure-resource.d.ts'/>
|
||||||
/// <reference types='@types/node'/>
|
/// <reference types='@types/node'/>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as azurecore from '../../../azurecore/src/azurecore';
|
import * as azurecore from 'azurecore';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
|
||||||
export interface IApiService {
|
export interface IApiService {
|
||||||
|
|||||||
@@ -6,4 +6,6 @@
|
|||||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||||
|
/// <reference path='../../../azurecore/src/azurecore.d.ts'/>
|
||||||
|
/// <reference path='../../../azurecore/src/azureResource/azure-resource.d.ts'/>
|
||||||
/// <reference types='@types/node'/>
|
/// <reference types='@types/node'/>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { createSection, getDropdownComponent, InputComponentInfo, InputComponent
|
|||||||
import { WizardPageBase } from '../../wizardPageBase';
|
import { WizardPageBase } from '../../wizardPageBase';
|
||||||
import { AksName_VariableName, Location_VariableName, ResourceGroup_VariableName, SubscriptionId_VariableName, VMCount_VariableName, VMSize_VariableName } from '../constants';
|
import { AksName_VariableName, Location_VariableName, ResourceGroup_VariableName, SubscriptionId_VariableName, VMCount_VariableName, VMSize_VariableName } from '../constants';
|
||||||
import { DeployClusterWizard } from '../deployClusterWizard';
|
import { DeployClusterWizard } from '../deployClusterWizard';
|
||||||
import { AzureRegion } from '../../../../../azurecore/src/azurecore';
|
import { AzureRegion } from 'azurecore';
|
||||||
const localize = nls.loadMessageBundle();
|
const localize = nls.loadMessageBundle();
|
||||||
const MissingRequiredInformationErrorMessage = localize('deployCluster.MissingRequiredInfoError', "Please fill out the required fields marked with red asterisks.");
|
const MissingRequiredInformationErrorMessage = localize('deployCluster.MissingRequiredInfoError', "Please fill out the required fields marked with red asterisks.");
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { EOL, homedir as os_homedir } from 'os';
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import { azureResource } from '../../../azurecore/src/azureResource/azure-resource';
|
import { azureResource } from 'azureResource';
|
||||||
import { AzureAccountFieldInfo, AzureLocationsFieldInfo, ComponentCSSStyles, DialogInfoBase, FieldInfo, FieldType, FilePickerFieldInfo, KubeClusterContextFieldInfo, LabelPosition, NoteBookEnvironmentVariablePrefix, OptionsInfo, OptionsType, PageInfoBase, RowInfo, SectionInfo, TextCSSStyles } from '../interfaces';
|
import { AzureAccountFieldInfo, AzureLocationsFieldInfo, ComponentCSSStyles, DialogInfoBase, FieldInfo, FieldType, FilePickerFieldInfo, KubeClusterContextFieldInfo, LabelPosition, NoteBookEnvironmentVariablePrefix, OptionsInfo, OptionsType, PageInfoBase, RowInfo, SectionInfo, TextCSSStyles } from '../interfaces';
|
||||||
import * as loc from '../localizedConstants';
|
import * as loc from '../localizedConstants';
|
||||||
import { apiService } from '../services/apiService';
|
import { apiService } from '../services/apiService';
|
||||||
|
|||||||
@@ -6,4 +6,5 @@
|
|||||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||||
|
/// <reference path='../../../azurecore/src/azurecore.d.ts'/>
|
||||||
/// <reference types='@types/node'/>
|
/// <reference types='@types/node'/>
|
||||||
|
|||||||
Reference in New Issue
Block a user