Compare commits

..

1 commit

Author SHA1 Message Date
Rajbir Singh
f0030f9222 TD-36: Implement Administration player filter options
All checks were successful
Quality Check / Linting (pull_request) Successful in 31s
Quality Check / Linting (push) Successful in 31s
2025-03-06 10:59:13 +01:00
4 changed files with 70 additions and 134 deletions

View file

@ -7,39 +7,29 @@ on:
- 'v*' - 'v*'
jobs: jobs:
generate:
runs-on: stable
container:
image: git.euph.dev/actions/runner-java-21:1300
steps:
- name: "Checkout"
uses: "https://git.euph.dev/actions/checkout@v3"
- name: "Generate"
run: just generate
- name: Upload API Client as Artifact
uses: "https://git.euph.dev/actions/upload-artifact@v3"
with:
name: api-client
path: src/app/core/server/*
build: build:
runs-on: stable runs-on: stable
needs:
- generate
container: container:
image: git.euph.dev/actions/runner-java-21:latest image: git.euph.dev/actions/runner-java-21:latest
steps: steps:
- name: "Checkout" - name: "Checkout"
uses: "https://git.euph.dev/actions/checkout@v3" uses: "https://git.euph.dev/actions/checkout@v3"
- name: Download artifact from previous job
uses: "https://git.euph.dev/actions/download-artifact@v3"
with:
name: api-client
path: src/app/core/server
- name: "Install Angular CLI" - name: "Install Angular CLI"
run: sudo npm i -g @angular/cli run: sudo npm i -g @angular/cli
- name: "Install Dependencies" - name: "Install Dependencies"
run: npm ci run: npm ci
- name: "Generate API Client"
run: |
API_VERSION="$(cat package.json | jq -r '.api_version')"
API_URL="https://git.euph.dev/TowerDefence/Server/releases/download/$API_VERSION/api.yml"
rm -rf src/app/core/server
mkdir -p src/app/core/server
npx @openapitools/openapi-generator-cli \
generate \
--openapitools src/app/core/openapitools.json \
-i "$API_URL" \
-g typescript-angular \
-o src/app/core/server
- name: Build Bundle - name: Build Bundle
run: ng build run: ng build
- name: Upload Binary as Artifact - name: Upload Binary as Artifact

View file

@ -1,13 +1,11 @@
import path from 'node:path'; import simpleImportSort from "eslint-plugin-simple-import-sort";
import { fileURLToPath } from 'node:url'; import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import { FlatCompat } from '@eslint/eslintrc'; import tsParser from "@typescript-eslint/parser";
import js from '@eslint/js'; import path from "node:path";
import typescriptEslint from '@typescript-eslint/eslint-plugin'; import {fileURLToPath} from "node:url";
import htmlEslint from '@html-eslint/eslint-plugin'; import js from "@eslint/js";
import tsParser from '@typescript-eslint/parser'; import {FlatCompat} from "@eslint/eslintrc";
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import globals from 'globals';
const __filename = fileURLToPath(import.meta.url); const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename); const __dirname = path.dirname(__filename);
@ -19,14 +17,13 @@ const compat = new FlatCompat({
export default [ export default [
{ {
ignores: ['src/app/core/server'], ignores: ["src/app/core/server"],
}, },
...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/strict'), ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/strict"),
{ {
plugins: { plugins: {
'simple-import-sort': simpleImportSort, "simple-import-sort": simpleImportSort,
'@typescript-eslint': typescriptEslint, "@typescript-eslint": typescriptEslint,
'@html-eslint': htmlEslint,
}, },
languageOptions: { languageOptions: {
@ -35,33 +32,32 @@ export default [
}, },
parser: tsParser, parser: tsParser,
ecmaVersion: 'latest', ecmaVersion: "latest",
sourceType: 'module', sourceType: "module",
}, },
rules: { rules: {
indent: ['error', 4], indent: ["error", 4],
'linebreak-style': ['error', 'unix'], "linebreak-style": ["error", "unix"],
quotes: ['error', 'single'], quotes: ["error", "single"],
semi: ['error', 'always'], semi: ["error", "always"],
strict: 'error', strict: "error",
'array-bracket-newline': 'error', "array-bracket-newline": "error",
yoda: 'error', yoda: "error",
'@typescript-eslint/array-type': [ "@typescript-eslint/array-type": [
'error', "error",
{ {
default: 'generic', default: "generic",
}, },
], ],
'@typescript-eslint/ban-tslint-comment': 'off', "@typescript-eslint/ban-tslint-comment": "off",
'@typescript-eslint/no-non-null-assertion': 'off', "@typescript-eslint/no-non-null-assertion": "off",
'@typescript-eslint/no-extraneous-class': 'off', "@typescript-eslint/no-extraneous-class": "off",
'simple-import-sort/imports': 'error', "simple-import-sort/imports": "error",
'simple-import-sort/exports': 'error', "simple-import-sort/exports": "error",
'no-mixed-spaces-and-tabs': 'off', "no-mixed-spaces-and-tabs": "off",
'@html-eslint/no-inline-styles': 'error'
}, },
}, },
]; ]

100
package-lock.json generated
View file

@ -28,12 +28,10 @@
"@angular/compiler-cli": "^19.0.0", "@angular/compiler-cli": "^19.0.0",
"@eslint/eslintrc": "^3.2.0", "@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.19.0", "@eslint/js": "^9.19.0",
"@html-eslint/eslint-plugin": "^0.35.1",
"@html-eslint/parser": "^0.35.1",
"@types/jasmine": "~5.1.0", "@types/jasmine": "~5.1.0",
"@typescript-eslint/eslint-plugin": "^8.22.0", "@typescript-eslint/eslint-plugin": "^8.22.0",
"@typescript-eslint/parser": "^8.22.0", "@typescript-eslint/parser": "^8.22.0",
"eslint": "^9.21.0", "eslint": "^9.19.0",
"eslint-plugin-autofix": "^2.2.0", "eslint-plugin-autofix": "^2.2.0",
"eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-simple-import-sort": "^12.1.1",
"globals": "^15.14.0", "globals": "^15.14.0",
@ -2822,9 +2820,9 @@
} }
}, },
"node_modules/@eslint/core": { "node_modules/@eslint/core": {
"version": "0.12.0", "version": "0.10.0",
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz", "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.10.0.tgz",
"integrity": "sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==", "integrity": "sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw==",
"dev": true, "dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
@ -2835,9 +2833,9 @@
} }
}, },
"node_modules/@eslint/eslintrc": { "node_modules/@eslint/eslintrc": {
"version": "3.3.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.0.tgz", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz",
"integrity": "sha512-yaVPAiNAalnCZedKLdR21GOGILMLKPyqSLWaAjQFvYA2i/ciDi8ArYVr69Anohb6cH2Ukhqti4aFnYyPm8wdwQ==", "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@ -2896,9 +2894,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@eslint/js": { "node_modules/@eslint/js": {
"version": "9.21.0", "version": "9.19.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.21.0.tgz", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.19.0.tgz",
"integrity": "sha512-BqStZ3HX8Yz6LvsF5ByXYrtigrV5AXADWLAGc7PH/1SxOb7/FIYYMszZZWiUou/GB9P2lXWk2SV4d+Z8h0nknw==", "integrity": "sha512-rbq9/g38qjfqFLOVPvwjIvFFdNziEC5S65jmjPw5r6A//QH+W91akh9irMwjDN8zKUTak6W9EsAv4m/7Wnw0UQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@ -2916,58 +2914,19 @@
} }
}, },
"node_modules/@eslint/plugin-kit": { "node_modules/@eslint/plugin-kit": {
"version": "0.2.7", "version": "0.2.5",
"resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.7.tgz", "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.5.tgz",
"integrity": "sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==", "integrity": "sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A==",
"dev": true, "dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@eslint/core": "^0.12.0", "@eslint/core": "^0.10.0",
"levn": "^0.4.1" "levn": "^0.4.1"
}, },
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
} }
}, },
"node_modules/@html-eslint/eslint-plugin": {
"version": "0.35.1",
"resolved": "https://registry.npmjs.org/@html-eslint/eslint-plugin/-/eslint-plugin-0.35.1.tgz",
"integrity": "sha512-RB3fo0r4OzZSMmhzBZBuuvXeku6Q36Z1s9KE3yVXeGXcX/H8LTEq9+44UmkdZXogWS7Rf3EzOvYPXjY8S6wwqg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@html-eslint/template-parser": "^0.35.1",
"@html-eslint/template-syntax-parser": "^0.35.1"
}
},
"node_modules/@html-eslint/parser": {
"version": "0.35.1",
"resolved": "https://registry.npmjs.org/@html-eslint/parser/-/parser-0.35.1.tgz",
"integrity": "sha512-NnRnlg2UfJxKZhKgLnGEHwXCkbgiT/jensCUygcys2MmlG8+OJAJxaoEpPEptZuu6AibaV0b680PqXLJ6yQ3bQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@html-eslint/template-syntax-parser": "^0.35.1",
"es-html-parser": "0.1.1"
}
},
"node_modules/@html-eslint/template-parser": {
"version": "0.35.1",
"resolved": "https://registry.npmjs.org/@html-eslint/template-parser/-/template-parser-0.35.1.tgz",
"integrity": "sha512-+w56j9ggVdEsFxRJytDjgo6EYmuNHZz5VhOyWfJznj68AUBc9bdlbMt5dV6Goy4K2xxPIhb8rWNkPo3vRqUbIQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"es-html-parser": "0.1.1"
}
},
"node_modules/@html-eslint/template-syntax-parser": {
"version": "0.35.1",
"resolved": "https://registry.npmjs.org/@html-eslint/template-syntax-parser/-/template-syntax-parser-0.35.1.tgz",
"integrity": "sha512-6ske9dCKn8LA00QADovSUzNPrVGvb6u5E8zp8vbD8yEg5aOsjK4v1lrOc1xzmrxpjUpcSYWbgsZMkObSb44HAg==",
"dev": true,
"license": "MIT"
},
"node_modules/@humanfs/core": { "node_modules/@humanfs/core": {
"version": "0.19.1", "version": "0.19.1",
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
@ -3021,9 +2980,9 @@
} }
}, },
"node_modules/@humanwhocodes/retry": { "node_modules/@humanwhocodes/retry": {
"version": "0.4.2", "version": "0.4.1",
"resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz",
"integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==",
"dev": true, "dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"engines": { "engines": {
@ -7903,13 +7862,6 @@
"node": ">= 0.4" "node": ">= 0.4"
} }
}, },
"node_modules/es-html-parser": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/es-html-parser/-/es-html-parser-0.1.1.tgz",
"integrity": "sha512-SNHdEpKkN4nWZ3sFq9AxPlaUzPKJewGh59JrVS2355vELTOFygyf/lbfDDIONuGvYrhvAHoaUd+sK9UGaGrKUg==",
"dev": true,
"license": "MIT"
},
"node_modules/es-module-lexer": { "node_modules/es-module-lexer": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz",
@ -8015,22 +7967,22 @@
} }
}, },
"node_modules/eslint": { "node_modules/eslint": {
"version": "9.21.0", "version": "9.19.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.21.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.19.0.tgz",
"integrity": "sha512-KjeihdFqTPhOMXTt7StsDxriV4n66ueuF/jfPNC3j/lduHwr/ijDwJMsF+wyMJethgiKi5wniIE243vi07d3pg==", "integrity": "sha512-ug92j0LepKlbbEv6hD911THhoRHmbdXt2gX+VDABAW/Ir7D3nqKdv5Pf5vtlyY6HQMTEP2skXY43ueqTCWssEA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.12.1", "@eslint-community/regexpp": "^4.12.1",
"@eslint/config-array": "^0.19.2", "@eslint/config-array": "^0.19.0",
"@eslint/core": "^0.12.0", "@eslint/core": "^0.10.0",
"@eslint/eslintrc": "^3.3.0", "@eslint/eslintrc": "^3.2.0",
"@eslint/js": "9.21.0", "@eslint/js": "9.19.0",
"@eslint/plugin-kit": "^0.2.7", "@eslint/plugin-kit": "^0.2.5",
"@humanfs/node": "^0.16.6", "@humanfs/node": "^0.16.6",
"@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/module-importer": "^1.0.1",
"@humanwhocodes/retry": "^0.4.2", "@humanwhocodes/retry": "^0.4.1",
"@types/estree": "^1.0.6", "@types/estree": "^1.0.6",
"@types/json-schema": "^7.0.15", "@types/json-schema": "^7.0.15",
"ajv": "^6.12.4", "ajv": "^6.12.4",

View file

@ -32,12 +32,10 @@
"@angular/compiler-cli": "^19.0.0", "@angular/compiler-cli": "^19.0.0",
"@eslint/eslintrc": "^3.2.0", "@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.19.0", "@eslint/js": "^9.19.0",
"@html-eslint/eslint-plugin": "^0.35.1",
"@html-eslint/parser": "^0.35.1",
"@types/jasmine": "~5.1.0", "@types/jasmine": "~5.1.0",
"@typescript-eslint/eslint-plugin": "^8.22.0", "@typescript-eslint/eslint-plugin": "^8.22.0",
"@typescript-eslint/parser": "^8.22.0", "@typescript-eslint/parser": "^8.22.0",
"eslint": "^9.21.0", "eslint": "^9.19.0",
"eslint-plugin-autofix": "^2.2.0", "eslint-plugin-autofix": "^2.2.0",
"eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-simple-import-sort": "^12.1.1",
"globals": "^15.14.0", "globals": "^15.14.0",