Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Compile
run: npx vsce package
env:
LOCALSTACK_WEB_AUTH_REDIRECT: https://app.localstack.cloud/redirect?name=VSCode
LOCALSTACK_WEB_AUTH_REDIRECT: https://app.localstack.cloud/redirect
NODE_ENV: ci

- name: Test
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
env:
VERSION: ${{ env.VERSION }}
VSCE_PAT: ${{ secrets.VSCE_PAT }}
LOCALSTACK_WEB_AUTH_REDIRECT: https://app.localstack.cloud/redirect?name=VSCode
LOCALSTACK_WEB_AUTH_REDIRECT: https://app.localstack.cloud/redirect
NODE_ENV: production
ANALYTICS_API_URL: https://analytics.localstack.cloud/v1/events

Expand Down Expand Up @@ -70,6 +70,6 @@ jobs:
env:
VERSION: ${{ env.VERSION }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
LOCALSTACK_WEB_AUTH_REDIRECT: https://app.localstack.cloud/redirect?name=VSCode
LOCALSTACK_WEB_AUTH_REDIRECT: https://app.localstack.cloud/redirect
NODE_ENV: production
ANALYTICS_API_URL: https://analytics.localstack.cloud/v1/events
3 changes: 2 additions & 1 deletion build/localstack-web-mock-server.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ const server = createServer((req, res) => {
// Parse the request URL
const url = new URL(req.url, `http://${req.headers.host}`);
const windowId = url.searchParams.get("windowId");
const name = url.searchParams.get("name");

// Build the redirect URL
const redirectURL = new URL("vscode://localstack.localstack");
const redirectURL = new URL(`${name}://localstack.localstack`);
redirectURL.searchParams.set("windowId", windowId ?? "");
redirectURL.searchParams.set("token", process.env.LOCALSTACK_AUTH_TOKEN);

Expand Down
1 change: 1 addition & 0 deletions src/utils/authenticate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
// TODO: Gather environment variables in a safer way - e.g. during extension activation
// biome-ignore lint/style/noNonNullAssertion: false positive
const url = new URL(process.env.LOCALSTACK_WEB_AUTH_REDIRECT!);
url.searchParams.set("name", env.uriScheme);
url.searchParams.set("windowId", redirectSearchParams.get("windowId") ?? "");

const selection = await window.showInformationMessage(
Expand Down Expand Up @@ -113,7 +114,7 @@

outputChannel.error(error);

window

Check warning on line 117 in src/utils/authenticate.ts

View workflow job for this annotation

GitHub Actions / Lint

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
.showErrorMessage(
`Failed to save auth token to ${LOCALSTACK_AUTH_FILENAME_READABLE}`,
"View Logs",
Expand Down
Loading