🔧 various small fixes

- 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
This commit is contained in:
Jörn-Michael Miehe 2026-02-22 03:05:05 +00:00
parent 005bb31fca
commit ca46a2cf5c
8 changed files with 90 additions and 85 deletions

View file

@ -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;
###############

View file

@ -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"
}

View file

@ -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,
},
]
}
// 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
}
]
}

View file

@ -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"
}

View file

@ -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.

View file

@ -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": {

View file

@ -35,8 +35,8 @@ export default defineConfig({
server: {
proxy: {
'/api': {
target: 'http://api:8000',
"/api": {
target: "http://api:8000",
changeOrigin: true,
secure: false,
},

View file

@ -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