forked from microsoft/vscode-azureresourcegroups
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazureExtensions.ts
More file actions
130 lines (123 loc) · 4.04 KB
/
azureExtensions.ts
File metadata and controls
130 lines (123 loc) · 4.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { AppResource } from "@microsoft/vscode-azext-utils/hostapi";
import { AzExtResourceType } from "../api/src/index";
import { localize } from "./utils/localize";
export const azureExtensions: IAzExtMetadata[] = [
{
name: 'vscode-azurefunctions',
label: 'Functions',
resourceTypes: [
AzExtResourceType.FunctionApp
],
tutorial: {
label: localize('deployServerless', 'Create and deploy a serverless app'),
url: 'https://aka.ms/AAb5xpj'
},
reportIssueCommandId: 'azureFunctions.reportIssue'
},
{
name: 'vscode-azureappservice',
label: 'App Service',
resourceTypes: [
AzExtResourceType.AppServices
],
tutorial: {
label: localize('deployWebApp', 'Deploy a web app'),
url: 'https://aka.ms/AAb5dz2'
},
reportIssueCommandId: 'appService.ReportIssue'
},
{
name: 'vscode-azurestaticwebapps',
label: 'Static Web Apps',
resourceTypes: [
AzExtResourceType.StaticWebApps
],
tutorial: {
label: localize('deployStatic', 'Deploy a static app'),
url: 'https://aka.ms/AAb5xp8'
},
reportIssueCommandId: 'staticWebApps.reportIssue'
},
{
name: 'vscode-azureresourcegroups',
label: 'Resource Groups',
resourceTypes: [],
reportIssueCommandId: 'azureResourceGroups.reportIssue'
},
{
name: 'vscode-azurestorage',
label: 'Storage',
resourceTypes: [
AzExtResourceType.StorageAccounts
],
reportIssueCommandId: 'azureStorage.reportIssue'
},
{
name: 'vscode-azurevirtualmachines',
label: 'Virtual Machines',
resourceTypes: [
AzExtResourceType.VirtualMachines
],
reportIssueCommandId: 'azureVirtualMachines.reportIssue'
},
{
name: 'vscode-cosmosdb',
label: 'Databases',
resourceTypes: [
AzExtResourceType.AzureCosmosDb,
AzExtResourceType.PostgresqlServersStandard,
AzExtResourceType.PostgresqlServersFlexible,
],
reportIssueCommandId: 'azureDatabases.reportIssue'
},
{
name: 'vscode-azurecontainerapps',
label: 'Container Apps',
resourceTypes: [
AzExtResourceType.ContainerAppsEnvironment,
],
reportIssueCommandId: 'containerApps.reportIssue'
},
{
name: 'vscode-azurespringcloud',
publisher: 'vscjava',
label: 'Spring Apps',
resourceTypes: [
AzExtResourceType.SpringApps,
],
reportIssueCommandId: 'springApps.reportIssue'
}
];
export const legacyTypeMap: Partial<Record<AzExtResourceType, string>> = {
FunctionApp: 'microsoft.web/functionapp',
AppServices: 'microsoft.web/sites',
StaticWebApps: 'microsoft.web/staticsites',
VirtualMachines: 'microsoft.compute/virtualmachines',
AzureCosmosDb: 'microsoft.documentdb/databaseaccounts',
PostgresqlServersStandard: 'microsoft.dbforpostgresql/servers',
PostgresqlServersFlexible: 'microsoft.dbforpostgresql/flexibleservers',
SpringApps: 'microsoft.appplatform/spring'
}
export interface IAzExtMetadata {
name: string;
label: string;
publisher?: string;
resourceTypes: AzExtResourceType[];
tutorial?: IAzExtTutorial;
reportIssueCommandId?: string;
}
export interface IAzExtResourceType {
name: string;
/**
* Only necessary if the resourceType itself isn't enough to identify the extension
*/
matchesResource(resource: AppResource): boolean;
}
export interface IAzExtTutorial {
label: string;
url: string;
}