mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-03 09:35:40 -05:00
make it easy to indicate all platforms (#7467)
This commit is contained in:
@@ -74,11 +74,7 @@
|
||||
"name": "sql-image",
|
||||
"displayName": "%resource-type-sql-image-display-name%",
|
||||
"description": "%resource-type-sql-image-description%",
|
||||
"platforms": [
|
||||
"darwin",
|
||||
"win32",
|
||||
"linux"
|
||||
],
|
||||
"platforms": "*",
|
||||
"icon": {
|
||||
"light": "./images/sql_server_container.svg",
|
||||
"dark": "./images/sql_server_container_inverse.svg"
|
||||
@@ -208,11 +204,7 @@
|
||||
"name": "sql-bdc",
|
||||
"displayName": "%resource-type-sql-bdc-display-name%",
|
||||
"description": "%resource-type-sql-bdc-description%",
|
||||
"platforms": [
|
||||
"darwin",
|
||||
"linux",
|
||||
"win32"
|
||||
],
|
||||
"platforms": "*",
|
||||
"icon": {
|
||||
"light": "./images/sql_bdc.svg",
|
||||
"dark": "./images/sql_bdc_inverse.svg"
|
||||
|
||||
@@ -11,7 +11,7 @@ export interface ResourceType {
|
||||
name: string;
|
||||
displayName: string;
|
||||
description: string;
|
||||
platforms: string[];
|
||||
platforms: string[] | '*';
|
||||
icon: { light: string; dark: string };
|
||||
options: ResourceTypeOption[];
|
||||
providers: DeploymentProvider[];
|
||||
|
||||
@@ -52,7 +52,7 @@ export class ResourceTypeService implements IResourceTypeService {
|
||||
|
||||
let resourceTypes = this._resourceTypes;
|
||||
if (filterByPlatform) {
|
||||
resourceTypes = resourceTypes.filter(resourceType => resourceType.platforms.includes(this.platformService.platform()));
|
||||
resourceTypes = resourceTypes.filter(resourceType => (typeof resourceType.platforms === 'string' && resourceType.platforms === '*') || resourceType.platforms.includes(this.platformService.platform()));
|
||||
}
|
||||
|
||||
return resourceTypes;
|
||||
|
||||
Reference in New Issue
Block a user