From f709e4fa3f9761d003add2d7fd64b0a7a064f646 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 23 May 2026 00:37:23 +0000 Subject: [PATCH 1/2] chore(deps): update dependency @js-soft/eslint-config-ts to ^2.0.6 --- package-lock.json | 190 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 96 insertions(+), 96 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5ef4f9285..38a3e6b8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "packages/app-runtime" ], "devDependencies": { - "@js-soft/eslint-config-ts": "^2.0.5", + "@js-soft/eslint-config-ts": "^2.0.6", "@js-soft/license-check": "^1.0.10", "@types/jest": "^30.0.0", "@types/node": "^24.12.4", @@ -1558,18 +1558,18 @@ "license": "MIT" }, "node_modules/@js-soft/eslint-config-ts": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@js-soft/eslint-config-ts/-/eslint-config-ts-2.0.5.tgz", - "integrity": "sha512-rp/VIaiwFm0P81/GoI6nmaLBx+NJPzJSqvsnezRRgyeG0sK5zm5R5VSf90KA9BOpXcx2dRY5CC7b2Z8smd+MFA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@js-soft/eslint-config-ts/-/eslint-config-ts-2.0.6.tgz", + "integrity": "sha512-TIGZQU6ydwKGp65ynrlnLVEyHDma8x76j5RrV/Bqfb0QjugJgUg/3csq35VRGaeCzMB7QWTbtd1Ep8YZuLpXpA==", "dev": true, "license": "MIT", "dependencies": { - "@eslint/js": "^9.37.0", - "eslint-plugin-chai-expect": "^4.0.0", - "eslint-plugin-chai-friendly": "^1.1.0", - "eslint-plugin-jest": "^29.0.1", - "eslint-plugin-mocha": "^11.2.0", - "typescript-eslint": "^8.46.1" + "@eslint/js": "^9.39.4", + "eslint-plugin-chai-expect": "^4.1.0", + "eslint-plugin-chai-friendly": "^1.2.0", + "eslint-plugin-jest": "^29.15.2", + "eslint-plugin-mocha": "^11.3.0", + "typescript-eslint": "^8.59.4" }, "peerDependencies": { "eslint": ">=9" @@ -2801,20 +2801,20 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.57.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.57.2.tgz", - "integrity": "sha512-NZZgp0Fm2IkD+La5PR81sd+g+8oS6JwJje+aRWsDocxHkjyRw0J5L5ZTlN3LI1LlOcGL7ph3eaIUmTXMIjLk0w==", + "version": "8.59.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.59.4.tgz", + "integrity": "sha512-PegsU+XfyJJNjd4+u/k6f9yTyp0lEXXiPopUNobZcIAUJFGICFLN+sP0Rb3JehVmiij1Ph0dFGYqODoRo/2+6A==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.57.2", - "@typescript-eslint/type-utils": "8.57.2", - "@typescript-eslint/utils": "8.57.2", - "@typescript-eslint/visitor-keys": "8.57.2", + "@typescript-eslint/scope-manager": "8.59.4", + "@typescript-eslint/type-utils": "8.59.4", + "@typescript-eslint/utils": "8.59.4", + "@typescript-eslint/visitor-keys": "8.59.4", "ignore": "^7.0.5", "natural-compare": "^1.4.0", - "ts-api-utils": "^2.4.0" + "ts-api-utils": "^2.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2824,9 +2824,9 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.57.2", + "@typescript-eslint/parser": "^8.59.4", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { @@ -2840,16 +2840,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.57.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.57.2.tgz", - "integrity": "sha512-30ScMRHIAD33JJQkgfGW1t8CURZtjc2JpTrq5n2HFhOefbAhb7ucc7xJwdWcrEtqUIYJ73Nybpsggii6GtAHjA==", + "version": "8.59.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.59.4.tgz", + "integrity": "sha512-zORHqO/tuhxY1zWuTvMUqddRxpiFJ72xVfcNoWpqdLjs6lfPbuQBJuW4pk+49/uBMy7Ssr4bzgjiKmmDB1UbZQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.57.2", - "@typescript-eslint/types": "8.57.2", - "@typescript-eslint/typescript-estree": "8.57.2", - "@typescript-eslint/visitor-keys": "8.57.2", + "@typescript-eslint/scope-manager": "8.59.4", + "@typescript-eslint/types": "8.59.4", + "@typescript-eslint/typescript-estree": "8.59.4", + "@typescript-eslint/visitor-keys": "8.59.4", "debug": "^4.4.3" }, "engines": { @@ -2861,18 +2861,18 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.57.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.57.2.tgz", - "integrity": "sha512-FuH0wipFywXRTHf+bTTjNyuNQQsQC3qh/dYzaM4I4W0jrCqjCVuUh99+xd9KamUfmCGPvbO8NDngo/vsnNVqgw==", + "version": "8.59.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.59.4.tgz", + "integrity": "sha512-Ly00Vu4oAacfDeHp2Zg85ioNG6l8HG+tN1D7J+xTHSxu9y0awYKJ2zH1rFBn8ZSfuGK+7FxK3Cgl3uAz0aZZLg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.57.2", - "@typescript-eslint/types": "^8.57.2", + "@typescript-eslint/tsconfig-utils": "^8.59.4", + "@typescript-eslint/types": "^8.59.4", "debug": "^4.4.3" }, "engines": { @@ -2883,18 +2883,18 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.57.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.57.2.tgz", - "integrity": "sha512-snZKH+W4WbWkrBqj4gUNRIGb/jipDW3qMqVJ4C9rzdFc+wLwruxk+2a5D+uoFcKPAqyqEnSb4l2ULuZf95eSkw==", + "version": "8.59.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.59.4.tgz", + "integrity": "sha512-mUeR/3H1WrTAddJrwut8OoPjfauaztMQmRwV5fQTUyNVJCLiUXXe4lGEyYIL2oFDpP7UtgbGJXCt72wT0z2S3Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.57.2", - "@typescript-eslint/visitor-keys": "8.57.2" + "@typescript-eslint/types": "8.59.4", + "@typescript-eslint/visitor-keys": "8.59.4" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2905,9 +2905,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.57.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.57.2.tgz", - "integrity": "sha512-3Lm5DSM+DCowsUOJC+YqHHnKEfFh5CoGkj5Z31NQSNF4l5wdOwqGn99wmwN/LImhfY3KJnmordBq/4+VDe2eKw==", + "version": "8.59.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.59.4.tgz", + "integrity": "sha512-DLCpnKgD4alVxTBSKulK+gU1KCqOgUXfDRDXh2mZgzokQKa/70ax93I2uVO3m/LLvIAtWZIFoiifudmIqAxpMA==", "dev": true, "license": "MIT", "engines": { @@ -2918,21 +2918,21 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.57.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.57.2.tgz", - "integrity": "sha512-Co6ZCShm6kIbAM/s+oYVpKFfW7LBc6FXoPXjTRQ449PPNBY8U0KZXuevz5IFuuUj2H9ss40atTaf9dlGLzbWZg==", + "version": "8.59.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.59.4.tgz", + "integrity": "sha512-uonTuPAAKr9XaBGqJ3LjYTh72zy5DyGesljO9gtmk/eFW0W1fRHjnwVYKB35Lm8d5Q5CluEW3gPHjTvZTmgrfA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.57.2", - "@typescript-eslint/typescript-estree": "8.57.2", - "@typescript-eslint/utils": "8.57.2", + "@typescript-eslint/types": "8.59.4", + "@typescript-eslint/typescript-estree": "8.59.4", + "@typescript-eslint/utils": "8.59.4", "debug": "^4.4.3", - "ts-api-utils": "^2.4.0" + "ts-api-utils": "^2.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2943,13 +2943,13 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.57.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.57.2.tgz", - "integrity": "sha512-/iZM6FnM4tnx9csuTxspMW4BOSegshwX5oBDznJ7S4WggL7Vczz5d2W11ecc4vRrQMQHXRSxzrCsyG5EsPPTbA==", + "version": "8.59.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.59.4.tgz", + "integrity": "sha512-F1o7WJcCq+bc8dwcO/YsSEOudAH8RDtaOhM6wcAQhcUsFhnWQl81JKy48q1hoxAU0qrzM89+31GYh1515Zde3Q==", "dev": true, "license": "MIT", "engines": { @@ -2961,21 +2961,21 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.57.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.57.2.tgz", - "integrity": "sha512-2MKM+I6g8tJxfSmFKOnHv2t8Sk3T6rF20A1Puk0svLK+uVapDZB/4pfAeB7nE83uAZrU6OxW+HmOd5wHVdXwXA==", + "version": "8.59.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.59.4.tgz", + "integrity": "sha512-F+RuOmcDXo4+TPdfd/TCLS3m2nw8gE9XXyZLrA3JBfaA5tz9TtdkyD3YJFmPxulyc2cKbEok/CvFE3MgSLWnag==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.57.2", - "@typescript-eslint/tsconfig-utils": "8.57.2", - "@typescript-eslint/types": "8.57.2", - "@typescript-eslint/visitor-keys": "8.57.2", + "@typescript-eslint/project-service": "8.59.4", + "@typescript-eslint/tsconfig-utils": "8.59.4", + "@typescript-eslint/types": "8.59.4", + "@typescript-eslint/visitor-keys": "8.59.4", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.4.0" + "ts-api-utils": "^2.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2985,7 +2985,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": { @@ -3028,16 +3028,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.57.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.57.2.tgz", - "integrity": "sha512-krRIbvPK1ju1WBKIefiX+bngPs+odIQUtR7kymzPfo1POVw3jlF+nLkmexdSSd4UCbDcQn+wMBATOOmpBbqgKg==", + "version": "8.59.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.59.4.tgz", + "integrity": "sha512-cYXeNAUsG4lJo5dbc1FcKm+JwIWrj1/UpTORsC6tGMjEZ81DYcvIr9/ueikhMa/Y/gDQYGp+YX9/xQrXje5BJw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.57.2", - "@typescript-eslint/types": "8.57.2", - "@typescript-eslint/typescript-estree": "8.57.2" + "@typescript-eslint/scope-manager": "8.59.4", + "@typescript-eslint/types": "8.59.4", + "@typescript-eslint/typescript-estree": "8.59.4" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3048,17 +3048,17 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.57.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.57.2.tgz", - "integrity": "sha512-zhahknjobV2FiD6Ee9iLbS7OV9zi10rG26odsQdfBO/hjSzUQbkIYgda+iNKK1zNiW2ey+Lf8MU5btN17V3dUw==", + "version": "8.59.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.59.4.tgz", + "integrity": "sha512-U3gxVaDVnuZKhSspW/MzMxE1kq7zOdc072FcSNoqA1I9p8HyKbBFfEHoWckBAMgNMph4MamwS5iTVzFmrnt8TQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.57.2", + "@typescript-eslint/types": "8.59.4", "eslint-visitor-keys": "^5.0.0" }, "engines": { @@ -5350,9 +5350,9 @@ } }, "node_modules/eslint-plugin-chai-expect": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-chai-expect/-/eslint-plugin-chai-expect-4.0.0.tgz", - "integrity": "sha512-dQXZ71sKV1fWwJdJYF7X4z6nvNUosmffh7BPOW/+TgllrOWXjcFUbIfxzeGLCIVUkhn1rP2W6yHsCquEZC/U0g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-chai-expect/-/eslint-plugin-chai-expect-4.1.0.tgz", + "integrity": "sha512-9Ldti0tyxlvbc4BAQ5lNkHsXjgH518aGO5cg53hv2V9jfEfmyAcrmJeG9+tkeq7gwoRNm+fITlwAgZsK12Mejw==", "dev": true, "license": "MIT", "engines": { @@ -5363,9 +5363,9 @@ } }, "node_modules/eslint-plugin-chai-friendly": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-1.1.0.tgz", - "integrity": "sha512-+T1rClpDdXkgBAhC16vRQMI5umiWojVqkj9oUTdpma50+uByCZM/oBfxitZiOkjMRlm725mwFfz/RVgyDRvCKA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-1.2.0.tgz", + "integrity": "sha512-um2pBb4ZXNCoTRPRAWiUaXeIaw1dRaPOEZ+G/qcZqfyTdkCXXwOBctnfnbIRbZiQf4AXl3ImV1grt423SlK+mg==", "dev": true, "license": "MIT", "engines": { @@ -5376,9 +5376,9 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "29.15.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-29.15.0.tgz", - "integrity": "sha512-ZCGr7vTH2WSo2hrK5oM2RULFmMruQ7W3cX7YfwoTiPfzTGTFBMmrVIz45jZHd++cGKj/kWf02li/RhTGcANJSA==", + "version": "29.15.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-29.15.2.tgz", + "integrity": "sha512-kEN4r9RZl1xcsb4arGq89LrcVdOUFII/JSCwtTPJyv16mDwmPrcuEQwpxqZHeINvcsd7oK5O/rhdGlxFRaZwvQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5391,7 +5391,7 @@ "@typescript-eslint/eslint-plugin": "^8.0.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "jest": "*", - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <7.0.0" }, "peerDependenciesMeta": { "@typescript-eslint/eslint-plugin": { @@ -5406,9 +5406,9 @@ } }, "node_modules/eslint-plugin-mocha": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-11.2.0.tgz", - "integrity": "sha512-nMdy3tEXZac8AH5Z/9hwUkSfWu8xHf4XqwB5UEQzyTQGKcNlgFeciRAjLjliIKC3dR1Ex/a2/5sqgQzvYRkkkA==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-11.3.0.tgz", + "integrity": "sha512-anENwrIwmdvunmmssjMn5a4nTd+mYMkqBlwjksxOECcIThLNhefWJIiTWY7pY/arMQFjNwHQjVOZb6pQ9PrLjg==", "dev": true, "license": "MIT", "dependencies": { @@ -10803,16 +10803,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.57.2", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.57.2.tgz", - "integrity": "sha512-VEPQ0iPgWO/sBaZOU1xo4nuNdODVOajPnTIbog2GKYr31nIlZ0fWPoCQgGfF3ETyBl1vn63F/p50Um9Z4J8O8A==", + "version": "8.59.4", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.59.4.tgz", + "integrity": "sha512-Rw6+44QNFaXtgHSjPy+Kw8hrJniMYzR85E9yLmOLcfZ91/rz+JXQbDTCmc6ccxMPY6K6PgAq26f0JCBfR7LIPQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.57.2", - "@typescript-eslint/parser": "8.57.2", - "@typescript-eslint/typescript-estree": "8.57.2", - "@typescript-eslint/utils": "8.57.2" + "@typescript-eslint/eslint-plugin": "8.59.4", + "@typescript-eslint/parser": "8.59.4", + "@typescript-eslint/typescript-estree": "8.59.4", + "@typescript-eslint/utils": "8.59.4" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -10823,7 +10823,7 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/uglify-js": { diff --git a/package.json b/package.json index d2bd837db..c82138881 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "test:teardown": "docker compose -f .dev/compose.yml down -fsv" }, "devDependencies": { - "@js-soft/eslint-config-ts": "^2.0.5", + "@js-soft/eslint-config-ts": "^2.0.6", "@js-soft/license-check": "^1.0.10", "@types/jest": "^30.0.0", "@types/node": "^24.12.4", From fe8d052b652598b713d38ade37cbf020f52814e2 Mon Sep 17 00:00:00 2001 From: Milena-Czierlinski Date: Tue, 26 May 2026 15:58:26 +0200 Subject: [PATCH 2/2] chore: remove casts --- packages/app-runtime/src/AppRuntime.ts | 5 +-- .../test/modules/AppLanguage.test.ts | 2 +- .../attributes/AttributesController.ts | 2 +- .../IncomingRequestsController.test.ts | 33 +++++++++---------- .../OutgoingRequestsController.test.ts | 22 ++++++------- .../requests/RequestsIntegrationTest.ts | 6 ++-- .../requests/testHelpers/TestObjectFactory.ts | 3 +- .../content/test/requests/Request.test.ts | 22 +++++-------- .../content/test/requests/Response.test.ts | 19 +++++------ .../test/requests/ResponseWrapper.test.ts | 4 +-- packages/core-types/src/CoreDate.ts | 2 +- .../runtime/src/dataViews/DataViewExpander.ts | 21 ++++-------- .../src/useCases/common/SchemaRepository.ts | 2 +- .../test/consumption/attributes.test.ts | 15 +++------ .../test/dataViews/IdentityDVO.test.ts | 4 +-- .../runtime/test/dataViews/MessageDVO.test.ts | 4 +-- .../DeleteAttributeRequestItemDVO.test.ts | 4 +-- .../ShareAttributeRequestItemDVO.test.ts | 4 +-- ...ransferFileOwnershipRequestItemDVO.test.ts | 6 ++-- .../runtime/test/lib/TestNotificationItem.ts | 2 +- packages/runtime/test/lib/testUtils.ts | 2 +- .../test/lib/testUtilsWithInactiveModules.ts | 2 +- .../test/transport/relationships.test.ts | 3 +- .../test/core/backbone/Authentication.test.ts | 2 +- .../sync/SyncController.messages.test.ts | 14 ++++---- 25 files changed, 89 insertions(+), 116 deletions(-) diff --git a/packages/app-runtime/src/AppRuntime.ts b/packages/app-runtime/src/AppRuntime.ts index 6fd1a2f9d..0d9d03f4e 100644 --- a/packages/app-runtime/src/AppRuntime.ts +++ b/packages/app-runtime/src/AppRuntime.ts @@ -13,7 +13,6 @@ import { IUIBridge } from "./extensibility"; import { IAppLanguageProvider, INotificationAccess } from "./infrastructure"; import { AppLanguageModule, - AppRuntimeModuleConfiguration, AppSyncModule, IAppRuntimeModuleConstructor, IdentityDeletionProcessStatusChangedModule, @@ -246,9 +245,7 @@ export class AppRuntime extends Runtime { return Promise.reject(error); } - const connectorModuleConfiguration = moduleConfiguration as AppRuntimeModuleConfiguration; - - const module = new moduleConstructor(this, connectorModuleConfiguration, this.loggerFactory.getLogger(moduleConstructor)); + const module = new moduleConstructor(this, moduleConfiguration, this.loggerFactory.getLogger(moduleConstructor)); this.modules.add(module); diff --git a/packages/app-runtime/test/modules/AppLanguage.test.ts b/packages/app-runtime/test/modules/AppLanguage.test.ts index 29bf5e59d..1f58f418c 100644 --- a/packages/app-runtime/test/modules/AppLanguage.test.ts +++ b/packages/app-runtime/test/modules/AppLanguage.test.ts @@ -29,7 +29,7 @@ describe("AppLanguageModuleTest", function () { afterEach(() => eventBus.reset()); test("should persist the app language via an AppLanguageChangedEvent", async function () { - runtime.eventBus.publish(new AppLanguageChangedEvent("de" as any)); + runtime.eventBus.publish(new AppLanguageChangedEvent("de")); await eventBus.waitForRunningEventHandlers(); let device = await devicesClient.getCurrentDevice(); expect(device.value.communicationLanguage).toBe(LanguageISO639.de); diff --git a/packages/consumption/src/modules/attributes/AttributesController.ts b/packages/consumption/src/modules/attributes/AttributesController.ts index 939bda50a..c1bbfb1fe 100644 --- a/packages/consumption/src/modules/attributes/AttributesController.ts +++ b/packages/consumption/src/modules/attributes/AttributesController.ts @@ -1108,7 +1108,7 @@ export class AttributesController extends ConsumptionBaseController { private trimAttribute(attribute: IdentityAttribute): IdentityAttribute { const trimmedAttribute = { ...attribute.toJSON(), - value: this.trimAttributeValue(attribute.value.toJSON() as AttributeValues.Identity.Json) + value: this.trimAttributeValue(attribute.value.toJSON()) }; return IdentityAttribute.from(trimmedAttribute); } diff --git a/packages/consumption/test/modules/requests/IncomingRequestsController.test.ts b/packages/consumption/test/modules/requests/IncomingRequestsController.test.ts index dafd8cefd..10e870e22 100644 --- a/packages/consumption/test/modules/requests/IncomingRequestsController.test.ts +++ b/packages/consumption/test/modules/requests/IncomingRequestsController.test.ts @@ -20,7 +20,6 @@ import { TransportLoggerFactory } from "@nmshd/transport"; import { AcceptReadAttributeRequestItemParametersWithNewAttributeJSON, ConsumptionIds, - DecideRequestItemGroupParametersJSON, DecideRequestParametersJSON, IncomingRequestReceivedEvent, IncomingRequestStatusChangedEvent, @@ -163,7 +162,7 @@ describe("IncomingRequestsController", function () { shouldFailAtCheckPrerequisitesOfIncomingRequestItem: true } as ITestRequestItem ] - } as IRequest + } }, { content: { @@ -178,7 +177,7 @@ describe("IncomingRequestsController", function () { shouldFailAtCheckPrerequisitesOfIncomingRequestItem: true } as ITestRequestItem ] - } as IRequest + } }, { content: { @@ -194,7 +193,7 @@ describe("IncomingRequestsController", function () { ] } as IRequestItemGroup ] - } as IRequest + } } ])("does not change the status when a RequestItemProcessor returns false", async function (testParams) { await Given.anIncomingRequestWith({ @@ -271,14 +270,14 @@ describe("IncomingRequestsController", function () { shouldFailAtCanAccept: true } as ITestRequestItem ] - } as IRequest, + }, acceptParams: { items: [ { accept: true } ] - } as Omit + } }, { @@ -294,7 +293,7 @@ describe("IncomingRequestsController", function () { shouldFailAtCanAccept: true } as ITestRequestItem ] - } as IRequest, + }, acceptParams: { items: [ { @@ -304,7 +303,7 @@ describe("IncomingRequestsController", function () { accept: true } ] - } as Omit + } }, { @@ -321,7 +320,7 @@ describe("IncomingRequestsController", function () { ] } as IRequestItemGroup ] - } as IRequest, + }, acceptParams: { items: [ { @@ -330,9 +329,9 @@ describe("IncomingRequestsController", function () { accept: true } ] - } as DecideRequestItemGroupParametersJSON + } ] - } as Omit + } } ])("returns 'error' when at least one RequestItem is invalid", async function (testParams) { await Given.anIncomingRequestWith({ @@ -715,14 +714,14 @@ describe("IncomingRequestsController", function () { shouldFailAtCanReject: true } as ITestRequestItem ] - } as IRequest, + }, rejectParams: { items: [ { accept: false } ] - } as Omit + } }, { @@ -738,7 +737,7 @@ describe("IncomingRequestsController", function () { shouldFailAtCanReject: true } as ITestRequestItem ] - } as IRequest, + }, rejectParams: { items: [ { @@ -748,7 +747,7 @@ describe("IncomingRequestsController", function () { accept: false } ] - } as Omit + } }, { @@ -765,7 +764,7 @@ describe("IncomingRequestsController", function () { ] } as IRequestItemGroup ] - } as IRequest, + }, rejectParams: { items: [ { @@ -776,7 +775,7 @@ describe("IncomingRequestsController", function () { ] } ] - } as Omit + } } ])("returns 'error' when at least one RequestItem is invalid", async function (testParams) { await Given.anIncomingRequestWith({ diff --git a/packages/consumption/test/modules/requests/OutgoingRequestsController.test.ts b/packages/consumption/test/modules/requests/OutgoingRequestsController.test.ts index a74aa628e..2cab91c19 100644 --- a/packages/consumption/test/modules/requests/OutgoingRequestsController.test.ts +++ b/packages/consumption/test/modules/requests/OutgoingRequestsController.test.ts @@ -3,7 +3,6 @@ import { ApplicationError, sleep } from "@js-soft/ts-utils"; import { CreateAttributeRequestItem, IAcceptResponseItem, - IRequest, IRequestItemGroup, IResponse, IResponseItemGroup, @@ -106,7 +105,7 @@ describe("OutgoingRequestsController", function () { shouldFailAtCanCreateOutgoingRequestItem: true } as ITestRequestItem ] - } as IRequest, + }, { items: [ { @@ -119,7 +118,7 @@ describe("OutgoingRequestsController", function () { shouldFailAtCanCreateOutgoingRequestItem: true } as ITestRequestItem ] - } as IRequest, + }, { items: [ { @@ -133,7 +132,7 @@ describe("OutgoingRequestsController", function () { ] } as IRequestItemGroup ] - } as IRequest + } ])("returns 'error' when at least one RequestItem is invalid", async function (request: IRequestWithoutId) { await When.iCallCanCreateForAnOutgoingRequest({ content: request @@ -263,8 +262,7 @@ describe("OutgoingRequestsController", function () { value: ProprietaryString.from({ title: "aTitle", value: "aStringValue" }).toJSON() }) }), - { - "@type": "RequestItemGroup", + RequestItemGroup.from({ items: [ ProposeAttributeRequestItem.from({ mustBeAccepted: true, @@ -286,7 +284,7 @@ describe("OutgoingRequestsController", function () { }) }) ] - } as IRequestItemGroup + }) ] }, peer: "did:e:a-domain:dids:anidentity" @@ -587,7 +585,7 @@ describe("OutgoingRequestsController", function () { mustBeAccepted: false } as ITestRequestItem ] - } as IRequest, + }, response: { result: ResponseResult.Accepted, items: [ @@ -612,7 +610,7 @@ describe("OutgoingRequestsController", function () { mustBeAccepted: false } as ITestRequestItem ] - } as IRequest, + }, response: { result: ResponseResult.Accepted, items: [ @@ -646,7 +644,7 @@ describe("OutgoingRequestsController", function () { ] } as IRequestItemGroup ] - } as IRequest, + }, response: { result: ResponseResult.Accepted, items: [ @@ -690,7 +688,7 @@ describe("OutgoingRequestsController", function () { shouldFailAtCanApplyIncomingResponseItem: true } as ITestRequestItem ] - } as IRequest, + }, response: { result: ResponseResult.Accepted, items: [ @@ -716,7 +714,7 @@ describe("OutgoingRequestsController", function () { ] } as IRequestItemGroup ] - } as IRequest, + }, response: { result: ResponseResult.Accepted, items: [ diff --git a/packages/consumption/test/modules/requests/RequestsIntegrationTest.ts b/packages/consumption/test/modules/requests/RequestsIntegrationTest.ts index 665e9214c..777af2cfb 100644 --- a/packages/consumption/test/modules/requests/RequestsIntegrationTest.ts +++ b/packages/consumption/test/modules/requests/RequestsIntegrationTest.ts @@ -542,7 +542,7 @@ export class RequestsWhen { public iTryToCheckPrerequisitesWith(params: Partial): Promise { this.context.actionToTry = async () => { - await this.iCheckPrerequisitesWith(params as ICheckPrerequisitesOfIncomingRequestParameters); + await this.iCheckPrerequisitesWith(params); }; return Promise.resolve(); } @@ -955,7 +955,7 @@ export class RequestsWhen { }; this.context.actionToTry = async () => { - await this.context.outgoingRequestsController.create(params as any); + await this.context.outgoingRequestsController.create(params); }; return Promise.resolve(); @@ -991,7 +991,7 @@ export class RequestsWhen { }; this.context.actionToTry = async () => { - await this.context.outgoingRequestsController.create(params as any); + await this.context.outgoingRequestsController.create(params); }; return Promise.resolve(); diff --git a/packages/consumption/test/modules/requests/testHelpers/TestObjectFactory.ts b/packages/consumption/test/modules/requests/testHelpers/TestObjectFactory.ts index 0d45d21fb..d8697d5b0 100644 --- a/packages/consumption/test/modules/requests/testHelpers/TestObjectFactory.ts +++ b/packages/consumption/test/modules/requests/testHelpers/TestObjectFactory.ts @@ -506,13 +506,12 @@ export class TestObjectFactory { result: ResponseResult.Accepted, items: [ { - // @ts-expect-error "@type": "AcceptResponseItem", result: ResponseItemResult.Accepted } ], requestId: CoreId.from(requestId) - } as IResponse); + }); } public static createOutgoingMessage(sender: CoreAddress): Message { diff --git a/packages/content/test/requests/Request.test.ts b/packages/content/test/requests/Request.test.ts index 8326e968c..549a01a0b 100644 --- a/packages/content/test/requests/Request.test.ts +++ b/packages/content/test/requests/Request.test.ts @@ -1,10 +1,6 @@ import { Serializable, type } from "@js-soft/ts-serval"; import { CoreDate, CoreId } from "@nmshd/core-types"; -import { IRequest, IRequestItem, IRequestItemGroup, Request, RequestItem, RequestItemGroup, RequestItemGroupJSON, RequestItemJSON, RequestJSON } from "../../src"; - -interface TestRequestItemJSON extends RequestItemJSON { - "@type": "TestRequestItem"; -} +import { IRequest, IRequestItem, IRequestItemGroup, Request, RequestItem, RequestItemGroup, RequestJSON } from "../../src"; interface ITestRequestItem extends IRequestItem {} @@ -20,18 +16,18 @@ describe("Request", function () { { "@type": "TestRequestItem", mustBeAccepted: true - } as TestRequestItemJSON, + }, { "@type": "RequestItemGroup", items: [ { "@type": "TestRequestItem", mustBeAccepted: true - } as TestRequestItemJSON + } ] - } as RequestItemGroupJSON + } ] - } as RequestJSON; + }; const request = Request.from(requestJSON); @@ -95,7 +91,7 @@ describe("Request", function () { metadata: { aMetadataKey: "outer item - metadata value" } - } as TestRequestItemJSON, + }, { "@type": "RequestItemGroup", title: "item group - title", @@ -111,9 +107,9 @@ describe("Request", function () { metadata: { aMetadataKey: "inner item - metadata value" } - } as TestRequestItemJSON + } ] - } as RequestItemGroupJSON + } ] } as RequestJSON; @@ -145,7 +141,7 @@ describe("Request", function () { { "@type": "RequestItemGroup", items: [] - } as RequestItemGroupJSON + } ] } as RequestJSON; diff --git a/packages/content/test/requests/Response.test.ts b/packages/content/test/requests/Response.test.ts index 396c5b53d..62a154703 100644 --- a/packages/content/test/requests/Response.test.ts +++ b/packages/content/test/requests/Response.test.ts @@ -2,17 +2,14 @@ import { serialize, type, validate } from "@js-soft/ts-serval"; import { CoreId } from "@nmshd/core-types"; import { AcceptResponseItem, - AcceptResponseItemJSON, ErrorResponseItemJSON, IAcceptResponseItem, IResponse, IResponseItem, IResponseItemGroup, - RejectResponseItemJSON, Response, ResponseItem, ResponseItemGroup, - ResponseItemGroupJSON, ResponseItemJSON, ResponseItemResult, ResponseJSON, @@ -44,16 +41,16 @@ describe("Response", function () { { "@type": "AcceptResponseItem", result: ResponseItemResult.Accepted - } as ResponseItemJSON, + }, { "@type": "ResponseItemGroup", items: [ { "@type": "AcceptResponseItem", result: ResponseItemResult.Accepted - } as ResponseItemJSON + } ] - } as ResponseItemGroupJSON + } ] } as ResponseJSON; @@ -118,7 +115,7 @@ describe("Response", function () { result: ResponseItemResult.Rejected, code: "SOME_REJECTION_CODE", message: "Some rejection message" - } as RejectResponseItemJSON, + }, { "@type": "ResponseItemGroup", items: [ @@ -127,9 +124,9 @@ describe("Response", function () { result: ResponseItemResult.Failed, code: "SOME_ERROR_CODE", message: "Some error message" - } as ErrorResponseItemJSON + } ] - } as ResponseItemGroupJSON + } ] } as ResponseJSON; @@ -163,7 +160,7 @@ describe("Response", function () { { "@type": "ResponseItemGroup", items: [] - } as ResponseItemGroupJSON + } ] } as ResponseJSON; @@ -209,7 +206,7 @@ describe("Response", function () { { "@type": "AcceptResponseItem", result: ResponseItemResult.Accepted - } as AcceptResponseItemJSON + } ] } as ResponseJSON; diff --git a/packages/content/test/requests/ResponseWrapper.test.ts b/packages/content/test/requests/ResponseWrapper.test.ts index 21a529b7d..772ffe769 100644 --- a/packages/content/test/requests/ResponseWrapper.test.ts +++ b/packages/content/test/requests/ResponseWrapper.test.ts @@ -1,5 +1,5 @@ import { CoreId } from "@nmshd/core-types"; -import { Response, ResponseItemJSON, ResponseItemResult, ResponseJSON, ResponseResult, ResponseWrapper } from "../../src"; +import { Response, ResponseItemResult, ResponseJSON, ResponseResult, ResponseWrapper } from "../../src"; describe("ResponseWrapper", function () { const response = Response.from({ @@ -10,7 +10,7 @@ describe("ResponseWrapper", function () { { "@type": "AcceptResponseItem", result: ResponseItemResult.Accepted - } as ResponseItemJSON + } ] } as ResponseJSON); diff --git a/packages/core-types/src/CoreDate.ts b/packages/core-types/src/CoreDate.ts index 02a586e03..c63f56279 100644 --- a/packages/core-types/src/CoreDate.ts +++ b/packages/core-types/src/CoreDate.ts @@ -147,7 +147,7 @@ export class CoreDate extends Serializable { private get asValidDateTime(): DateTime { if (!this.dateTime.isValid) throw new Error("The date is invalid."); - return this.dateTime as DateTime; + return this.dateTime; } protected static override preFrom(value: any): any { diff --git a/packages/runtime/src/dataViews/DataViewExpander.ts b/packages/runtime/src/dataViews/DataViewExpander.ts index ccfbd6b35..f81d32637 100644 --- a/packages/runtime/src/dataViews/DataViewExpander.ts +++ b/packages/runtime/src/dataViews/DataViewExpander.ts @@ -103,17 +103,11 @@ import { AttributeAlreadySharedAcceptResponseItemDVO, AttributeQueryDVO, AttributeSuccessionAcceptResponseItemDVO, - AuthenticationRequestItemDVO, - ConsentRequestItemDVO, CreateAttributeAcceptResponseItemDVO, CreateAttributeRequestItemDVO, - DeleteAttributeAcceptResponseItemDVO, DeleteAttributeRequestItemDVO, DraftIdentityAttributeDVO, DraftRelationshipAttributeDVO, - ErrorResponseItemDVO, - FormFieldAcceptResponseItemDVO, - FormFieldRequestItemDVO, IQLQueryDVO, IdentityAttributeQueryDVO, MailDVO, @@ -121,7 +115,6 @@ import { ProposeAttributeRequestItemDVO, ReadAttributeAcceptResponseItemDVO, ReadAttributeRequestItemDVO, - RejectResponseItemDVO, RelationshipAttributeQueryDVO, RequestDVO, RequestItemDVO, @@ -592,7 +585,7 @@ export class DataViewExpander { name: authenticationRequestItem.title, isDecidable, response: responseItemDVO - } as AuthenticationRequestItemDVO; + }; case "ConsentRequestItem": const consentRequestItem = requestItem as ConsentRequestItemJSON; @@ -604,7 +597,7 @@ export class DataViewExpander { name: this.generateRequestItemName(requestItem["@type"], isDecidable), isDecidable, response: responseItemDVO - } as ConsentRequestItemDVO; + }; case "FormFieldRequestItem": const formFieldRequestItem = requestItem as FormFieldRequestItemJSON; @@ -616,7 +609,7 @@ export class DataViewExpander { name: formFieldRequestItem.title, isDecidable, response: responseItemDVO - } as FormFieldRequestItemDVO; + }; case "TransferFileOwnershipRequestItem": const transferFileOwnershipRequestItem = requestItem as TransferFileOwnershipRequestItemJSON; @@ -748,7 +741,7 @@ export class DataViewExpander { type: "DeleteAttributeAcceptResponseItemDVO", id: "", name: name - } as DeleteAttributeAcceptResponseItemDVO; + }; case "ProposeAttributeAcceptResponseItem": const proposeAttributeResponseItem = responseItem as ProposeAttributeAcceptResponseItemJSON; @@ -781,7 +774,7 @@ export class DataViewExpander { type: "FormFieldAcceptResponseItemDVO", id: "", name: name - } as FormFieldAcceptResponseItemDVO; + }; case "TransferFileOwnershipAcceptResponseItem": const transferFileOwnershipResponseItem = responseItem as TransferFileOwnershipAcceptResponseItemJSON; @@ -876,7 +869,7 @@ export class DataViewExpander { type: "RejectResponseItemDVO", id: "", name: "i18n://dvo.responseItem.rejected" - } as RejectResponseItemDVO; + }; } else { const errorResponseItem = responseItem as ErrorResponseItemJSON; return { @@ -884,7 +877,7 @@ export class DataViewExpander { type: "ErrorResponseItemDVO", id: "", name: "i18n://dvo.responseItem.error" - } as ErrorResponseItemDVO; + }; } } diff --git a/packages/runtime/src/useCases/common/SchemaRepository.ts b/packages/runtime/src/useCases/common/SchemaRepository.ts index 040ab4714..8c877507e 100644 --- a/packages/runtime/src/useCases/common/SchemaRepository.ts +++ b/packages/runtime/src/useCases/common/SchemaRepository.ts @@ -15,7 +15,7 @@ export class SchemaRepository { } public async loadSchemas(): Promise { - this.schemaDefinitions = (await import("./Schemas")) as Record; + this.schemaDefinitions = await import("./Schemas"); } public getSchema(schemaName: string): JsonSchema { diff --git a/packages/runtime/test/consumption/attributes.test.ts b/packages/runtime/test/consumption/attributes.test.ts index 6b60b7bd3..c1fec5c0c 100644 --- a/packages/runtime/test/consumption/attributes.test.ts +++ b/packages/runtime/test/consumption/attributes.test.ts @@ -1,4 +1,3 @@ -import { AcceptRequestItemParametersJSON } from "@nmshd/consumption"; import { CreateAttributeRequestItemJSON, DeleteAttributeRequestItem, @@ -2673,7 +2672,7 @@ describe(DeleteAttributeAndNotifyUseCase.name, () => { } }; - await createRelationshipWithStatusPending(services1, services2, relationshipTemplateContent, [{ accept: true } as AcceptRequestItemParametersJSON]); + await createRelationshipWithStatusPending(services1, services2, relationshipTemplateContent, [{ accept: true }]); await services1.eventBus.waitForEvent(OutgoingRequestFromRelationshipCreationCreatedAndCompletedEvent); const result = await services1.consumption.attributes.deleteAttributeAndNotify({ attributeId: ownIdentityAttribute.id }); @@ -2779,7 +2778,7 @@ describe(DeleteAttributeAndNotifyUseCase.name, () => { onNewRelationship: { items: [item], "@type": "Request" } }; - await createRelationshipWithStatusPending(services1, services2, relationshipTemplateContent, [{ accept: true } as AcceptRequestItemParametersJSON]); + await createRelationshipWithStatusPending(services1, services2, relationshipTemplateContent, [{ accept: true }]); const peerIdentityAttribute = (await services2.consumption.attributes.getAttribute({ id: ownIdentityAttribute.id })).value; @@ -3073,9 +3072,7 @@ describe(DeleteAttributeAndNotifyUseCase.name, () => { onNewRelationship: { items: [item], "@type": "Request" } }; - const pendingRelationship = await createRelationshipWithStatusPending(services2, services1, relationshipTemplateContent, [ - { accept: true } as AcceptRequestItemParametersJSON - ]); + const pendingRelationship = await createRelationshipWithStatusPending(services2, services1, relationshipTemplateContent, [{ accept: true }]); const ownRelationshipAttribute = (await services1.transport.relationships.getAttributesForRelationship({ id: pendingRelationship.id })).value[0]; @@ -3245,9 +3242,7 @@ describe(DeleteAttributeAndNotifyUseCase.name, () => { onNewRelationship: { items: [item], "@type": "Request" } }; - const pendingRelationship = await createRelationshipWithStatusPending(services2, services1, relationshipTemplateContent, [ - { accept: true } as AcceptRequestItemParametersJSON - ]); + const pendingRelationship = await createRelationshipWithStatusPending(services2, services1, relationshipTemplateContent, [{ accept: true }]); const peerRelationshipAttribute = (await services1.transport.relationships.getAttributesForRelationship({ id: pendingRelationship.id })).value[0]; @@ -3422,7 +3417,7 @@ describe(DeleteAttributeAndNotifyUseCase.name, () => { await createRelationshipWithStatusPending(services2, services3, relationshipTemplateContent, [ { accept: true - } as AcceptRequestItemParametersJSON + } ]); const thirdPartyRelationshipAttribute = (await services3.consumption.attributes.getAttribute({ id: peerRelationshipAttribute.id })).value; diff --git a/packages/runtime/test/dataViews/IdentityDVO.test.ts b/packages/runtime/test/dataViews/IdentityDVO.test.ts index f21b5aba7..eda497640 100644 --- a/packages/runtime/test/dataViews/IdentityDVO.test.ts +++ b/packages/runtime/test/dataViews/IdentityDVO.test.ts @@ -1,4 +1,4 @@ -import { RelationshipTemplateContentJSON, ShareAttributeRequestItemJSON } from "@nmshd/content"; +import { RelationshipTemplateContentJSON } from "@nmshd/content"; import { AttributeDeletedEvent, IncomingRequestStatusChangedEvent, @@ -46,7 +46,7 @@ describe("IdentityDVO after loading a relationship template sharing a DisplayNam mustBeAccepted: true, attribute: senderAttribute.value.content, attributeId: senderAttribute.value.id - } as ShareAttributeRequestItemJSON + } ] } }; diff --git a/packages/runtime/test/dataViews/MessageDVO.test.ts b/packages/runtime/test/dataViews/MessageDVO.test.ts index 8484972da..1d5519c3b 100644 --- a/packages/runtime/test/dataViews/MessageDVO.test.ts +++ b/packages/runtime/test/dataViews/MessageDVO.test.ts @@ -1,5 +1,5 @@ import { DecideRequestItemParametersJSON } from "@nmshd/consumption"; -import { ArbitraryMessageContent, ConsentRequestItemJSON, MailJSON } from "@nmshd/content"; +import { ArbitraryMessageContent, MailJSON } from "@nmshd/content"; import { CreateOutgoingRequestRequest, MailDVO, RequestMessageDVO, SendMessageRequest } from "../../src"; import { establishRelationship, @@ -209,7 +209,7 @@ describe("Message with Request", () => { "@type": "ConsentRequestItem", consent: "Consent text", mustBeAccepted: true - } as ConsentRequestItemJSON + } ] }, peer: services2.address diff --git a/packages/runtime/test/dataViews/requestItems/DeleteAttributeRequestItemDVO.test.ts b/packages/runtime/test/dataViews/requestItems/DeleteAttributeRequestItemDVO.test.ts index a50dba3f4..d469a2feb 100644 --- a/packages/runtime/test/dataViews/requestItems/DeleteAttributeRequestItemDVO.test.ts +++ b/packages/runtime/test/dataViews/requestItems/DeleteAttributeRequestItemDVO.test.ts @@ -1,5 +1,5 @@ import { DecideRequestItemParametersJSON } from "@nmshd/consumption"; -import { AbstractStringJSON, DeleteAttributeRequestItemJSON } from "@nmshd/content"; +import { AbstractStringJSON } from "@nmshd/content"; import { CoreDate } from "@nmshd/core-types"; import { AcceptResponseItemDVO, @@ -79,7 +79,7 @@ beforeEach(async () => { "@type": "DeleteAttributeRequestItem", mustBeAccepted: true, attributeId: attributeId - } as DeleteAttributeRequestItemJSON + } ] }, peer: rAddress diff --git a/packages/runtime/test/dataViews/requestItems/ShareAttributeRequestItemDVO.test.ts b/packages/runtime/test/dataViews/requestItems/ShareAttributeRequestItemDVO.test.ts index 21aa27b97..e9ca3261a 100644 --- a/packages/runtime/test/dataViews/requestItems/ShareAttributeRequestItemDVO.test.ts +++ b/packages/runtime/test/dataViews/requestItems/ShareAttributeRequestItemDVO.test.ts @@ -1,5 +1,5 @@ import { DecideRequestItemParametersJSON } from "@nmshd/consumption"; -import { AbstractStringJSON, DisplayNameJSON, ShareAttributeRequestItemJSON } from "@nmshd/content"; +import { AbstractStringJSON, DisplayNameJSON } from "@nmshd/content"; import { AcceptResponseItemDVO, ConsumptionServices, @@ -83,7 +83,7 @@ beforeEach(async () => { mustBeAccepted: true, attribute: senderAttribute.content, attributeId: senderAttribute.id - } as ShareAttributeRequestItemJSON + } ] }, peer: rAddress diff --git a/packages/runtime/test/dataViews/requestItems/TransferFileOwnershipRequestItemDVO.test.ts b/packages/runtime/test/dataViews/requestItems/TransferFileOwnershipRequestItemDVO.test.ts index 1a5364dce..377501650 100644 --- a/packages/runtime/test/dataViews/requestItems/TransferFileOwnershipRequestItemDVO.test.ts +++ b/packages/runtime/test/dataViews/requestItems/TransferFileOwnershipRequestItemDVO.test.ts @@ -1,5 +1,5 @@ import { DecideRequestItemParametersJSON } from "@nmshd/consumption"; -import { RequestJSON, TransferFileOwnershipAcceptResponseItemJSON, TransferFileOwnershipRequestItemJSON } from "@nmshd/content"; +import { RequestJSON, TransferFileOwnershipAcceptResponseItemJSON } from "@nmshd/content"; import { ConsumptionServices, CreateOutgoingRequestRequest, @@ -70,13 +70,13 @@ beforeEach(async () => { mustBeAccepted: true, fileReference: truncatedFileReference, ownershipToken: file.ownershipToken - } as TransferFileOwnershipRequestItemJSON + } ] }, peer: rAddress }; - responseItems = [{ accept: true }] as any; + responseItems = [{ accept: true }]; await cleanupAttributes([sRuntimeServices, rRuntimeServices]); diff --git a/packages/runtime/test/lib/TestNotificationItem.ts b/packages/runtime/test/lib/TestNotificationItem.ts index d78659294..c28c70ad8 100644 --- a/packages/runtime/test/lib/TestNotificationItem.ts +++ b/packages/runtime/test/lib/TestNotificationItem.ts @@ -24,7 +24,7 @@ export class TestNotificationItem extends NotificationItem implements INotificat public failProcess?: boolean; public static from(value: ITestNotificationItem): TestNotificationItem { - return super.fromAny(value) as TestNotificationItem; + return super.fromAny(value); } } diff --git a/packages/runtime/test/lib/testUtils.ts b/packages/runtime/test/lib/testUtils.ts index 2a72a6ca4..201e64e80 100644 --- a/packages/runtime/test/lib/testUtils.ts +++ b/packages/runtime/test/lib/testUtils.ts @@ -160,7 +160,7 @@ export async function syncUntilHasEvent( e.namespace === subscriptionTarget.namespace && (typeof subscriptionTarget === "string" || e instanceof subscriptionTarget) && (!predicate || predicate(e as TEvent)) - ) as TEvent | undefined; + ); iterationNumber++; } while (!event && iterationNumber < 15); diff --git a/packages/runtime/test/lib/testUtilsWithInactiveModules.ts b/packages/runtime/test/lib/testUtilsWithInactiveModules.ts index 636bd8229..64147115d 100644 --- a/packages/runtime/test/lib/testUtilsWithInactiveModules.ts +++ b/packages/runtime/test/lib/testUtilsWithInactiveModules.ts @@ -57,7 +57,7 @@ export async function exchangeMessageWithRequestAndSendResponse( { accept: action === "Accept" } - ] as any // bug in Runtime + ] // bug in Runtime }); const rResponseMessage = ( diff --git a/packages/runtime/test/transport/relationships.test.ts b/packages/runtime/test/transport/relationships.test.ts index 65ffb22e1..0488f105f 100644 --- a/packages/runtime/test/transport/relationships.test.ts +++ b/packages/runtime/test/transport/relationships.test.ts @@ -5,7 +5,6 @@ import { IdentityAttribute, ReadAttributeAcceptResponseItem, ReadAttributeRequestItem, - ReadAttributeRequestItemJSON, RelationshipAttributeConfidentiality, RelationshipCreationContent, RelationshipCreationContentJSON, @@ -375,7 +374,7 @@ describe("Can Create / Create Relationship", () => { "@type": "IdentityAttributeQuery", valueType: "GivenName" } - } as ReadAttributeRequestItemJSON + } ] } }; diff --git a/packages/transport/test/core/backbone/Authentication.test.ts b/packages/transport/test/core/backbone/Authentication.test.ts index 2ac67650f..02c8869c8 100644 --- a/packages/transport/test/core/backbone/Authentication.test.ts +++ b/packages/transport/test/core/backbone/Authentication.test.ts @@ -19,7 +19,7 @@ describe("AuthenticationTest", function () { const anyC = controller as any; oldLogger = anyC.client._logger; anyC.client._logger = mock(); - oldGetCredentials = controller.parent.activeDevice.getCredentials as Function; + oldGetCredentials = controller.parent.activeDevice.getCredentials; controller.parent.activeDevice.getCredentials = async function () { const deviceCredentials = await oldGetCredentials.apply(anyC.parent.activeDevice); const newCredentials = Object.assign({}, deviceCredentials, config); diff --git a/packages/transport/test/modules/sync/SyncController.messages.test.ts b/packages/transport/test/modules/sync/SyncController.messages.test.ts index e816ef4ae..73beb7836 100644 --- a/packages/transport/test/modules/sync/SyncController.messages.test.ts +++ b/packages/transport/test/modules/sync/SyncController.messages.test.ts @@ -53,7 +53,7 @@ describe("MessageSync", function () { await TestUtil.syncUntilHasMessages(b1); const b1Messages = await b1.messages.getMessages(); - expect(b1Messages[0].toJSON()).toStrictEqualExcluding(a2Message.toJSON() as any, "isOwn", "recipients[0].receivedAt", "recipients[0].receivedByDevice"); + expect(b1Messages[0].toJSON()).toStrictEqualExcluding(a2Message.toJSON(), "isOwn", "recipients[0].receivedAt", "recipients[0].receivedByDevice"); }); test("concurrent send A1 -> B1, A2 -> B1: sync should receive messages sent parallel to the same identity on all devices", async function () { @@ -79,9 +79,9 @@ describe("MessageSync", function () { expect(b1MessageFromA1).toBeDefined(); expect(b1MessageFromA2).toBeDefined(); - expect(b1MessageFromA1!.toJSON()).toStrictEqualExcluding(a1SentMessage.toJSON() as any, "isOwn", "recipients[0].receivedAt", "recipients[0].receivedByDevice"); + expect(b1MessageFromA1!.toJSON()).toStrictEqualExcluding(a1SentMessage.toJSON(), "isOwn", "recipients[0].receivedAt", "recipients[0].receivedByDevice"); - expect(b1MessageFromA2!.toJSON()).toStrictEqualExcluding(a2SentMessage.toJSON() as any, "isOwn", "recipients[0].receivedAt", "recipients[0].receivedByDevice"); + expect(b1MessageFromA2!.toJSON()).toStrictEqualExcluding(a2SentMessage.toJSON(), "isOwn", "recipients[0].receivedAt", "recipients[0].receivedByDevice"); // B2 syncs its datawallet await b2.syncDatawallet(); @@ -91,9 +91,9 @@ describe("MessageSync", function () { expect(b2MessageFromA1).toBeDefined(); expect(b2MessageFromA2).toBeDefined(); - expect(b2MessageFromA1!.toJSON()).toStrictEqualExcluding(a1SentMessage.toJSON() as any, "isOwn", "recipients[0].receivedAt", "recipients[0].receivedByDevice"); + expect(b2MessageFromA1!.toJSON()).toStrictEqualExcluding(a1SentMessage.toJSON(), "isOwn", "recipients[0].receivedAt", "recipients[0].receivedByDevice"); - expect(b2MessageFromA2!.toJSON()).toStrictEqualExcluding(a2SentMessage.toJSON() as any, "isOwn", "recipients[0].receivedAt", "recipients[0].receivedByDevice"); + expect(b2MessageFromA2!.toJSON()).toStrictEqualExcluding(a2SentMessage.toJSON(), "isOwn", "recipients[0].receivedAt", "recipients[0].receivedByDevice"); }); test("concurrent receive A1 -> B1, A2 -> B1: only one active sync run is allowed", async function () { @@ -132,8 +132,8 @@ describe("MessageSync", function () { expect(b1MessageFromA1).toBeDefined(); expect(b1MessageFromA2).toBeDefined(); - expect(b1MessageFromA1!.toJSON()).toStrictEqualExcluding(a1SentMessage.toJSON() as any, "isOwn", "recipients[0].receivedAt", "recipients[0].receivedByDevice"); - expect(b1MessageFromA2!.toJSON()).toStrictEqualExcluding(a2SentMessage.toJSON() as any, "isOwn", "recipients[0].receivedAt", "recipients[0].receivedByDevice"); + expect(b1MessageFromA1!.toJSON()).toStrictEqualExcluding(a1SentMessage.toJSON(), "isOwn", "recipients[0].receivedAt", "recipients[0].receivedByDevice"); + expect(b1MessageFromA2!.toJSON()).toStrictEqualExcluding(a2SentMessage.toJSON(), "isOwn", "recipients[0].receivedAt", "recipients[0].receivedByDevice"); // B2 synchronizes the received messages to its local datawallet await b2.syncDatawallet();