Skip to content

Commit d0e7240

Browse files
committed
changes from mainline
1 parent 7863ec3 commit d0e7240

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
@@ -1145,6 +1145,10 @@
11451145
"command": "aws.ec2.openTerminal",
11461146
"when": "aws.isDevMode"
11471147
},
1148+
{
1149+
"command": "aws.ec2.linkToLaunch",
1150+
"when": "aws.isDevMode"
1151+
},
11481152
{
11491153
"command": "aws.ec2.startInstance",
11501154
"when": "aws.isDevMode"
@@ -1367,6 +1371,16 @@
13671371
"group": "inline@1",
13681372
"when": "viewItem =~ /^(awsEc2(Parent|Running)Node)$/"
13691373
},
1374+
{
1375+
"command": "aws.ec2.linkToLaunch",
1376+
"group": "0@1",
1377+
"when": "viewItem =~ /^(awsEc2ParentNode)$/"
1378+
},
1379+
{
1380+
"command": "aws.ec2.linkToLaunch",
1381+
"group": "inline@1",
1382+
"when": "viewItem =~ /^(awsEc2ParentNode)$/"
1383+
},
13701384
{
13711385
"command": "aws.ec2.openRemoteConnection",
13721386
"group": "0@1",
@@ -1509,7 +1523,7 @@
15091523
},
15101524
{
15111525
"command": "aws.ec2.copyInstanceId",
1512-
"when": "view == aws.explorer && viewItem =~ /^(awsEc2(Parent|Running|Stopped)Node)$/",
1526+
"when": "view == aws.explorer && viewItem =~ /^(awsEc2(Running|Stopped|Pending)Node)$/",
15131527
"group": "2@0"
15141528
},
15151529
{
@@ -2209,6 +2223,18 @@
22092223
}
22102224
}
22112225
},
2226+
{
2227+
"command": "aws.ec2.linkToLaunch",
2228+
"title": "%AWS.command.ec2.linkToLaunch%",
2229+
"icon": "$(add)",
2230+
"category": "%AWS.title%",
2231+
"enablement": "isCloud9 || !aws.isWebExtHost",
2232+
"cloud9": {
2233+
"cn": {
2234+
"category": "%AWS.title.cn%"
2235+
}
2236+
}
2237+
},
22122238
{
22132239
"command": "aws.ec2.openRemoteConnection",
22142240
"title": "%AWS.command.ec2.openRemoteConnection%",

0 commit comments

Comments
 (0)