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 5d293d9e11..a66843fdda 100644 --- a/web/siteplan/package-lock.json +++ b/web/siteplan/package-lock.json @@ -39,7 +39,8 @@ "eslint-plugin-vue": "^10.10.0", "tslib": "^2.8.1", "typescript": "^6.0.3", - "vite": "^8.1.5" + "vite": "^8.1.5", + "vue-tsc": "^3.3.4" } }, "node_modules/@babel/generator": { @@ -155,6 +156,7 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz", "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -166,6 +168,7 @@ "version": "1.11.1", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz", "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -176,6 +179,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -500,6 +504,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.3.tgz", "integrity": "sha512-UMduMbqO5s5zF2NkNacMT/yK5Y5QiKvWr2+50bzIIxFDwVJ2h49b+oyjaCGPhJxd2/gC2x39EHv/gHVuu36x2Q==", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -556,6 +561,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -572,6 +578,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -588,6 +595,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -604,6 +612,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -620,6 +629,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -636,6 +646,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -652,6 +663,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -668,6 +680,7 @@ "cpu": [ "ppc64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -684,6 +697,7 @@ "cpu": [ "s390x" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -700,6 +714,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -716,6 +731,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -732,6 +748,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -748,6 +765,7 @@ "cpu": [ "wasm32" ], + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -766,6 +784,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -782,6 +801,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1137,6 +1157,7 @@ "version": "0.10.3", "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -1429,6 +1450,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", @@ -1533,6 +1583,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", @@ -1640,6 +1706,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", @@ -2866,6 +2939,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -2886,6 +2960,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -2906,6 +2981,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -2926,6 +3002,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -2946,6 +3023,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -2966,6 +3044,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -2986,6 +3065,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -3006,6 +3086,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -3026,6 +3107,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -3046,6 +3128,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -3066,6 +3149,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "win32" @@ -3411,6 +3495,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", @@ -4076,6 +4167,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, @@ -4086,6 +4178,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", @@ -4200,6 +4299,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 abc4b0e0a1..21dcc3f04e 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'" @@ -46,6 +47,7 @@ "eslint-plugin-vue": "^10.10.0", "tslib": "^2.8.1", "typescript": "^6.0.3", - "vite": "^8.1.5" + "vite": "^8.1.5", + "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 @@