diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 572a8ecaf8..eda9d60184 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,19 @@ on: - 'main' jobs: + typecheck-siteplan: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Install dependencies + run: npm ci + working-directory: web/siteplan + + - name: Run typecheck + run: npm run typecheck + working-directory: web/siteplan + test-siteplan: runs-on: ubuntu-latest container: diff --git a/web/siteplan/package-lock.json b/web/siteplan/package-lock.json index a202e0af26..df062d4a80 100644 --- a/web/siteplan/package-lock.json +++ b/web/siteplan/package-lock.json @@ -29,6 +29,7 @@ "@playwright/test": "^1.61.1", "@stylistic/eslint-plugin": "5.10.0", "@types/geojson": "^7946.0.15", + "@types/node": "^24.13.6", "@typescript-eslint/eslint-plugin": "^8.68.0", "@typescript-eslint/parser": "^8.32.1", "@vitejs/plugin-vue": "^6.0.8", @@ -39,7 +40,8 @@ "eslint-plugin-vue": "^10.10.0", "tslib": "^2.8.1", "typescript": "^6.0.3", - "vite": "^8.2.2" + "vite": "^8.2.2", + "vue-tsc": "^3.3.4" } }, "node_modules/@babel/generator": { @@ -504,6 +506,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -520,6 +523,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -536,6 +540,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -552,6 +557,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -568,6 +574,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -584,6 +591,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -600,9 +608,7 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -619,9 +625,7 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -638,9 +642,7 @@ "cpu": [ "ppc64" ], - "libc": [ - "glibc" - ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -657,9 +659,7 @@ "cpu": [ "s390x" ], - "libc": [ - "glibc" - ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -676,9 +676,7 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -695,9 +693,7 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -714,6 +710,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -730,6 +727,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -746,6 +744,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1128,6 +1127,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/node": { + "version": "24.13.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.6.tgz", + "integrity": "sha512-SGrw/h3KPFshy3OE6ZL53LMBG5vGQQ8/gIpiqz/kRZhPJ7HgwCEs8LBuNtWLa8dvGZVpSF7+Bf+c11HUrCb/yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.18.0" + } + }, "node_modules/@types/rbush": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/rbush/-/rbush-4.0.0.tgz", @@ -1383,6 +1392,35 @@ "vue": "^3.2.25" } }, + "node_modules/@volar/language-core": { + "version": "2.4.28", + "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.28.tgz", + "integrity": "sha512-w4qhIJ8ZSitgLAkVay6AbcnC7gP3glYM3fYwKV3srj8m494E3xtrCv6E+bWviiK/8hs6e6t1ij1s2Endql7vzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/source-map": "2.4.28" + } + }, + "node_modules/@volar/source-map": { + "version": "2.4.28", + "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.28.tgz", + "integrity": "sha512-yX2BDBqJkRXfKw8my8VarTyjv48QwxdJtvRgUpNE5erCsgEUdI2DsLbpa+rOQVAJYshY99szEcRDmyHbF10ggQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@volar/typescript": { + "version": "2.4.28", + "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.28.tgz", + "integrity": "sha512-Ja6yvWrbis2QtN4ClAKreeUZPVYMARDYZl9LMEv1iQ1QdepB6wn0jTRxA9MftYmYa4DQ4k/DaSZpFPUfxl8giw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/language-core": "2.4.28", + "path-browserify": "^1.0.1", + "vscode-uri": "^3.0.8" + } + }, "node_modules/@vue-macros/common": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@vue-macros/common/-/common-3.1.4.tgz", @@ -1487,6 +1525,22 @@ "integrity": "sha512-mhT4zcPFhF+Xk1O4BfhhrbXzpmfqY03fS6xGpcllbQG7lDjhQf8pQHcTIhqQIYx1hfwtHmk/6jM96ele0UxPqQ==", "license": "MIT" }, + "node_modules/@vue/language-core": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-3.3.11.tgz", + "integrity": "sha512-QJmpliwAVpC/OxubIByPAhNzsQPRc8/gxlN2qnVzVfIMjMDz/9RnXRFoetjz5yEgXVXyp4LqhXq3V53PjmNzFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/language-core": "2.4.28", + "@vue/compiler-dom": "^3.5.0", + "@vue/shared": "^3.5.0", + "alien-signals": "^3.2.1", + "muggle-string": "^0.4.1", + "path-browserify": "^1.0.1", + "picomatch": "^4.0.4" + } + }, "node_modules/@vue/reactivity": { "version": "3.5.42", "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.42.tgz", @@ -1594,6 +1648,13 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/alien-signals": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/alien-signals/-/alien-signals-3.2.1.tgz", + "integrity": "sha512-I8FjmltrfnDFoZedi5CG8DghVYNhzb/Ijluz7tCSJH0xpd0484Kowhbb1XDYOxfJpU1p5wnM2X54dA+IfGyD1g==", + "dev": true, + "license": "MIT" + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -2822,6 +2883,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -2842,6 +2904,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -2862,6 +2925,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -2882,6 +2946,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -2902,6 +2967,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -2922,9 +2988,7 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -2945,9 +3009,7 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -2968,9 +3030,7 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -2991,9 +3051,7 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -3014,6 +3072,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -3034,6 +3093,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -3380,6 +3440,13 @@ "integrity": "sha512-Tz11t3uKztEW5FEVZnj1ox8GKblWn+PvHY9TmJV5Mll2uHEwRdR/5Li1OlXoECjLYkApdhWy44ocONwXLiKO5A==", "license": "MIT" }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true, + "license": "MIT" + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -3867,6 +3934,13 @@ "integrity": "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==", "license": "MIT" }, + "node_modules/undici-types": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "dev": true, + "license": "MIT" + }, "node_modules/unplugin": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-3.3.0.tgz", @@ -4045,6 +4119,7 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, @@ -4055,6 +4130,13 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/vscode-uri": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.2.0.tgz", + "integrity": "sha512-m2gXo3bn0G1kT9InzMf07fTbqMbGtyckj3bH5ktLO+1Ssv+yiATZ4dhwaQv9UZWxJh6E9IFGnQyjgWVDWVBDrg==", + "dev": true, + "license": "MIT" + }, "node_modules/vue": { "version": "3.5.42", "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.42.tgz", @@ -4169,6 +4251,23 @@ "node": ">=6" } }, + "node_modules/vue-tsc": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-3.3.11.tgz", + "integrity": "sha512-gOb0B9rtU2+f1dszwPqSH5kAieIF9ReeLhD3kSRNHv5WZZUQz/JdVXW0RTdqhNTMlQkqKzrTTviqKr/4FYZraQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@volar/typescript": "2.4.28", + "@vue/language-core": "3.3.11" + }, + "bin": { + "vue-tsc": "bin/vue-tsc.js" + }, + "peerDependencies": { + "typescript": ">=5.0.0" + } + }, "node_modules/vuex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.1.0.tgz", diff --git a/web/siteplan/package.json b/web/siteplan/package.json index 552546bec6..1dd4d6fd17 100644 --- a/web/siteplan/package.json +++ b/web/siteplan/package.json @@ -10,6 +10,7 @@ "build-prod": "vite build --mode production", "lint": "eslint src", "test:e2e": "playwright test", + "typecheck": "vue-tsc --noEmit", "test:e2e:docker": "docker run --rm --ipc=host -v .:/app -v /app/node_modules -w /app mcr.microsoft.com/playwright:v1.61.1-noble", "test:e2e:run": "npm run test:e2e:docker -- bash -c 'npm ci && npm run test:e2e'", "test:e2e:update": "npm run test:e2e:docker -- bash -c 'npm ci && npm run test:e2e -- -u'" @@ -31,6 +32,7 @@ "vuex": "^4.1.0" }, "devDependencies": { + "@types/node": "^24.13.6", "@playwright/test": "^1.61.1", "@stylistic/eslint-plugin": "5.10.0", "@types/geojson": "^7946.0.15", @@ -46,6 +48,7 @@ "eslint-plugin-vue": "^10.10.0", "tslib": "^2.8.1", "typescript": "^6.0.3", - "vite": "^8.2.2" + "vite": "^8.2.2", + "vue-tsc": "^3.3.4" } } diff --git a/web/siteplan/src/App.vue b/web/siteplan/src/App.vue index 76e0367e60..c04d14a57f 100644 --- a/web/siteplan/src/App.vue +++ b/web/siteplan/src/App.vue @@ -13,73 +13,67 @@ - diff --git a/web/siteplan/src/components/popup/PZBPopup.vue b/web/siteplan/src/components/popup/PZBPopup.vue index 6f2e664dc5..b407983440 100644 --- a/web/siteplan/src/components/popup/PZBPopup.vue +++ b/web/siteplan/src/components/popup/PZBPopup.vue @@ -11,21 +11,21 @@

