Skip to content

Commit

Permalink
Improve vscode settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jer3k committed Dec 24, 2024
1 parent e41efd4 commit a8e599c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
9 changes: 5 additions & 4 deletions .vscode/fin-pay-transparency.code-workspace
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
{
"folders": [
{
"name": "infrastructure",
"path": ".."
},
{
"name": "admin-frontend",
"path": "../admin-frontend"
},
{
"name": "frontend",
"path": "../frontend"
},
{
"name": "backend",
"path": "../backend"
},
{
"path": "../doc-gen-service"
},
{
"path": "../backend-external"
},
{
"path": "../clamav-service"
}
],
"settings": {
Expand All @@ -37,7 +38,7 @@
"admin-frontend": true,
"doc-gen-service": true,
"backend-external": true,
"coverage": true
"clamav-service": true,
}
}
}
18 changes: 9 additions & 9 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"skipFiles": ["<node_internals>/**"],
"type": "node",
"cwd": "${workspaceFolder}/backend",
"preLaunchTask": "Launch and migrate database",
"preLaunchTask": "Launch and migrate database in container",
"outputCapture": "std",
"presentation": {
"hidden": true,
Expand Down Expand Up @@ -51,18 +51,18 @@
}
},
{
// Start clamav server which depends on clamav also running in podman.
// clamav requires quite a bit of memory and therefore isn't included with the rest by detault.
"name": "ClamAV Server",
"request": "launch",
"runtimeArgs": ["run-script", "dev"],
"runtimeExecutable": "npm",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"cwd": "${workspaceFolder}/clamav-service",
"preLaunchTask": "Launch ClamAV",
"preLaunchTask": "Launch ClamAV in container",
"postDebugTask": "Stop ClamAV container",
"outputCapture": "std",
"presentation": {
"hidden": true,
"group": "Individual Servers",
"order": 1
}
Expand Down Expand Up @@ -118,8 +118,7 @@
"group": "Browser",
"order": 1
},
// This is a hack to get rid of some warnings
"resolveSourceMapLocations": [
"resolveSourceMapLocations": [ // This is a hack to get rid of some warnings
"${workspaceFolder}/**",
"!**/node_modules/**"
]
Expand Down Expand Up @@ -151,8 +150,7 @@
"group": "Browser",
"order": 1
},
// This is a hack to get rid of some warnings
"resolveSourceMapLocations": [
"resolveSourceMapLocations": [ // This is a hack to get rid of some warnings
"${workspaceFolder}/**",
"!**/node_modules/**"
]
Expand All @@ -176,6 +174,7 @@
"Frontend Server",
"Admin-Frontend Server",
"DocGenService Server",
"ClamAV Server",
"Open All URLs (No Debugging)"
],
"stopAll": true,
Expand All @@ -196,7 +195,8 @@
"Backend-External Server",
"Frontend Server",
"Admin-Frontend Server",
"DocGenService Server"
"DocGenService Server",
"ClamAV Server"
],
"stopAll": true,
"presentation": {
Expand Down
15 changes: 11 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@
{
// This starts the database container and performs the Flyway
// migration to get the database uptodate with the latest changes.
"label": "Launch and migrate database",
"label": "Launch and migrate database in container",
"type": "shell",
"command": "podman compose up -d database-migrations",
"problemMatcher": []
},
{
// This creates a new temporary container in podman to run clamav.
"label": "Launch ClamAV",
// This starts a container in podman to run clamav.
"label": "Launch ClamAV in container",
"type": "shell",
"command": "podman run --rm -d -p 3310:3310 --name 'clamav' clamav/clamav",
"command": "podman start fin-pay-transparency-clamav 2>$null; if ($LASTEXITCODE -ne 0) { podman run -d -p 3310:3310 --name 'fin-pay-transparency-clamav' clamav/clamav }",
"problemMatcher": []
},
{
// Stop clamav (becuase it's a memory hog)
"label": "Stop ClamAV container",
"type": "shell",
"command": "podman stop fin-pay-transparency-clamav",
"problemMatcher": []
},
{
Expand Down

0 comments on commit a8e599c

Please sign in to comment.