From ca46a2cf5cf20b7946e8c88fa220d28fe69a75a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Sun, 22 Feb 2026 03:05:05 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20various=20small=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add version to ui package.json - "prettier" formatting on whole repo - "webpack-bundle-analyzer" -> "vite-bundle-analyzer" - add "vue-eslint-parser" to ui package.json --- Dockerfile | 4 +- api/.devcontainer/devcontainer.json | 98 ++++++++++++++--------------- api/.vscode/launch.json | 53 ++++++++-------- api/.vscode/settings.json | 6 +- ui/.devcontainer/devcontainer.json | 6 +- ui/package.json | 3 +- ui/vite.config.ts | 4 +- ui/yarn.lock | 1 + 8 files changed, 90 insertions(+), 85 deletions(-) diff --git a/Dockerfile b/Dockerfile index b3faaba..007eeeb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,8 +25,8 @@ RUN --mount=type=cache,id=ui,target=/root/.yarn \ set -ex; \ \ yarn build --outDir /opt/advent22/ui; \ - # exclude webpack-bundle-analyzer output - rm -f /opt/advent22/ui/stats.html; + # exclude vite-bundle-analyzer output + rm /opt/advent22/ui/stats.html; ############### diff --git a/api/.devcontainer/devcontainer.json b/api/.devcontainer/devcontainer.json index d5ead13..c270361 100644 --- a/api/.devcontainer/devcontainer.json +++ b/api/.devcontainer/devcontainer.json @@ -1,62 +1,62 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/python { - "name": "Advent22 API", + "name": "Advent22 API", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "dockerComposeFile": "../../.devcontainer/docker_compose.yml", - "service": "api", - "workspaceFolder": "/workspaces/advent22/api", - "runServices": ["api"], + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "dockerComposeFile": "../../.devcontainer/docker_compose.yml", + "service": "api", + "workspaceFolder": "/workspaces/advent22/api", + "runServices": ["api"], - // Features to add to the dev container. More info: https://containers.dev/features. - "features": { - "ghcr.io/devcontainers/features/git-lfs:1": {}, - "ghcr.io/devcontainers-extra/features/uv:1": {}, - "ghcr.io/devcontainers-extra/features/zsh-plugins:0": { - "plugins": "git-flow uv" - }, - "ghcr.io/devcontainers-extra/features/apt-get-packages:1": { - "packages": "git-flow" - }, - "ghcr.io/itsmechlark/features/redis-server:1": {} + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/devcontainers/features/git-lfs:1": {}, + "ghcr.io/devcontainers-extra/features/uv:1": {}, + "ghcr.io/devcontainers-extra/features/zsh-plugins:0": { + "plugins": "git-flow uv" }, - - "containerEnv": { - "TZ": "Europe/Berlin", - "UV_CACHE_DIR": "/workspaces/advent22/.uv_cache" + "ghcr.io/devcontainers-extra/features/apt-get-packages:1": { + "packages": "git-flow" }, + "ghcr.io/itsmechlark/features/redis-server:1": {} + }, - // Configure tool-specific properties. - "customizations": { - // Configure properties specific to VS Code. - "vscode": { - // Set *default* container specific settings.json values on container create. - "settings": { - "python.defaultInterpreterPath": "/usr/local/bin/python", - "terminal.integrated.defaultProfile.linux": "zsh" - }, - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "astral-sh.ty", - "charliermarsh.ruff", - "be5invis.toml", - "mhutchie.git-graph", - "ms-python.python", - "ms-python.vscode-pylance" - ] - } - }, + "containerEnv": { + "TZ": "Europe/Berlin", + "UV_CACHE_DIR": "/workspaces/advent22/.uv_cache" + }, - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "uv tool install uv-upx", + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Set *default* container specific settings.json values on container create. + "settings": { + "python.defaultInterpreterPath": "/usr/local/bin/python", + "terminal.integrated.defaultProfile.linux": "zsh" + }, + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "astral-sh.ty", + "charliermarsh.ruff", + "be5invis.toml", + "mhutchie.git-graph", + "ms-python.python", + "ms-python.vscode-pylance" + ] + } + }, - // Use 'postStartCommand' to run commands after the container is started. - "postStartCommand": "uv tool upgrade uv-upx && uv sync" + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "uv tool install uv-upx", - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], + // Use 'postStartCommand' to run commands after the container is started. + "postStartCommand": "uv tool upgrade uv-upx && uv sync" - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" } diff --git a/api/.vscode/launch.json b/api/.vscode/launch.json index 39e8b42..4ad13ab 100644 --- a/api/.vscode/launch.json +++ b/api/.vscode/launch.json @@ -1,26 +1,29 @@ { - // Verwendet IntelliSense zum Ermitteln möglicher Attribute. - // Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen. - // Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "FastAPI CLI (dev)", - "type": "debugpy", - "request": "launch", - "module": "fastapi", - "args": [ - "dev", - "--host", "0.0.0.0", - "--port", "8000", - "--entrypoint", "advent22_api.app:app", - "--reload-dir", "${workspaceFolder}/advent22_api", - ], - "env": { - "WEBDAV__CACHE_TTL": "30", - }, - "justMyCode": true, - }, - - ] -} \ No newline at end of file + // Verwendet IntelliSense zum Ermitteln möglicher Attribute. + // Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen. + // Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "FastAPI CLI (dev)", + "type": "debugpy", + "request": "launch", + "module": "fastapi", + "args": [ + "dev", + "--host", + "0.0.0.0", + "--port", + "8000", + "--entrypoint", + "advent22_api.app:app", + "--reload-dir", + "${workspaceFolder}/advent22_api" + ], + "env": { + "WEBDAV__CACHE_TTL": "30" + }, + "justMyCode": true + } + ] +} diff --git a/api/.vscode/settings.json b/api/.vscode/settings.json index c6bd75b..4432bcc 100644 --- a/api/.vscode/settings.json +++ b/api/.vscode/settings.json @@ -6,13 +6,13 @@ "editor.defaultFormatter": "charliermarsh.ruff", "editor.codeActionsOnSave": { "source.organizeImports": "explicit", - "source.fixAll": "explicit", - }, + "source.fixAll": "explicit" + } }, "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, "ty.diagnosticMode": "workspace", - "ruff.nativeServer": "on", + "ruff.nativeServer": "on" } diff --git a/ui/.devcontainer/devcontainer.json b/ui/.devcontainer/devcontainer.json index 64d20b8..baba141 100644 --- a/ui/.devcontainer/devcontainer.json +++ b/ui/.devcontainer/devcontainer.json @@ -4,9 +4,9 @@ "name": "Advent22 UI", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "dockerComposeFile": "../../.devcontainer/docker_compose.yml", - "service": "ui", - "workspaceFolder": "/workspaces/advent22/ui", + "dockerComposeFile": "../../.devcontainer/docker_compose.yml", + "service": "ui", + "workspaceFolder": "/workspaces/advent22/ui", "runServices": ["ui"], // Features to add to the dev container. More info: https://containers.dev/features. diff --git a/ui/package.json b/ui/package.json index 34374e2..c016271 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "advent22_ui", - "version": "0.0.0", + "version": "0.1.0", "private": true, "type": "module", "packageManager": "yarn@4.12.0", @@ -54,6 +54,7 @@ "vite-plugin-html": "^3.2.2", "vite-plugin-vue-devtools": "^8.0.6", "vitest": "^4.0.18", + "vue-eslint-parser": "^10.4.0", "vue-tsc": "^3.2.4" }, "engines": { diff --git a/ui/vite.config.ts b/ui/vite.config.ts index 5116bcd..aed6720 100644 --- a/ui/vite.config.ts +++ b/ui/vite.config.ts @@ -35,8 +35,8 @@ export default defineConfig({ server: { proxy: { - '/api': { - target: 'http://api:8000', + "/api": { + target: "http://api:8000", changeOrigin: true, secure: false, }, diff --git a/ui/yarn.lock b/ui/yarn.lock index 2a784d5..edf1b37 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -2119,6 +2119,7 @@ __metadata: vite-plugin-vue-devtools: "npm:^8.0.6" vitest: "npm:^4.0.18" vue: "npm:^3.5.28" + vue-eslint-parser: "npm:^10.4.0" vue-tsc: "npm:^3.2.4" languageName: unknown linkType: soft