🔧 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; \ set -ex; \
\ \
yarn build --outDir /opt/advent22/ui; \ yarn build --outDir /opt/advent22/ui; \
# exclude webpack-bundle-analyzer output # exclude vite-bundle-analyzer output
rm -f /opt/advent22/ui/stats.html; 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 // 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 // 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 // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"dockerComposeFile": "../../.devcontainer/docker_compose.yml", "dockerComposeFile": "../../.devcontainer/docker_compose.yml",
"service": "api", "service": "api",
"workspaceFolder": "/workspaces/advent22/api", "workspaceFolder": "/workspaces/advent22/api",
"runServices": ["api"], "runServices": ["api"],
// Features to add to the dev container. More info: https://containers.dev/features. // Features to add to the dev container. More info: https://containers.dev/features.
"features": { "features": {
"ghcr.io/devcontainers/features/git-lfs:1": {}, "ghcr.io/devcontainers/features/git-lfs:1": {},
"ghcr.io/devcontainers-extra/features/uv:1": {}, "ghcr.io/devcontainers-extra/features/uv:1": {},
"ghcr.io/devcontainers-extra/features/zsh-plugins:0": { "ghcr.io/devcontainers-extra/features/zsh-plugins:0": {
"plugins": "git-flow uv" "plugins": "git-flow uv"
},
"ghcr.io/devcontainers-extra/features/apt-get-packages:1": {
"packages": "git-flow"
},
"ghcr.io/itsmechlark/features/redis-server:1": {}
}, },
"ghcr.io/devcontainers-extra/features/apt-get-packages:1": {
"containerEnv": { "packages": "git-flow"
"TZ": "Europe/Berlin",
"UV_CACHE_DIR": "/workspaces/advent22/.uv_cache"
}, },
"ghcr.io/itsmechlark/features/redis-server:1": {}
},
// Configure tool-specific properties. "containerEnv": {
"customizations": { "TZ": "Europe/Berlin",
// Configure properties specific to VS Code. "UV_CACHE_DIR": "/workspaces/advent22/.uv_cache"
"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 'postCreateCommand' to run commands after the container is created. // Configure tool-specific properties.
"postCreateCommand": "uv tool install uv-upx", "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. // Use 'postCreateCommand' to run commands after the container is created.
"postStartCommand": "uv tool upgrade uv-upx && uv sync" "postCreateCommand": "uv tool install uv-upx",
// Use 'forwardPorts' to make a list of ports inside the container available locally. // Use 'postStartCommand' to run commands after the container is started.
// "forwardPorts": [], "postStartCommand": "uv tool upgrade uv-upx && uv sync"
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // Use 'forwardPorts' to make a list of ports inside the container available locally.
// "remoteUser": "root" // "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. // Verwendet IntelliSense zum Ermitteln möglicher Attribute.
// Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen. // Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen.
// Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387 // Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "FastAPI CLI (dev)", "name": "FastAPI CLI (dev)",
"type": "debugpy", "type": "debugpy",
"request": "launch", "request": "launch",
"module": "fastapi", "module": "fastapi",
"args": [ "args": [
"dev", "dev",
"--host", "0.0.0.0", "--host",
"--port", "8000", "0.0.0.0",
"--entrypoint", "advent22_api.app:app", "--port",
"--reload-dir", "${workspaceFolder}/advent22_api", "8000",
], "--entrypoint",
"env": { "advent22_api.app:app",
"WEBDAV__CACHE_TTL": "30", "--reload-dir",
}, "${workspaceFolder}/advent22_api"
"justMyCode": true, ],
}, "env": {
"WEBDAV__CACHE_TTL": "30"
] },
"justMyCode": true
}
]
} }

View file

@ -6,13 +6,13 @@
"editor.defaultFormatter": "charliermarsh.ruff", "editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.organizeImports": "explicit", "source.organizeImports": "explicit",
"source.fixAll": "explicit", "source.fixAll": "explicit"
}, }
}, },
"python.testing.unittestEnabled": false, "python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true, "python.testing.pytestEnabled": true,
"ty.diagnosticMode": "workspace", "ty.diagnosticMode": "workspace",
"ruff.nativeServer": "on", "ruff.nativeServer": "on"
} }

View file

@ -4,9 +4,9 @@
"name": "Advent22 UI", "name": "Advent22 UI",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"dockerComposeFile": "../../.devcontainer/docker_compose.yml", "dockerComposeFile": "../../.devcontainer/docker_compose.yml",
"service": "ui", "service": "ui",
"workspaceFolder": "/workspaces/advent22/ui", "workspaceFolder": "/workspaces/advent22/ui",
"runServices": ["ui"], "runServices": ["ui"],
// Features to add to the dev container. More info: https://containers.dev/features. // Features to add to the dev container. More info: https://containers.dev/features.

View file

@ -1,6 +1,6 @@
{ {
"name": "advent22_ui", "name": "advent22_ui",
"version": "0.0.0", "version": "0.1.0",
"private": true, "private": true,
"type": "module", "type": "module",
"packageManager": "yarn@4.12.0", "packageManager": "yarn@4.12.0",
@ -54,6 +54,7 @@
"vite-plugin-html": "^3.2.2", "vite-plugin-html": "^3.2.2",
"vite-plugin-vue-devtools": "^8.0.6", "vite-plugin-vue-devtools": "^8.0.6",
"vitest": "^4.0.18", "vitest": "^4.0.18",
"vue-eslint-parser": "^10.4.0",
"vue-tsc": "^3.2.4" "vue-tsc": "^3.2.4"
}, },
"engines": { "engines": {

View file

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

View file

@ -2119,6 +2119,7 @@ __metadata:
vite-plugin-vue-devtools: "npm:^8.0.6" vite-plugin-vue-devtools: "npm:^8.0.6"
vitest: "npm:^4.0.18" vitest: "npm:^4.0.18"
vue: "npm:^3.5.28" vue: "npm:^3.5.28"
vue-eslint-parser: "npm:^10.4.0"
vue-tsc: "npm:^3.2.4" vue-tsc: "npm:^3.2.4"
languageName: unknown languageName: unknown
linkType: soft linkType: soft