PZB Element

- diff --git a/web/siteplan/src/components/popup/RouteInfo.vue b/web/siteplan/src/components/popup/RouteInfo.vue index cae88cc0ca..f2f38970f0 100644 --- a/web/siteplan/src/components/popup/RouteInfo.vue +++ b/web/siteplan/src/components/popup/RouteInfo.vue @@ -22,26 +22,18 @@ - diff --git a/web/siteplan/src/components/popup/SignalPopup.vue b/web/siteplan/src/components/popup/SignalPopup.vue index b276b812a2..eec63151ba 100644 --- a/web/siteplan/src/components/popup/SignalPopup.vue +++ b/web/siteplan/src/components/popup/SignalPopup.vue @@ -16,49 +16,29 @@ - diff --git a/web/siteplan/src/components/popup/TrackLockPopup.vue b/web/siteplan/src/components/popup/TrackLockPopup.vue index bd9615acc9..b74225ce63 100644 --- a/web/siteplan/src/components/popup/TrackLockPopup.vue +++ b/web/siteplan/src/components/popup/TrackLockPopup.vue @@ -11,82 +11,66 @@

Gleissperre: {{ trackLockLabel }}

- diff --git a/web/siteplan/src/components/popup/TrackSectionPopup.vue b/web/siteplan/src/components/popup/TrackSectionPopup.vue index 52145714c9..e1ab1dd4d2 100644 --- a/web/siteplan/src/components/popup/TrackSectionPopup.vue +++ b/web/siteplan/src/components/popup/TrackSectionPopup.vue @@ -14,13 +14,13 @@ TOP_Kante: {{ trackGuid }}
  • GUID: {{ trackSection.guid }}
  • -
  • Form: {{ trackTrackShapeToText() }}
  • -
  • Gleisart: {{ trackType() }}
  • +
  • Form: {{ trackTrackShapeToText }}
  • +
  • Gleisart: {{ trackType }}
  • - diff --git a/web/siteplan/src/components/popup/TrackSwitchPopup.vue b/web/siteplan/src/components/popup/TrackSwitchPopup.vue index 97a5f09905..769feee94b 100644 --- a/web/siteplan/src/components/popup/TrackSwitchPopup.vue +++ b/web/siteplan/src/components/popup/TrackSwitchPopup.vue @@ -12,8 +12,8 @@