Rename name field of resourceSubType to resourceName (#14103)

* Rename name field of resourceSubType to resourceName

* update comment

* bump arc version
This commit is contained in:
Charles Gagnon
2021-02-01 13:04:05 -08:00
committed by GitHub
parent 8f5dc1526a
commit 2f49513bae
4 changed files with 7 additions and 7 deletions

View File

@@ -2,14 +2,14 @@
"name": "arc",
"displayName": "%arc.displayName%",
"description": "%arc.description%",
"version": "0.7.1",
"version": "0.7.2",
"publisher": "Microsoft",
"preview": true,
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
"icon": "images/extension.png",
"engines": {
"vscode": "*",
"azdata": ">=1.25.0"
"azdata": ">=1.26.0"
},
"activationEvents": [
"onCommand:arc.connectToController",
@@ -895,7 +895,7 @@
],
"resourceDeploymentSubTypes": [
{
"name": "azure-sql-mi",
"resourceName": "azure-sql-mi",
"options": [
{
"name": "mi-type",

View File

@@ -9,7 +9,7 @@
"icon": "images/extension.png",
"engines": {
"vscode": "*",
"azdata": ">=1.25.0"
"azdata": ">=1.26.0"
},
"activationEvents": [
"*"

View File

@@ -30,9 +30,9 @@ export interface ResourceType {
export interface ResourceSubType {
/**
* The name should match the name in Resource Type
* The name of the Resource Type this subtype is extending
*/
name: string;
resourceName: string;
/**
* The option name should have a matching name in ResourceType.options
*/

View File

@@ -131,7 +131,7 @@ export class ResourceTypeService implements IResourceTypeService {
const extensionResourceSubTypes = extension.packageJSON.contributes?.resourceDeploymentSubTypes as ResourceSubType[];
extensionResourceSubTypes?.forEach((extensionResourceSubType: ResourceSubType) => {
const resourceSubType = deepClone(extensionResourceSubType);
if (resourceSubType.name === resourceType.name) {
if (resourceSubType.resourceName === resourceType.name) {
this.updateProviderPathProperties(resourceSubType.provider, extension.extensionPath);
resourceSubTypes.push(resourceSubType);
const tagSet = new Set(resourceType.tags);