Skip to content

Commit 6d43612

Browse files
committed
merge: resolve conflicts in test file
2 parents 79fbbc4 + 11ea8c5 commit 6d43612

File tree

463 files changed

+13719
-2555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

463 files changed

+13719
-2555
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ module.exports = {
180180
'aws-toolkits/no-console-log': 'error',
181181
'aws-toolkits/no-json-stringify-in-log': 'error',
182182
'aws-toolkits/no-printf-mismatch': 'error',
183+
'aws-toolkits/no-index-import': 'error',
183184
'no-restricted-imports': [
184185
'error',
185186
{

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- run: npm run testCompile
5858
- run: npm run lint
5959

60-
jscpd:
60+
lint-duplicate-code:
6161
needs: lint-commits
6262
if: ${{ github.event_name == 'pull_request'}}
6363
runs-on: ubuntu-latest

CONTRIBUTING.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -368,31 +368,28 @@ The `aws.dev.forceDevMode` setting enables or disables Toolkit "dev mode". Witho
368368
```
369369
tail -F ~/awstoolkit.log
370370
```
371-
- Use the `AWS (Developer): Watch Logs` command to watch and filter Toolkit logs (including
372-
telemetry) in VSCode.
373-
- Only available if you enabled "dev mode" (`aws.dev.forceDevMode` setting, see above).
374-
- Enter text in the Debug Console filter box to show only log messages with that text. <br/>
375-
<img src="./docs/images/debug-console-filter.png" alt="VSCode Debug Console" width="320"/>
371+
- Use the Output panel to watch and filter Toolkit logs (including telemetry) in VSCode.
372+
- Enter text in the Output panel filter box to show only log messages with that text.
376373
377374
#### Enabling Debug Logs
378375
379376
How to enable more detailed debug logs in the extensions.
380377
If you need to report an issue attach these to give the most detailed information.
381378
382-
1. Open the Command Palette (`cmd/ctrl` + `shift` + `p`), then search for "View Logs". Choose the correct option for the extension you want, eg: `AWS: View Logs` or `Amazon Q: View Logs`
383-
![](./docs/images/logsView.png)
379+
1. Open the Command Palette (`cmd/ctrl` + `shift` + `p`), then search for "View Logs". Choose either `AWS: View Logs` or `Amazon Q: View Logs`.
380+
- ![](./docs/images/logsView.png)
384381
2. Click the gear icon on the bottom right and select `Debug`
385-
![](./docs/images/logsSetDebug.png)
382+
- ![](./docs/images/logsSetDebug.png)
386383
3. Click the gear icon again and select `Set As Default`. This will ensure we stay in `Debug` until explicitly changed
387-
![](./docs/images/logsSetDefault.png)
384+
- ![](./docs/images/logsSetDefault.png)
388385
4. Open the Command Palette again and select `Reload Window`.
389386
5. Now you should see additional `[debug]` prefixed logs in the output.
390-
![](./docs/images/logsDebugLog.png)
387+
- ![](./docs/images/logsDebugLog.png)
391388
392389
### Telemetry
393390
394391
- See [docs/telemetry.md](./docs/telemetry.md) for guidelines on developing telemetry in this project.
395-
- To watch Toolkit telemetry events, use the `AWS (Developer): Watch Logs` command (see [Logging](#logging) above) and enter "telemetry" in the Debug Console filter box.
392+
- To watch Toolkit telemetry events, use the `Amazon Q: View Logs` command (see [Logging](#logging) above) and enter "telemetry" in the filter box.
396393
397394
### Service Endpoints
398395
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
version: 0.2
2+
3+
phases:
4+
install:
5+
runtime-versions:
6+
nodejs: 16
7+
8+
commands:
9+
- apt update
10+
- apt install -y wget gpg
11+
- curl -sSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
12+
- install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
13+
- sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
14+
- apt update
15+
- apt install -y code
16+
17+
pre_build:
18+
commands:
19+
# Check for implicit env vars passed from the release pipeline.
20+
- test -n "${TARGET_EXTENSION}"
21+
22+
build:
23+
commands:
24+
- VERSION=$(node -e "console.log(require('./packages/${TARGET_EXTENSION}/package.json').version);")
25+
# get extension name, if in beta, use some hard-coded recent version
26+
- |
27+
if [ "${TARGET_EXTENSION}" = "amazonq" ]; then
28+
extension_name="amazonwebservices.amazon-q-vscode"
29+
[ "$STAGE" != "prod" ] && VERSION="1.43.0" || true
30+
elif [ "${TARGET_EXTENSION}" = "toolkit" ]; then
31+
extension_name="amazonwebservices.aws-toolkit-vscode"
32+
[ "$STAGE" != "prod" ] && VERSION="3.42.0" || true
33+
else
34+
echo checkmarketplace: "Unknown TARGET_EXTENSION: ${TARGET_EXTENSION}"
35+
exit 1
36+
fi
37+
if [ "$STAGE" != "prod" ]; then
38+
echo "checkmarketplace: Non-production stage detected. Installing hardcoded version '${VERSION}'."
39+
fi
40+
# keep installing the desired extension version until successful. Otherwise fail on codebuild timeout (1 hour).
41+
- |
42+
while true; do
43+
code --uninstall-extension "${extension_name}" --no-sandbox --user-data-dir /tmp/vscode
44+
code --install-extension "${extension_name}@${VERSION}" --no-sandbox --user-data-dir /tmp/vscode || true
45+
cur_version=$(code --list-extensions --show-versions --no-sandbox --user-data-dir /tmp/vscode | grep ${extension_name} | cut -d'@' -f2)
46+
if [ "${cur_version}" = "${VERSION}" ]; then
47+
echo "checkmarketplace: Extension ${extension_name} is updated to version '${cur_version}.'"
48+
break
49+
else
50+
echo "checkmarketplace: Expected extension version '${VERSION}' has not been successfully installed. Retrying..."
51+
fi
52+
sleep 120 # Wait for 2 minutes before retrying
53+
done
-22.9 KB
Binary file not shown.

docs/web.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You can run the Web mode implementation of the extension in the following ways.
1616
- To see logs, using the Command Palette search: `Toggle Developer Tools`. Then go to the `Console` tab. In web mode VS Code seems to duplicate log messages, idk how to fix this.
1717
- The difference between web mode and Node.js/desktop is that in web mode everything runs in browser environment so certain things like Node.js modules will **not** be available.
1818

19-
## Running in an actual Browser
19+
## Running in an actual Browser (Recommended)
2020

2121
The following steps will result in a Chrome window running with VS Code
2222
and the web version of the AWS Toolkit extension installed:
@@ -43,7 +43,7 @@ and the web version of the AWS Toolkit extension installed:
4343
const context = browser
4444
```
4545

46-
2. In the `Run & Debug` menu select the `Extension (Chrome)` option
46+
2. In the `Run & Debug` menu select the `Extension Web` option
4747

4848
> Note: To stop the debug session, you need to click the read `Disconnect` button multiple times
4949

@@ -62,6 +62,12 @@ do the following:
6262

6363
Now when you run the extension in the browser it will do CORS checks.
6464

65+
### Troubleshooting
66+
67+
- `Extension Web` fails to launch
68+
- Update `@vscode/test-web` by running `$ npm install @vscode/test-web@latest`
69+
- Update/install playwright with `$ npx playwright install`. This will be mentioned in one of the build tasks outputs.
70+
6571
## Running in [vscode.dev](https://vscode.dev)
6672

6773
The following will explain how to get your latest local development changes running in the actual `vscode.dev`. Use this if you want to test on an actual VS Code Web instance.

0 commit comments

Comments
 (0)