diff --git a/package-lock.json b/package-lock.json index ef41c87..b2ffa9f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -766,9 +766,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "dependencies": { @@ -879,9 +879,9 @@ } }, "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "dependencies": { @@ -1078,9 +1078,9 @@ } }, "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.15.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.1.tgz", - "integrity": "sha512-S99WuO3HlhO3XN41EtYUNl9zzXjoJx7QvmipxsJVxtCBT0YHEFy+iOJhjSvrmV12nYhWpZaM8lPHkJm0yUMbag==", + "version": "3.15.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.2.tgz", + "integrity": "sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==", "dev": true, "license": "MIT", "dependencies": { @@ -1227,15 +1227,15 @@ "license": "MIT" }, "node_modules/@loopback/boot": { - "version": "8.0.15", - "resolved": "https://registry.npmjs.org/@loopback/boot/-/boot-8.0.15.tgz", - "integrity": "sha512-HgquE7Mwjgqn31Jcad7GsnYnXkSv39leriYimUpHqU/E4am+nGDRfOMaC1PJy7xdpF4DTDqsd2BmRhsaIkdg/w==", + "version": "8.0.16", + "resolved": "https://registry.npmjs.org/@loopback/boot/-/boot-8.0.16.tgz", + "integrity": "sha512-UNRgKnRdWmUEUtDUXSk1cVkKs11Bba4XrNZGSIFm40ey9zGwM4V+6UKjGKjWZgBIZdtiU0v4xoNQocBk65s1Lg==", "dev": true, "license": "MIT", "dependencies": { - "@loopback/model-api-builder": "^7.0.15", - "@loopback/repository": "^8.0.14", - "@loopback/service-proxy": "^8.0.14", + "@loopback/model-api-builder": "^7.0.16", + "@loopback/repository": "^8.0.15", + "@loopback/service-proxy": "^8.0.15", "@types/debug": "^4.1.13", "debug": "^4.4.3", "glob": "^13.0.6", @@ -1249,9 +1249,9 @@ } }, "node_modules/@loopback/build": { - "version": "12.0.14", - "resolved": "https://registry.npmjs.org/@loopback/build/-/build-12.0.14.tgz", - "integrity": "sha512-/oNfYI8eYWR09QtiaJwlqAJjnppa8nosLR5vdt79WGQH0LpnixWlOuAckNIX88s7MPYBmHel/vSJ53hC3UrDCg==", + "version": "12.0.15", + "resolved": "https://registry.npmjs.org/@loopback/build/-/build-12.0.15.tgz", + "integrity": "sha512-O7tTgwEqDy2jRHQ0GYGbIMKJFQKO1bRy6fD6s4ub2ymuCB8gcYitLaM5ELcikNcvckRkg9iGxjT+nTP3PHlg9g==", "dev": true, "license": "MIT", "dependencies": { @@ -1261,10 +1261,10 @@ "cross-spawn": "^7.0.6", "debug": "^4.4.3", "eslint": "^8.57.1", - "fs-extra": "^11.3.6", + "fs-extra": "^11.4.0", "glob": "^13.0.6", "lodash": "^4.18.1", - "mocha": "^11.7.6", + "mocha": "^11.8.0", "nyc": "^18.0.0", "prettier": "^3.8.3", "rimraf": "^5.0.10", @@ -1305,9 +1305,9 @@ } }, "node_modules/@loopback/build/node_modules/brace-expansion": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", - "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1620,12 +1620,12 @@ } }, "node_modules/@loopback/context": { - "version": "8.0.14", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-8.0.14.tgz", - "integrity": "sha512-rxiF35/LhfE5BoI1znrf9+UcnY9SKQ0/9wt7XfySwprKuyr8ypjsgiVsDbJhBeCVRlzE9CejvkN/hsZ7k2AbHQ==", + "version": "8.0.15", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-8.0.15.tgz", + "integrity": "sha512-NNFRISR+tCYV7DX0/lHNUfF993dCWkyXoWT7Mv83IZb3a2xAeK3HKILrUxwTQri0y0PsVVXrJbsnonPg/NJBwQ==", "license": "MIT", "dependencies": { - "@loopback/metadata": "^8.0.14", + "@loopback/metadata": "^8.0.15", "@types/debug": "^4.1.13", "debug": "^4.4.3", "hyperid": "^3.3.0", @@ -1638,12 +1638,12 @@ } }, "node_modules/@loopback/core": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/@loopback/core/-/core-7.0.14.tgz", - "integrity": "sha512-n924Ust4mXVbP8m9hRZfVsGAlJs89Xc03LEaY5h26B9ztsBIK53pfU3oM99vLGhNe4bxMwDMEkxermOSeTStww==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-7.0.15.tgz", + "integrity": "sha512-rhiaSO6+HpJUSJT8tPk3FqmjOHaW3Xsc9cbO+zcSjuC0L66MSAqBLGVOoKfyGtEW5yzpCOCooyyi5aJx8B5/wQ==", "license": "MIT", "dependencies": { - "@loopback/context": "^8.0.14", + "@loopback/context": "^8.0.15", "debug": "^4.4.3", "tslib": "^2.8.1" }, @@ -1672,13 +1672,13 @@ } }, "node_modules/@loopback/express": { - "version": "8.0.14", - "resolved": "https://registry.npmjs.org/@loopback/express/-/express-8.0.14.tgz", - "integrity": "sha512-77nfoUNEB+VdlT26N+FrdA44YNw3BkimYXJodlg1t9esyDsNIi+QDoAHOACcGHMLkhWJwc5daptzKB2plgVJBw==", + "version": "8.0.15", + "resolved": "https://registry.npmjs.org/@loopback/express/-/express-8.0.15.tgz", + "integrity": "sha512-ejJyRul3qokA07r4EyhzPoPgIpuYglRUoi/WlfecD+G1WYxivXyUzd+M9TwFT8MpRRyd4DyJRIPTG1PhYlCIiA==", "license": "MIT", "peer": true, "dependencies": { - "@loopback/http-server": "^7.0.14", + "@loopback/http-server": "^7.0.15", "@types/body-parser": "^1.19.6", "@types/express": "^4.17.25", "@types/express-serve-static-core": "^4.19.9", @@ -1699,9 +1699,9 @@ } }, "node_modules/@loopback/filter": { - "version": "6.0.14", - "resolved": "https://registry.npmjs.org/@loopback/filter/-/filter-6.0.14.tgz", - "integrity": "sha512-bjtuId7zDWNLzhW0ENoy1GSQompvoKY4T4166Gm0Xf1BV7eZeJhB3leaWGiOIOlmlYGVCo4ct+8h65QEVlGxwQ==", + "version": "6.0.15", + "resolved": "https://registry.npmjs.org/@loopback/filter/-/filter-6.0.15.tgz", + "integrity": "sha512-4Hqzn/8DKgHujOHi8SoaUKjVMKJIr2YkTqmC9dZi16RmziL2gEJtc59FHowGqJ+7S8Oh5O+U6IgLndOqhEqytg==", "license": "MIT", "dependencies": { "tslib": "^2.8.1" @@ -1711,9 +1711,9 @@ } }, "node_modules/@loopback/http-server": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/@loopback/http-server/-/http-server-7.0.14.tgz", - "integrity": "sha512-mrJqmOEE3zo3o3WnIgRpNaRKevVBFe4tHDeeZTVsRR9AqORCEeSyvj3p0WorOjiUDnI/QV1h/NeR4zyjPR4fjw==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@loopback/http-server/-/http-server-7.0.15.tgz", + "integrity": "sha512-On1L/tW1lP9ifOJGRMLACG7v4N4B7XOR86ulubuOSoJE+oKYrRsaYW0wpWSYVQLvzBsbi/oVBpeEwk2Vml7mrg==", "license": "MIT", "peer": true, "dependencies": { @@ -1726,9 +1726,9 @@ } }, "node_modules/@loopback/metadata": { - "version": "8.0.14", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-8.0.14.tgz", - "integrity": "sha512-bsZem0y/F0FwiiFGC4d5XfVdMATS85ECMJZXpYGhh6ZOugVE8i1XXpTexb9wBRk5ohxUYDgp/98f1X46NFZxUQ==", + "version": "8.0.15", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-8.0.15.tgz", + "integrity": "sha512-sL1aWimBqQ/O/Cs507F7DQysJVCJMIova+JMMVQhrXOyDXpRMa4S/TYQo6kVMfeR1WROc3AbzMGXc+oWe2KLxw==", "license": "MIT", "dependencies": { "debug": "^4.4.3", @@ -1741,9 +1741,9 @@ } }, "node_modules/@loopback/model-api-builder": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@loopback/model-api-builder/-/model-api-builder-7.0.15.tgz", - "integrity": "sha512-3ECbuAufeIC/KgvD0WZXXDdF8/HM/dZwWzJptbMv7ueS9GhkGwiKpElT5wqMbSkKKAYIrCxEu3ZdtT5e6/u29Q==", + "version": "7.0.16", + "resolved": "https://registry.npmjs.org/@loopback/model-api-builder/-/model-api-builder-7.0.16.tgz", + "integrity": "sha512-OI6EGitxB7bGeFZt+5k73EvVnQNqKcg15Bgk2L7nDLoajr2Lgpg2V5+Q42vwVfOBWPIEJB/oYcBnx/uQrNtrWA==", "dev": true, "license": "MIT", "dependencies": { @@ -1758,13 +1758,13 @@ } }, "node_modules/@loopback/openapi-v3": { - "version": "11.0.15", - "resolved": "https://registry.npmjs.org/@loopback/openapi-v3/-/openapi-v3-11.0.15.tgz", - "integrity": "sha512-uN+TbuarJD+yN0CVQOQaBqMmzrQZt8mCDtXmKPbhgg6DfpMSoMx6FZ7AGcIi8zmLvg8NKXLbOCZRxUAzm57buw==", + "version": "11.0.16", + "resolved": "https://registry.npmjs.org/@loopback/openapi-v3/-/openapi-v3-11.0.16.tgz", + "integrity": "sha512-jhxnp1gk5zi9UF8h7EGx2p1A2P/pjKLV7l7xVLcTYFhJPFU+r/6aIPEbSb6UkIF7UJ82V6ktTivZeZviiJ6jOg==", "license": "MIT", "peer": true, "dependencies": { - "@loopback/repository-json-schema": "^9.0.15", + "@loopback/repository-json-schema": "^9.0.16", "debug": "^4.4.3", "http-status": "^1.8.1", "json-merge-patch": "^1.0.2", @@ -1780,16 +1780,16 @@ } }, "node_modules/@loopback/repository": { - "version": "8.0.14", - "resolved": "https://registry.npmjs.org/@loopback/repository/-/repository-8.0.14.tgz", - "integrity": "sha512-Dyzx0FRZc1HiBjZl3ZUALnu7K9DpJxpNwg/8sLsrPLac0Ma1D04dLPV6lTN0D4oxvpCv+zMM8/Jp2ldNkXfHyQ==", + "version": "8.0.15", + "resolved": "https://registry.npmjs.org/@loopback/repository/-/repository-8.0.15.tgz", + "integrity": "sha512-H76M0T0pKG0UrHQ6CehUr7AIM2tyzv+CKDhwrZ4rKkz0RuSn6RwyjoU5eS0zfi9Eg6+lltdDWpr2BzAy9iJ0Tg==", "license": "MIT", "dependencies": { - "@loopback/filter": "^6.0.14", + "@loopback/filter": "^6.0.15", "@types/debug": "^4.1.13", "debug": "^4.4.3", "lodash": "^4.18.1", - "loopback-datasource-juggler": "^7.0.0", + "loopback-datasource-juggler": "^7.0.2", "tslib": "^2.8.1" }, "engines": { @@ -1800,9 +1800,9 @@ } }, "node_modules/@loopback/repository-json-schema": { - "version": "9.0.15", - "resolved": "https://registry.npmjs.org/@loopback/repository-json-schema/-/repository-json-schema-9.0.15.tgz", - "integrity": "sha512-ayzno06U9y8UUNV3/lbTw0kzHcxC91omV7fEG3RaNKyIiGM/XdfS0rtSNpQb0Pxt5akmV69kMINL6nvJ610BVg==", + "version": "9.0.16", + "resolved": "https://registry.npmjs.org/@loopback/repository-json-schema/-/repository-json-schema-9.0.16.tgz", + "integrity": "sha512-YbXAm1oAkxCuELgrCu3snOtMAtr6AlftFUM9pZIpr0aKYECiq//Gl+YxWOk608QgVkBo5VxE9WB7jCgelh41MA==", "license": "MIT", "peer": true, "dependencies": { @@ -1819,15 +1819,15 @@ } }, "node_modules/@loopback/rest": { - "version": "15.0.15", - "resolved": "https://registry.npmjs.org/@loopback/rest/-/rest-15.0.15.tgz", - "integrity": "sha512-ukz9OjDmUvLImFlt3QxiDUsEkkS1ZDeu+EbJethjaRtv63ebU9qifop/3MbWBLwOcWPA70R5CoKaiTEAJlW2MA==", + "version": "15.0.16", + "resolved": "https://registry.npmjs.org/@loopback/rest/-/rest-15.0.16.tgz", + "integrity": "sha512-USO5ts0WefAoleVG7l3xl7jeq5gks6wMza6j1uDQkyQi9ltGKZVkkZk9LXRwQrf8uqOlGmorKTDZSD4I3GFMaw==", "license": "MIT", "peer": true, "dependencies": { - "@loopback/express": "^8.0.14", - "@loopback/http-server": "^7.0.14", - "@loopback/openapi-v3": "^11.0.15", + "@loopback/express": "^8.0.15", + "@loopback/http-server": "^7.0.15", + "@loopback/openapi-v3": "^11.0.16", "@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0", "@types/body-parser": "^1.19.6", "@types/cors": "^2.8.19", @@ -1846,13 +1846,13 @@ "debug": "^4.4.3", "express": "^4.22.2", "http-errors": "^2.0.1", - "js-yaml": "^4.3.0", + "js-yaml": "^4.3.1", "json-schema-compare": "^0.2.2", "lodash": "^4.18.1", "on-finished": "^2.4.1", "path-to-regexp": "^6.3.0", "qs": "^6.15.3", - "strong-error-handler": "^5.0.32", + "strong-error-handler": "^6.0.1", "tslib": "^2.8.1", "type-is": "^2.1.0", "validator": "^13.15.35" @@ -1865,13 +1865,13 @@ } }, "node_modules/@loopback/service-proxy": { - "version": "8.0.14", - "resolved": "https://registry.npmjs.org/@loopback/service-proxy/-/service-proxy-8.0.14.tgz", - "integrity": "sha512-bJqITbcOj3YW0N/owIE4tuNdTqqtftTWl1LL6KOmuAqBxzl/boqvclwTMAY6zbc5euHEOypVOzmC6GgwRh6GBw==", + "version": "8.0.15", + "resolved": "https://registry.npmjs.org/@loopback/service-proxy/-/service-proxy-8.0.15.tgz", + "integrity": "sha512-8L+U+Ct6pqM+tG/1JQIEluujq0Rsy00kznVrhAi0k3DxExlM/EJ6Koz0qmCjmPSbwJIoiQU3VSS7BpkDNwxEEA==", "dev": true, "license": "MIT", "dependencies": { - "loopback-datasource-juggler": "^7.0.0", + "loopback-datasource-juggler": "^7.0.2", "tslib": "^2.8.1" }, "engines": { @@ -2083,13 +2083,13 @@ "license": "MIT" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-14.0.0.tgz", - "integrity": "sha512-fNVRE7ufJiAA3XUrha2omTA39M6IXIc6GIZLvlbsm8QOQCYvpq/LkMNGyFlB1d8hTDzsAXa3OKtybdMAYsV/fw==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-15.0.0.tgz", + "integrity": "sha512-lw9A9YL5s4VPj+VEx8uMxaxQm2YTgrPDkrLEuZuu18R8TK3oPcXF4K6t52nx6xn1RcogZC9i188sAr/4XYJaQQ==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^16.0.0" + "@octokit/types": "^17.0.0" }, "engines": { "node": ">= 20" @@ -2098,23 +2098,6 @@ "@octokit/core": ">=6" } }, - "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": { - "version": "27.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-27.0.0.tgz", - "integrity": "sha512-whrdktVs1h6gtR+09+QsNk2+FO+49j6ga1c55YZudfEG+oKJVvJLQi3zkOm5JjiUXAagWK2tI2kTGKJ2Ys7MGA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-16.0.0.tgz", - "integrity": "sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/openapi-types": "^27.0.0" - } - }, "node_modules/@octokit/plugin-retry": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-8.1.1.tgz", @@ -2400,14 +2383,14 @@ } }, "node_modules/@semantic-release/github": { - "version": "12.0.9", - "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-12.0.9.tgz", - "integrity": "sha512-ODIqb0V3QqndipryEEiaBxUQCFjvv7Oese5Dt4omMGa60YRNEW0Sx3K+zri0uac2Y6S9nOlMehciWIzvvRCTGQ==", + "version": "12.0.10", + "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-12.0.10.tgz", + "integrity": "sha512-QskygvpX8hFx9UEbqJ+C46OIhaJjsysNQ8PYJPuRDc/ek5+dh8WYGD1ofUahCcGLAOmnnwZTcmCJCEXM8XxhRw==", "dev": true, "license": "MIT", "dependencies": { "@octokit/core": "^7.0.0", - "@octokit/plugin-paginate-rest": "^14.0.0", + "@octokit/plugin-paginate-rest": "^15.0.0", "@octokit/plugin-retry": "^8.0.0", "@octokit/plugin-throttling": "^11.0.0", "@semantic-release/error": "^4.0.0", @@ -2516,9 +2499,9 @@ } }, "node_modules/@semantic-release/npm": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/@semantic-release/npm/-/npm-13.1.5.tgz", - "integrity": "sha512-Hq5UxzoatN3LHiq2rTsWS54nCdqJHlsssGERCo8WlvdfFA9LoN0vO+OuKVSjtNapIc/S8C2LBj206wKLHg62mg==", + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/@semantic-release/npm/-/npm-13.2.0.tgz", + "integrity": "sha512-Uz4JGafLoEGiheLKEs1orockCWP6liY9D2YnvKHYbqo9hCHAw9fuAHcU53q29SXVCtkvDhs/QVUg7Vvuyfp4Jg==", "dev": true, "license": "MIT", "dependencies": { @@ -3735,9 +3718,9 @@ "license": "ISC" }, "node_modules/@xmldom/xmldom": { - "version": "0.8.14", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.14.tgz", - "integrity": "sha512-T4EDRUBVZYRldYApjEJiU0e1stYWaRAX7CuSnKzrpwdZKo53zGV8/pqfzV6FfwNl9YThD2OumQYvqtvjvgG7aQ==", + "version": "0.8.15", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.15.tgz", + "integrity": "sha512-/5NV/vDALVFDXgLmfsy9TRCBlKwO2LNBFzpzvb9iIj+jR+eSc6DLYYvVOdivT/jm7MtU6TebYuRmzEOI7w40UA==", "dev": true, "license": "MIT", "engines": { @@ -4272,19 +4255,19 @@ "license": "MIT" }, "node_modules/body-parser": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.3.0.tgz", - "integrity": "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.4.0.tgz", + "integrity": "sha512-Ifk1KcLrxaGt1occQagQNFNNOqRt1LFuehEnHHzB8Z6cRgIxRU1TBaiIsUiCdA+gy5PL7Y1IX31DNKkRmxtXjQ==", "license": "MIT", "peer": true, "dependencies": { "bytes": "^3.1.2", - "content-type": "^2.0.0", + "content-type": "^2.1.0", "debug": "^4.4.3", "http-errors": "^2.0.1", - "iconv-lite": "^0.7.2", + "iconv-lite": "^0.7.3", "on-finished": "^2.4.1", - "qs": "^6.15.2", + "qs": "^6.16.1", "raw-body": "^3.0.2", "type-is": "^2.1.0" }, @@ -5004,9 +4987,9 @@ } }, "node_modules/commitizen/node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "dependencies": { @@ -6892,9 +6875,9 @@ } }, "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "dependencies": { @@ -7057,9 +7040,9 @@ } }, "node_modules/express": { - "version": "4.22.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.22.2.tgz", - "integrity": "sha512-IuL+Elrou2ZvCFHs18/CIzy2Nzvo25nZ1/D2eIZlz7c+QUayAcYoiM2BthCjs+EBHVpjYjcuLDAiCWgeIX3X1Q==", + "version": "4.22.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.22.3.tgz", + "integrity": "sha512-Bdcs4+3qlpVlx2NRn6fgX2Ue2/gGRaPeawebgclM0ERSCqDpA+owF1fdPwjJUTAJWMTuAaxjDf+hzb0/4eKvvw==", "license": "MIT", "dependencies": { "accepts": "~1.3.8", @@ -7081,9 +7064,9 @@ "methods": "~1.1.2", "on-finished": "~2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "~0.1.12", + "path-to-regexp": "~0.1.13", "proxy-addr": "~2.0.7", - "qs": "~6.15.1", + "qs": "~6.16.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", "send": "~0.19.0", @@ -7103,9 +7086,9 @@ } }, "node_modules/express/node_modules/body-parser": { - "version": "1.20.6", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.6.tgz", - "integrity": "sha512-p5tAzS57i5MV9fZFDj9LeIiTZEufbSe2eDozP+ElheSUq1m74CRq1jI4mYNDdVs9vQztXFLuk/Gd6BWTdwRJ5g==", + "version": "1.20.9", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.9.tgz", + "integrity": "sha512-FISIQxV5u91Y9gvuFq3q/tA/qTqLJn3AhRcEvyozyhJTh5OBFFtv827AdHU7Rbyct4r+Ba1/99oFa1Y3yuFsdw==", "license": "MIT", "dependencies": { "bytes": "~3.1.2", @@ -7116,7 +7099,7 @@ "http-errors": "~2.0.1", "iconv-lite": "~0.4.24", "on-finished": "~2.4.1", - "qs": "~6.15.1", + "qs": "~6.16.0", "raw-body": "~2.5.3", "type-is": "~1.6.18", "unpipe": "~1.0.0" @@ -7282,9 +7265,9 @@ "license": "MIT" }, "node_modules/fast-uri": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.5.tgz", - "integrity": "sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz", + "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==", "funding": [ { "type": "github", @@ -7538,9 +7521,9 @@ } }, "node_modules/flat-cache/node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "dependencies": { @@ -7608,9 +7591,9 @@ "license": "ISC" }, "node_modules/follow-redirects": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", - "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.1.tgz", + "integrity": "sha512-FNvFGzoMLWmE6Yj9spb/zjd7yiNCHiAW9/Tg9CXrQ8wuu32HtlJOwWO11OJafl5FfY3DxTdQ0vj42zU1kvv5jg==", "dev": true, "funding": [ { @@ -8142,9 +8125,9 @@ } }, "node_modules/glob/node_modules/brace-expansion": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", - "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", "dev": true, "license": "MIT", "dependencies": { @@ -8315,12 +8298,12 @@ "license": "MIT" }, "node_modules/handlebars": { - "version": "4.7.9", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz", - "integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==", + "version": "4.7.10", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.10.tgz", + "integrity": "sha512-P5VJMVM7qgBn6vjXMw8WG9uVI+ncf2pi72j4de4yz5ZULLj2RGqLYaKOYGsgyrViQ0tePOVlN1tDCCXXtFqXKg==", "license": "MIT", "dependencies": { - "minimist": "^1.2.5", + "minimist": "^1.2.8", "neo-async": "^2.6.2", "source-map": "^0.6.1", "wordwrap": "^1.0.0" @@ -9225,9 +9208,9 @@ } }, "node_modules/istanbul-lib-processinfo/node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "dependencies": { @@ -9420,9 +9403,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", - "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", "funding": [ { "type": "github", @@ -9999,39 +9982,26 @@ } }, "node_modules/loopback-connector": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/loopback-connector/-/loopback-connector-7.0.6.tgz", - "integrity": "sha512-KZ//JPQbn/qyUhXBPJU460uyCSLERvBXoKRrM9nlgmwJtmE5OkabqGhVEydhLGt7P78m/kSt+bvntJOOhrKR8Q==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/loopback-connector/-/loopback-connector-8.0.4.tgz", + "integrity": "sha512-ScjcDq0IXYF5FhSukinvaPqHV0aHrVCE4XRfZTRi3JTVv+HU45b+IXQmMsGWDfwqEvPm31PGMF0ehIq6Eg5nHw==", "license": "MIT", "dependencies": { "async": "^3.2.6", "bluebird": "^3.7.2", "debug": "^4.4.3", - "msgpack5": "^6.0.2", + "msgpack5": "^6.1.0", "strong-globalize": "^6.0.6", - "uuid": "^13.0.2" + "uuid": "^14.0.3" }, "engines": { - "node": ">=20" - } - }, - "node_modules/loopback-connector/node_modules/uuid": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-13.0.2.tgz", - "integrity": "sha512-vzi9uRZ926x4XV73S/4qQaTwPXM2JBj6/6lI/byHH1jOpCzb0zDbfytgA9LcN/hzb2l7WQSQnxITOVx5un/wGw==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist-node/bin/uuid" + "node": ">=22" } }, "node_modules/loopback-datasource-juggler": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-7.0.0.tgz", - "integrity": "sha512-Pz8x8uCngZSj/Xv7SWgLo+lgq/rFooCWZUxwTBpBzjMOUqa89IZXYTKjg7GQIKv5pJ6C2l0u9EGMG3bXKeh8Xg==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-7.0.4.tgz", + "integrity": "sha512-TARuFkd3x75/OvMherIca+0rBzfwnqtTYl/NfFQHTz9dBa6B/laiHXE0LFyeATCiH23arbnhKb2Iiny+3wyryg==", "license": "MIT", "dependencies": { "async": "^3.2.6", @@ -10040,13 +10010,13 @@ "depd": "^2.0.0", "inflection": "^3.0.2", "lodash": "^4.18.1", - "loopback-connector": "^7.0.6", - "minimatch": "^10.2.5", - "nanoid": "^3.3.12", - "neotraverse": "^0.6.18", - "qs": "^6.15.2", + "loopback-connector": "^8.0.3", + "minimatch": "^10.2.6", + "nanoid": "^3.3.20", + "neotraverse": "^1.0.1", + "qs": "^6.16.0", "strong-globalize": "^6.0.6", - "uuid": "^13.0.2" + "uuid": "^14.0.3" }, "engines": { "node": ">=22" @@ -10062,9 +10032,9 @@ } }, "node_modules/loopback-datasource-juggler/node_modules/brace-expansion": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", - "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", "license": "MIT", "dependencies": { "balanced-match": "^4.0.2" @@ -10088,19 +10058,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/loopback-datasource-juggler/node_modules/uuid": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-13.0.2.tgz", - "integrity": "sha512-vzi9uRZ926x4XV73S/4qQaTwPXM2JBj6/6lI/byHH1jOpCzb0zDbfytgA9LcN/hzb2l7WQSQnxITOVx5un/wGw==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist-node/bin/uuid" - } - }, "node_modules/lower-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", @@ -10647,9 +10604,9 @@ } }, "node_modules/moment": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", - "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "version": "2.31.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.31.0.tgz", + "integrity": "sha512-0acOTfMiWOheYS4eoWb80yYMb/JLvVv9SHbs2PehaDzfUG0Bw855SKyk0IKTnPGa5+U2bmi3W68l1+sGLX/pvw==", "dev": true, "license": "MIT", "optional": true, @@ -10664,9 +10621,9 @@ "license": "MIT" }, "node_modules/msgpack5": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/msgpack5/-/msgpack5-6.0.2.tgz", - "integrity": "sha512-kBSpECAWslrciRF3jy6HkMckNa14j3VZwNUUe1ONO/yihs19MskiFnsWXm0Q0aPkDYDBRFvTKkEuEDY+HVxBvQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/msgpack5/-/msgpack5-6.1.0.tgz", + "integrity": "sha512-8g8xZrKJBiSA27pxM5TiDR7V5IZiT1+FDjmlPcY8JiRVXbVm4c/4x022VZ3yBk+3OWEiWJzV0lZBb9vhda6rCQ==", "license": "MIT", "dependencies": { "bl": "^5.0.0", @@ -10699,9 +10656,9 @@ } }, "node_modules/mv/node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "optional": true, @@ -10779,9 +10736,9 @@ "optional": true }, "node_modules/nanoid": { - "version": "3.3.18", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", - "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", "funding": [ { "type": "github", @@ -10830,9 +10787,9 @@ "license": "MIT" }, "node_modules/neotraverse": { - "version": "0.6.18", - "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-0.6.18.tgz", - "integrity": "sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-1.0.1.tgz", + "integrity": "sha512-WmmLty1YWwJl9yZi77v2dVIV6X2kuYV8YYBI/G3LWGKdGHmHUvL1z7FW0iDvEvGAwNEoc5x1tOOOyDnf5jJw/w==", "license": "MIT", "engines": { "node": ">= 10" @@ -11004,9 +10961,9 @@ } }, "node_modules/npm": { - "version": "11.19.0", - "resolved": "https://registry.npmjs.org/npm/-/npm-11.19.0.tgz", - "integrity": "sha512-SDd/hHg3KqHE5Ht2NHWxNYNtqCQ2pXAPLl6OtQhPyED5PHsRfrOtO199MZTIG2cQoQ1ZRI9t28shrD+2cr3AAw==", + "version": "11.21.1", + "resolved": "https://registry.npmjs.org/npm/-/npm-11.21.1.tgz", + "integrity": "sha512-YTzL6QBEJXyHcTu0JiUc7RKMp+mzlJtl7rGLmERaXUQeFHIMc9atdr6G9M9C8vDWbv40epoTQAzNL2/PtZVDhQ==", "bundleDependencies": [ "@isaacs/string-locale-compare", "@npmcli/arborist", @@ -11085,8 +11042,8 @@ ], "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/arborist": "^9.9.1", - "@npmcli/config": "^10.12.0", + "@npmcli/arborist": "^9.9.3", + "@npmcli/config": "^10.14.0", "@npmcli/fs": "^5.0.0", "@npmcli/map-workspaces": "^5.0.3", "@npmcli/metavuln-calculator": "^9.0.3", @@ -11110,12 +11067,12 @@ "is-cidr": "^6.0.4", "json-parse-even-better-errors": "^5.0.0", "libnpmaccess": "^10.0.3", - "libnpmdiff": "^8.1.12", - "libnpmexec": "^10.3.2", - "libnpmfund": "^7.0.26", + "libnpmdiff": "^8.1.14", + "libnpmexec": "^10.3.4", + "libnpmfund": "^7.0.28", "libnpmorg": "^8.0.1", - "libnpmpack": "^9.1.12", - "libnpmpublish": "^11.2.0", + "libnpmpack": "^9.1.15", + "libnpmpublish": "^11.2.1", "libnpmsearch": "^9.0.1", "libnpmteam": "^8.0.2", "libnpmversion": "^8.0.4", @@ -11143,7 +11100,7 @@ "spdx-expression-parse": "^4.0.0", "ssri": "^13.0.1", "supports-color": "^10.2.2", - "tar": "^7.5.19", + "tar": "^7.5.22", "text-table": "~0.2.0", "tiny-relative-date": "^2.0.2", "treeverse": "^3.0.0", @@ -11214,7 +11171,7 @@ } }, "node_modules/npm/node_modules/@npmcli/arborist": { - "version": "9.9.1", + "version": "9.9.3", "dev": true, "inBundle": true, "license": "ISC", @@ -11262,7 +11219,7 @@ } }, "node_modules/npm/node_modules/@npmcli/config": { - "version": "10.12.0", + "version": "10.14.0", "dev": true, "inBundle": true, "license": "ISC", @@ -11607,7 +11564,7 @@ } }, "node_modules/npm/node_modules/brace-expansion": { - "version": "5.0.7", + "version": "5.0.12", "dev": true, "inBundle": true, "license": "MIT", @@ -11615,7 +11572,7 @@ "balanced-match": "^4.0.2" }, "engines": { - "node": "18 || 20 || >=22" + "node": "20 || >=22" } }, "node_modules/npm/node_modules/cacache": { @@ -11812,7 +11769,7 @@ } }, "node_modules/npm/node_modules/http-cache-semantics": { - "version": "4.2.0", + "version": "4.3.0", "dev": true, "inBundle": true, "license": "BSD-2-Clause" @@ -11899,7 +11856,7 @@ } }, "node_modules/npm/node_modules/ip-address": { - "version": "10.2.0", + "version": "10.7.2", "dev": true, "inBundle": true, "license": "MIT", @@ -11981,12 +11938,12 @@ } }, "node_modules/npm/node_modules/libnpmdiff": { - "version": "8.1.12", + "version": "8.1.14", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/arborist": "^9.9.1", + "@npmcli/arborist": "^9.9.3", "@npmcli/installed-package-contents": "^4.0.0", "binary-extensions": "^3.0.0", "diff": "^8.0.2", @@ -12000,13 +11957,13 @@ } }, "node_modules/npm/node_modules/libnpmexec": { - "version": "10.3.2", + "version": "10.3.4", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { "@gar/promise-retry": "^1.0.0", - "@npmcli/arborist": "^9.9.1", + "@npmcli/arborist": "^9.9.3", "@npmcli/package-json": "^7.0.0", "@npmcli/run-script": "^10.0.0", "ci-info": "^4.0.0", @@ -12023,12 +11980,12 @@ } }, "node_modules/npm/node_modules/libnpmfund": { - "version": "7.0.26", + "version": "7.0.28", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/arborist": "^9.9.1" + "@npmcli/arborist": "^9.9.3" }, "engines": { "node": "^20.17.0 || >=22.9.0" @@ -12048,12 +12005,12 @@ } }, "node_modules/npm/node_modules/libnpmpack": { - "version": "9.1.12", + "version": "9.1.15", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/arborist": "^9.9.1", + "@npmcli/arborist": "^9.9.3", "@npmcli/run-script": "^10.0.0", "npm-package-arg": "^13.0.0", "pacote": "^21.0.2" @@ -12063,7 +12020,7 @@ } }, "node_modules/npm/node_modules/libnpmpublish": { - "version": "11.2.0", + "version": "11.2.1", "dev": true, "inBundle": true, "license": "ISC", @@ -12536,7 +12493,7 @@ } }, "node_modules/npm/node_modules/postcss-selector-parser": { - "version": "7.1.4", + "version": "7.1.6", "dev": true, "inBundle": true, "license": "MIT", @@ -12758,7 +12715,7 @@ } }, "node_modules/npm/node_modules/tar": { - "version": "7.5.19", + "version": "7.5.22", "dev": true, "inBundle": true, "license": "BlueOak-1.0.0", @@ -12854,7 +12811,7 @@ } }, "node_modules/npm/node_modules/undici": { - "version": "6.27.0", + "version": "6.29.0", "dev": true, "inBundle": true, "license": "MIT", @@ -12972,9 +12929,9 @@ } }, "node_modules/nyc/node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "dependencies": { @@ -13250,15 +13207,19 @@ } }, "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.2.tgz", + "integrity": "sha512-ATWUv387i+nLD49EiDoOft5scf32Vsdz3ktrQJG9bi7jRFmaXTssvyvj1EmeKVVgvesbqUtvQQvaS2TpTukAZQ==", "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, "engines": { "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/once": { @@ -14433,9 +14394,9 @@ "license": "ISC" }, "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.8.tgz", + "integrity": "sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==", "license": "MIT", "dependencies": { "forwarded": "0.2.0", @@ -14443,6 +14404,10 @@ }, "engines": { "node": ">= 0.10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/proxy-agent-negotiate": { @@ -14507,9 +14472,9 @@ } }, "node_modules/qs": { - "version": "6.15.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz", - "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==", + "version": "6.16.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.16.1.tgz", + "integrity": "sha512-5Px6J7rfHBAGUhNQ3es4YzcOdBBw0SDcVtThJml4RdnKw4tKs2epA0kPZ+K8X+WiHktT93RHVcQ/3ym5aTCgtg==", "license": "BSD-3-Clause", "dependencies": { "es-define-property": "^1.0.1", @@ -15969,6 +15934,18 @@ "node": ">=4" } }, + "node_modules/send/node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/send/node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -16434,9 +16411,9 @@ } }, "node_modules/spawn-wrap/node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "dependencies": { @@ -16759,16 +16736,16 @@ } }, "node_modules/strong-error-handler": { - "version": "5.0.32", - "resolved": "https://registry.npmjs.org/strong-error-handler/-/strong-error-handler-5.0.32.tgz", - "integrity": "sha512-yVmeT/PgB0ltfZDm3R0mGi9Q4ZUGMV7Oc3Ceg2GHpMiKbUPMelXBuGDt9URUMCYd2z9VtV4YPyuYv3lS5xxm1A==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/strong-error-handler/-/strong-error-handler-6.0.3.tgz", + "integrity": "sha512-ebk92TpDaHk5cmawxS8SPXWt+eW/wWKB262dtJEN8CQd5/b+Ex/I6kBUczI+dxpSSOjZjeYSs32xntu7RtNEvg==", "license": "MIT", "peer": true, "dependencies": { "accepts": "^1.3.8", "debug": "^4.4.3", "fast-safe-stringify": "^2.1.1", - "handlebars": "^4.7.9", + "handlebars": "^4.7.10", "http-status": "^1.8.1", "js2xmlparser": "^5.0.0", "strong-globalize": "^6.0.6" @@ -16973,9 +16950,9 @@ } }, "node_modules/temp/node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "dependencies": { @@ -17093,9 +17070,9 @@ } }, "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "dependencies": { @@ -17503,9 +17480,9 @@ } }, "node_modules/tslint/node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "dependencies": { @@ -17598,9 +17575,9 @@ } }, "node_modules/tslint/node_modules/js-yaml": { - "version": "3.15.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.1.tgz", - "integrity": "sha512-S99WuO3HlhO3XN41EtYUNl9zzXjoJx7QvmipxsJVxtCBT0YHEFy+iOJhjSvrmV12nYhWpZaM8lPHkJm0yUMbag==", + "version": "3.15.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.2.tgz", + "integrity": "sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==", "dev": true, "license": "MIT", "dependencies": { @@ -17811,9 +17788,9 @@ "license": "MIT" }, "node_modules/undici": { - "version": "6.28.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.28.0.tgz", - "integrity": "sha512-LIY910g9TI13YS95lrMFrs8Rm/u/irgHeTWoKCoteeJ04CUJ92eEfj0rVn+7VKMPBpUPiUoBKfhNyLI23EE/KA==", + "version": "6.28.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.28.1.tgz", + "integrity": "sha512-zWpdTVD54H48CIybL0rWQ3ukpb9d23wM7eH5RtfdmeP70cWHNjtfo7P4vZX+5CoDcO53J4Pu5uXp7lNfjc6DRA==", "license": "MIT", "engines": { "node": ">=18.17" @@ -18034,9 +18011,9 @@ } }, "node_modules/uuid": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.1.tgz", - "integrity": "sha512-6ZxzVpzDXDa3bJWaHilVayA+BH/1zmxCJoVgvmqJnid/gPoKHxUrS/aC/T6LGQtNHT+XHG9fXPJB4d+IrU30Ew==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.3.tgz", + "integrity": "sha512-Sc5u1VVln93y1Xnz4R+CunOZc7R9LUcTmhj7Rc7Eg3HVcf7rVn2FOoa812fe0W8p3jD7xeoGSYbfqCGGH2B6xw==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" @@ -18502,9 +18479,9 @@ } }, "node_modules/yamljs/node_modules/brace-expansion": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", - "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", diff --git a/package.json b/package.json index 8ffc25f..2c6f147 100644 --- a/package.json +++ b/package.json @@ -239,7 +239,7 @@ "yargs": "^17.6.2" }, "@openapi-contrib/openapi-schema-to-json-schema": "3.2.0", - "undici": "6.28.0", + "undici": "6.28.1", "axios": "1.15.0" }, "release": { diff --git a/src/__tests__/integration/action-sequence/passport-apple-oauth2/apple-oauth2-unbound.integration.ts b/src/__tests__/integration/action-sequence/passport-apple-oauth2/apple-oauth2-unbound.integration.ts new file mode 100644 index 0000000..c8d6faa --- /dev/null +++ b/src/__tests__/integration/action-sequence/passport-apple-oauth2/apple-oauth2-unbound.integration.ts @@ -0,0 +1,60 @@ +import {Application} from '@loopback/core'; +import {get} from '@loopback/openapi-v3'; +import {RestServer} from '@loopback/rest'; +import {Client, createClientForHandler, expect} from '@loopback/testlab'; +import {authenticate} from '../../../../decorators'; +import {STRATEGY} from '../../../../strategy-name.enum'; +import {MyAuthenticationSequence} from '../../../fixtures/sequences/authentication.sequence'; +import {getApp} from '../helpers/helpers'; + +describe('strategy that is not available', () => { + let app: Application; + let server: RestServer; + beforeEach(givenAServer); + afterEach(() => app.close()); + + it('should return 404 without exposing internals when the provider is not bound', async () => { + class TestController { + @get('/test') + @authenticate(STRATEGY.APPLE_OAUTH2, { + clientID: 'string', + clientSecret: 'string', + }) + test() { + return 'test successful'; + } + } + + app.controller(TestController); + + const res = await whenIMakeRequestTo(server).get('/test').expect(404); + expect(res.body.error.message).to.equal( + 'The requested resource is not available', + ); + expect(JSON.stringify(res.body)).to.not.containEql('sf.passport'); + }); + + it('should return 404 for an unknown strategy name', async () => { + class TestController { + @get('/test2') + @authenticate('not-a-strategy' as STRATEGY) + test() { + return 'test successful'; + } + } + + app.controller(TestController); + + await whenIMakeRequestTo(server).get('/test2').expect(404); + }); + + function whenIMakeRequestTo(restServer: RestServer): Client { + return createClientForHandler(restServer.requestHandler); + } + + async function givenAServer() { + app = getApp(); + server = await app.getServer(RestServer); + server.sequence(MyAuthenticationSequence); + } +}); diff --git a/src/error-keys.ts b/src/error-keys.ts index f5a071f..fcf6049 100644 --- a/src/error-keys.ts +++ b/src/error-keys.ts @@ -13,4 +13,5 @@ export const enum AuthErrorKeys { KeyInvalid = 'Key Invalid', OtpInvalid = 'Otp Invalid', OtpExpired = 'Otp Token Incorrect or Expired', + StrategyNotAvailable = 'The requested resource is not available', } diff --git a/src/strategies/user-auth-strategy.provider.ts b/src/strategies/user-auth-strategy.provider.ts index 54dc622..53c2a7f 100644 --- a/src/strategies/user-auth-strategy.provider.ts +++ b/src/strategies/user-auth-strategy.provider.ts @@ -1,4 +1,5 @@ -import {Context, inject, Provider} from '@loopback/core'; +import {BindingKey, Context, inject, Provider} from '@loopback/core'; +import {HttpErrors} from '@loopback/rest'; import {SamlConfig} from '@node-saml/passport-saml'; import {Strategy} from 'passport'; import * as AppleStrategy from 'passport-apple'; @@ -9,6 +10,7 @@ import * as PassportBearer from 'passport-http-bearer'; import * as InstagramStrategy from 'passport-instagram'; import * as PassportLocal from 'passport-local'; import * as Auth0Strategy from 'passport-auth0'; +import {AuthErrorKeys} from '../error-keys'; import {AuthenticationBindings} from '../keys'; import {STRATEGY} from '../strategy-name.enum'; import {AuthenticationMetadata, IAuthUser} from '../types'; @@ -33,18 +35,23 @@ export class AuthStrategyProvider implements Provider { @inject.context() private readonly ctx: Context, ) {} - async processLocalFactory(verifier: VerifierType) { - const localFactory = this.ctx.getSync( + /** + * An unbound factory is a supported setup (passport packages are optional), + * so it is answered like an unregistered route rather than as a server fault. + */ + private getFactory(key: BindingKey): T { + const factory = this.ctx.getSync(key, {optional: true}); + if (!factory) { + throw new HttpErrors.NotFound(AuthErrorKeys.StrategyNotAvailable); + } + return factory; + } + + processLocalFactory(verifier: VerifierType) { + const localFactory = this.getFactory( Strategies.Passport.LOCAL_STRATEGY_FACTORY, - {optional: true}, ); - if (!localFactory) { - throw new Error( - `No factory found for ${Strategies.Passport.LOCAL_STRATEGY_FACTORY}`, - ); - } - return localFactory( this.metadata.options as | PassportLocal.IStrategyOptions @@ -53,36 +60,22 @@ export class AuthStrategyProvider implements Provider { ); } - async processBearerFactory(verifier: VerifierType) { - const bearerFactory = this.ctx.getSync( + processBearerFactory(verifier: VerifierType) { + const bearerFactory = this.getFactory( Strategies.Passport.BEARER_STRATEGY_FACTORY, - {optional: true}, ); - if (!bearerFactory) { - throw new Error( - `No factory found for ${Strategies.Passport.BEARER_STRATEGY_FACTORY}`, - ); - } - return bearerFactory( this.metadata.options as PassportBearer.IStrategyOptions, verifier as VerifyFunction.BearerFn, ); } - async processResourceOwnerFactory(verifier: VerifierType) { - const resourceOwnerFactory = this.ctx.getSync( + processResourceOwnerFactory(verifier: VerifierType) { + const resourceOwnerFactory = this.getFactory( Strategies.Passport.RESOURCE_OWNER_STRATEGY_FACTORY, - {optional: true}, ); - if (!resourceOwnerFactory) { - throw new Error( - `No factory found for ${Strategies.Passport.RESOURCE_OWNER_STRATEGY_FACTORY}`, - ); - } - return resourceOwnerFactory( this.metadata .options as Oauth2ResourceOwnerPassword.StrategyOptionsWithRequestInterface, @@ -90,18 +83,11 @@ export class AuthStrategyProvider implements Provider { ); } - async processGoogleFactory(verifier: VerifierType) { - const googleFactory = this.ctx.getSync( + processGoogleFactory(verifier: VerifierType) { + const googleFactory = this.getFactory( Strategies.Passport.GOOGLE_OAUTH2_STRATEGY_FACTORY, - {optional: true}, ); - if (!googleFactory) { - throw new Error( - `No factory found for ${Strategies.Passport.GOOGLE_OAUTH2_STRATEGY_FACTORY}`, - ); - } - return googleFactory( this.metadata.options as | GoogleStrategy.StrategyOptions @@ -110,18 +96,11 @@ export class AuthStrategyProvider implements Provider { ); } - async processAzureFactory(verifier: VerifierType) { - const azureFactory = this.ctx.getSync( + processAzureFactory(verifier: VerifierType) { + const azureFactory = this.getFactory( Strategies.Passport.AZURE_AD_STRATEGY_FACTORY, - {optional: true}, ); - if (!azureFactory) { - throw new Error( - `No factory found for ${Strategies.Passport.AZURE_AD_STRATEGY_FACTORY}`, - ); - } - return azureFactory( this.metadata.options as | AzureADAuthStrategy.IOIDCStrategyOptionWithRequest @@ -130,36 +109,22 @@ export class AuthStrategyProvider implements Provider { ); } - async processKeycloakFactory(verifier: VerifierType) { - const keycloakFactory = this.ctx.getSync( + processKeycloakFactory(verifier: VerifierType) { + const keycloakFactory = this.getFactory( Strategies.Passport.KEYCLOAK_STRATEGY_FACTORY, - {optional: true}, ); - if (!keycloakFactory) { - throw new Error( - `No factory found for ${Strategies.Passport.KEYCLOAK_STRATEGY_FACTORY}`, - ); - } - return keycloakFactory( this.metadata.options as Keycloak.StrategyOptions, verifier as VerifyFunction.KeycloakAuthFn, ); } - async processInstagramFactory(verifier: VerifierType) { - const instagramFactory = this.ctx.getSync( + processInstagramFactory(verifier: VerifierType) { + const instagramFactory = this.getFactory( Strategies.Passport.INSTAGRAM_OAUTH2_STRATEGY_FACTORY, - {optional: true}, ); - if (!instagramFactory) { - throw new Error( - `No factory found for ${Strategies.Passport.INSTAGRAM_OAUTH2_STRATEGY_FACTORY}`, - ); - } - return instagramFactory( this.metadata.options as | InstagramStrategy.StrategyOption @@ -168,17 +133,10 @@ export class AuthStrategyProvider implements Provider { ); } - async processAppleFactory(verifier: VerifierType) { - const appleFactory = this.ctx.getSync( + processAppleFactory(verifier: VerifierType) { + const appleFactory = this.getFactory( Strategies.Passport.APPLE_OAUTH2_STRATEGY_FACTORY, - {optional: true}, ); - - if (!appleFactory) { - throw new Error( - `No factory found for ${Strategies.Passport.APPLE_OAUTH2_STRATEGY_FACTORY}`, - ); - } return appleFactory( this.metadata.options as | AppleStrategy.AuthenticateOptions @@ -187,18 +145,11 @@ export class AuthStrategyProvider implements Provider { ); } - async processFacebookFactory(verifier: VerifierType) { - const facebookFactory = this.ctx.getSync( + processFacebookFactory(verifier: VerifierType) { + const facebookFactory = this.getFactory( Strategies.Passport.FACEBOOK_OAUTH2_STRATEGY_FACTORY, - {optional: true}, ); - if (!facebookFactory) { - throw new Error( - `No factory found for ${Strategies.Passport.FACEBOOK_OAUTH2_STRATEGY_FACTORY}`, - ); - } - return facebookFactory( this.metadata.options as FacebookStrategy.StrategyOptionWithRequest | ExtendedStrategyOption, @@ -207,52 +158,31 @@ export class AuthStrategyProvider implements Provider { } processCognitoFactory(verifier: VerifierType) { - const cognitoFactory = this.ctx.getSync( + const cognitoFactory = this.getFactory( Strategies.Passport.COGNITO_OAUTH2_STRATEGY_FACTORY, - {optional: true}, ); - if (!cognitoFactory) { - throw new Error( - `No factory found for ${Strategies.Passport.COGNITO_OAUTH2_STRATEGY_FACTORY}`, - ); - } - return cognitoFactory( this.metadata.options as Cognito.StrategyOptions, verifier as VerifyFunction.CognitoAuthFn, ); } - async processOtpAuthFactory(verifier: VerifierType) { - const otpFactory = this.ctx.getSync( + processOtpAuthFactory(verifier: VerifierType) { + const otpFactory = this.getFactory( Strategies.Passport.OTP_AUTH_STRATEGY_FACTORY, - {optional: true}, ); - if (!otpFactory) { - throw new Error( - `No factory found for ${Strategies.Passport.OTP_AUTH_STRATEGY_FACTORY}`, - ); - } - return otpFactory( this.metadata.options as Otp.StrategyOptions, verifier as VerifyFunction.OtpAuthFn, ); } - async processAuth0Factory(verifier: VerifierType) { - const auth0Factory = this.ctx.getSync( + processAuth0Factory(verifier: VerifierType) { + const auth0Factory = this.getFactory( Strategies.Passport.AUTH0_STRATEGY_FACTORY, - {optional: true}, ); - if (!auth0Factory) { - throw new Error( - `No factory found for ${Strategies.Passport.AUTH0_STRATEGY_FACTORY}`, - ); - } - // Cast the factory output to `Strategy` type return auth0Factory( this.metadata.options as @@ -261,18 +191,11 @@ export class AuthStrategyProvider implements Provider { ); } - async processSamlFactory(verifier: VerifierType) { - const samlFactory = this.ctx.getSync( + processSamlFactory(verifier: VerifierType) { + const samlFactory = this.getFactory( Strategies.Passport.SAML_STRATEGY_FACTORY, - {optional: true}, ); - if (!samlFactory) { - throw new Error( - `No factory found for ${Strategies.Passport.SAML_STRATEGY_FACTORY}`, - ); - } - return samlFactory( this.metadata.options as SamlConfig, verifier as VerifyFunction.SamlFn, @@ -335,7 +258,7 @@ export class AuthStrategyProvider implements Provider { } default: return Promise.reject( - new Error(`The strategy ${name} is not available.`), + new HttpErrors.NotFound(AuthErrorKeys.StrategyNotAvailable), ); } }