Skip to content
Merged
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
41 changes: 30 additions & 11 deletions src/plugins/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@

export default createPlugin(
"setup",
({ context, outputChannel, setupStatusTracker, telemetry }) => {
({
context,
outputChannel,
setupStatusTracker,
localStackStatusTracker,
telemetry,
}) => {
context.subscriptions.push(
commands.registerCommand(
"localstack.setup",
Expand Down Expand Up @@ -54,7 +60,7 @@
},
});

window.withProgress(

Check warning on line 63 in src/plugins/setup.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
{
location: ProgressLocation.Notification,
title: "Setup LocalStack",
Expand Down Expand Up @@ -186,7 +192,7 @@
"License is not valid or not assigned. Open License settings page to activate it.",
});

commands.executeCommand("localstack.openLicensePage");

Check warning on line 195 in src/plugins/setup.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

await activateLicenseUntilValid(
outputChannel,
Expand All @@ -211,7 +217,7 @@
}),
);

commands.executeCommand("localstack.refreshStatusBar");

Check warning on line 220 in src/plugins/setup.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

progress.report({
message: 'Finished configuring "localstack" AWS profiles.',
Expand All @@ -219,16 +225,29 @@
await minDelay(Promise.resolve());

/////////////////////////////////////////////////////////////////////
window
.showInformationMessage("LocalStack is ready to start", {
title: "Start LocalStack",
command: "localstack.start",
})
.then((selection) => {
if (selection) {
commands.executeCommand(selection.command);
}
});
if (localStackStatusTracker.status() === "running") {
window

Check warning on line 229 in src/plugins/setup.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
.showInformationMessage("LocalStack is running.", {
title: "View Logs",
command: "localstack.viewLogs",
})
.then((selection) => {
if (selection) {
commands.executeCommand(selection.command);

Check warning on line 236 in src/plugins/setup.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
}
});
} else {
window

Check warning on line 240 in src/plugins/setup.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
.showInformationMessage("LocalStack is ready to start.", {
title: "Start LocalStack",
command: "localstack.start",
})
.then((selection) => {
if (selection) {
commands.executeCommand(selection.command);

Check warning on line 247 in src/plugins/setup.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
}
});
}

telemetry.track({
name: "setup_ended",
Expand All @@ -245,7 +264,7 @@
);

if (setupStatusTracker.status() === "setup_required") {
window

Check warning on line 267 in src/plugins/setup.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
.showInformationMessage("Setup LocalStack to get started.", {
title: "Setup",
command: "localstack.setup",
Expand Down
Loading