Skip to content

Commit 40ac2b0

Browse files
committed
changes from mainline
1 parent 3ff6b2d commit 40ac2b0

File tree

4 files changed

+31
-11
lines changed

4 files changed

+31
-11
lines changed

packages/amazonq/.changes/next-release/Bug Fix-cd2d5207-4deb-43c7-a4f6-beb0692a5ea7.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/amazonq/test/web/extension.test.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,10 @@
44
*/
55

66
import assert from 'assert'
7-
import { ToolkitGlobals } from 'aws-core-vscode/shared'
7+
import { globals, ToolkitGlobals } from 'aws-core-vscode/shared'
88

99
describe('activation', async () => {
1010
it('defines a region provider that can provide regions when in web mode', async () => {
11-
// For some reason, a top-level import will result in undefined.
12-
// Other tests don't seem to have this issue.
13-
// TODO: why?
14-
const { globals } = require('aws-core-vscode/shared')
15-
1611
assert((globals as unknown as ToolkitGlobals).regionProvider.getRegions().length > 0)
1712
})
1813
})

packages/core/src/test/testRunner.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ export async function runTests(
3535
}
3636

3737
/**
38+
* Tests are not run for core at the moment, but leaving this here because it may be useful in the future.
39+
* It might also explain why `import { global } ...` works in web tests but `import global ...` does not.
40+
*
3841
* Node's `require` caches modules by case-sensitive paths, regardless of the underlying
3942
* file system. This is normally not a problem, but VS Code also happens to normalize paths
4043
* on Windows to use lowercase drive letters when using its bootstrap loader. This means

packages/toolkit/package.json

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,6 +1144,10 @@
11441144
"command": "aws.ec2.openTerminal",
11451145
"when": "aws.isDevMode"
11461146
},
1147+
{
1148+
"command": "aws.ec2.linkToLaunch",
1149+
"when": "aws.isDevMode"
1150+
},
11471151
{
11481152
"command": "aws.ec2.startInstance",
11491153
"when": "aws.isDevMode"
@@ -1366,6 +1370,16 @@
13661370
"group": "inline@1",
13671371
"when": "viewItem =~ /^(awsEc2(Parent|Running)Node)$/"
13681372
},
1373+
{
1374+
"command": "aws.ec2.linkToLaunch",
1375+
"group": "0@1",
1376+
"when": "viewItem =~ /^(awsEc2ParentNode)$/"
1377+
},
1378+
{
1379+
"command": "aws.ec2.linkToLaunch",
1380+
"group": "inline@1",
1381+
"when": "viewItem =~ /^(awsEc2ParentNode)$/"
1382+
},
13691383
{
13701384
"command": "aws.ec2.openRemoteConnection",
13711385
"group": "0@1",
@@ -1508,7 +1522,7 @@
15081522
},
15091523
{
15101524
"command": "aws.ec2.copyInstanceId",
1511-
"when": "view == aws.explorer && viewItem =~ /^(awsEc2(Parent|Running|Stopped)Node)$/",
1525+
"when": "view == aws.explorer && viewItem =~ /^(awsEc2(Running|Stopped|Pending)Node)$/",
15121526
"group": "2@0"
15131527
},
15141528
{
@@ -2208,6 +2222,18 @@
22082222
}
22092223
}
22102224
},
2225+
{
2226+
"command": "aws.ec2.linkToLaunch",
2227+
"title": "%AWS.command.ec2.linkToLaunch%",
2228+
"icon": "$(add)",
2229+
"category": "%AWS.title%",
2230+
"enablement": "isCloud9 || !aws.isWebExtHost",
2231+
"cloud9": {
2232+
"cn": {
2233+
"category": "%AWS.title.cn%"
2234+
}
2235+
}
2236+
},
22112237
{
22122238
"command": "aws.ec2.openRemoteConnection",
22132239
"title": "%AWS.command.ec2.openRemoteConnection%",

0 commit comments

Comments
 (0)