Skip to content

Commit 8f55e40

Browse files
authored
feat(explorer): enable EventBridge Schemas in Cloud9 #2993
Also update generateIcons.ts to avoid inverted colors on Cloud9.
1 parent a8405b4 commit 8f55e40

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "Cloud9: browse and generate code for EventBridge Schemas from AWS Explorer"
4+
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,17 +1485,17 @@
14851485
},
14861486
{
14871487
"command": "aws.searchSchema",
1488-
"when": "view == aws.explorer && viewItem == awsSchemasNode && !isCloud9",
1488+
"when": "view == aws.explorer && viewItem == awsSchemasNode",
14891489
"group": "0@1"
14901490
},
14911491
{
14921492
"command": "aws.searchSchemaPerRegistry",
1493-
"when": "view == aws.explorer && viewItem == awsRegistryItemNode && !isCloud9",
1493+
"when": "view == aws.explorer && viewItem == awsRegistryItemNode",
14941494
"group": "0@1"
14951495
},
14961496
{
14971497
"command": "aws.viewSchemaItem",
1498-
"when": "view == aws.explorer && viewItem == awsSchemaItemNode && !isCloud9",
1498+
"when": "view == aws.explorer && viewItem == awsSchemaItemNode",
14991499
"group": "0@1"
15001500
},
15011501
{
@@ -1680,7 +1680,7 @@
16801680
},
16811681
{
16821682
"command": "aws.downloadSchemaItemCode",
1683-
"when": "view == aws.explorer && viewItem == awsSchemaItemNode && !isCloud9",
1683+
"when": "view == aws.explorer && viewItem == awsSchemaItemNode",
16841684
"group": "1@1"
16851685
},
16861686
{

scripts/build/generateIcons.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ async function generateCloud9Icons(targets: { name: string; path: string }[], de
8181

8282
async function replaceColor(file: string, color: string, dst: string): Promise<void> {
8383
const contents = await fs.readFile(file, 'utf-8')
84-
const replaced = contents.replace('currentColor', color)
84+
const replaced = contents.replace(/currentColor/g, color)
8585
await fs.writeFile(dst, replaced)
8686
}
8787

src/awsexplorer/regionNode.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { LambdaNode } from '../lambda/explorer/lambdaNodes'
1212
import { S3Node } from '../s3/explorer/s3Nodes'
1313
import { EcrNode } from '../ecr/explorer/ecrNode'
1414
import { IotNode } from '../iot/explorer/iotNodes'
15-
import { isCloud9 } from '../shared/extensionUtilities'
1615
import { Region } from '../shared/regions/endpoints'
1716
import { DEFAULT_PARTITION, RegionProvider } from '../shared/regions/regionProvider'
1817
import { AWSTreeNodeBase } from '../shared/treeview/nodes/awsTreeNodeBase'
@@ -67,8 +66,7 @@ const serviceCandidates = [
6766
},
6867
{
6968
serviceId: 'schemas',
70-
createFn: (regionCode: string) =>
71-
!isCloud9() ? new SchemasNode(new DefaultSchemaClient(regionCode)) : undefined,
69+
createFn: (regionCode: string) => new SchemasNode(new DefaultSchemaClient(regionCode)),
7270
},
7371
{
7472
serviceId: 'states',

src/extension.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import {
2626
getIdeProperties,
2727
getToolkitEnvironmentDetails,
2828
initializeComputeRegion,
29-
isCloud9,
3029
showQuickStartWebview,
3130
showWelcomeMessage,
3231
} from './shared/extensionUtilities'
@@ -229,10 +228,7 @@ export async function activate(context: vscode.ExtensionContext) {
229228

230229
await activateEcs(extContext)
231230

232-
// Features which aren't currently functional in Cloud9
233-
if (!isCloud9()) {
234-
await activateSchemas(extContext)
235-
}
231+
await activateSchemas(extContext)
236232

237233
await activateStepFunctions(context, awsContext, toolkitOutputChannel)
238234

0 commit comments

Comments
 (0)