diff --git a/package-lock.json b/package-lock.json index cb6b530..a82b23b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,28 +9,28 @@ "version": "8.0.0-pre.1", "license": "MIT", "dependencies": { - "@feathersjs/adapter-commons": "^5.0.25", - "@feathersjs/commons": "^5.0.25", - "@feathersjs/errors": "^5.0.25" + "@feathersjs/adapter-commons": "^5.0.26", + "@feathersjs/commons": "^5.0.26", + "@feathersjs/errors": "^5.0.26" }, "devDependencies": { - "@feathersjs/adapter-tests": "^5.0.25", - "@feathersjs/express": "^5.0.25", - "@feathersjs/feathers": "^5.0.25", + "@feathersjs/adapter-tests": "^5.0.26", + "@feathersjs/express": "^5.0.26", + "@feathersjs/feathers": "^5.0.26", "@types/chai": "^4.3.16", "@types/mocha": "^10.0.6", - "@types/node": "^20.12.11", + "@types/node": "^20.14.2", "@types/pg": "^8.11.6", "@typescript-eslint/eslint-plugin": "^6.9.1", "@typescript-eslint/parser": "^6.9.1", "body-parser": "^1.20.2", - "c8": "^8.0.1", + "c8": "^10.1.2", "chai": "^4.3.10", "eslint": "^8.52.0", "mocha": "^10.4.0", - "mysql2": "^3.9.7", + "mysql2": "^3.10.1", "npm-check-updates": "^16.14.20", - "pg": "^8.11.5", + "pg": "^8.12.0", "pg-hstore": "^2.3.4", "sequelize": "^6.37.3", "shx": "^0.3.4", @@ -52,10 +52,11 @@ } }, "node_modules/@babel/runtime": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.5.tgz", - "integrity": "sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz", + "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", "dev": true, + "license": "MIT", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -170,13 +171,14 @@ } }, "node_modules/@feathersjs/adapter-commons": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/adapter-commons/-/adapter-commons-5.0.25.tgz", - "integrity": "sha512-/eWhSiSw8U7hnB0KX9aW88EUitwW8phC8TykCJ/Vtv8jExZoZL8VWEjdZsRZoVk9fCu74sXrfRogwGhPMxiScA==", + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/adapter-commons/-/adapter-commons-5.0.26.tgz", + "integrity": "sha512-VQ+ITAKAd6dEc3dvrM8/c0LpbGOBNTTfqCzKMCuzZrsa4S/qKW7yQgv5iKyOfcaLymDKudSOLdIuoSP8T2CRXw==", + "license": "MIT", "dependencies": { - "@feathersjs/commons": "^5.0.25", - "@feathersjs/errors": "^5.0.25", - "@feathersjs/feathers": "^5.0.25" + "@feathersjs/commons": "^5.0.26", + "@feathersjs/errors": "^5.0.26", + "@feathersjs/feathers": "^5.0.26" }, "engines": { "node": ">= 12" @@ -187,10 +189,11 @@ } }, "node_modules/@feathersjs/adapter-tests": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/adapter-tests/-/adapter-tests-5.0.25.tgz", - "integrity": "sha512-ePDBI7mUuG+dHPbwp8c3SyqavxmZ6wNBj43JJJJFzv5Wu90gbfPxHLkTU9G4oT/cRmq8ea5tHJaq0hcNEjcPQA==", + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/adapter-tests/-/adapter-tests-5.0.26.tgz", + "integrity": "sha512-YbgCkE49npM8aOsJrYDU7UL69Z+vP3hZHgjw3FhOt8tOZ8Q8/aRyIdxmuGh/OxzQjLq2UCGGlNMDa4hb5SJ2Pw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 12" }, @@ -200,17 +203,18 @@ } }, "node_modules/@feathersjs/authentication": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/authentication/-/authentication-5.0.25.tgz", - "integrity": "sha512-dKZu5afmGwrKFJ+NPpcdSs4EhyXNVQzRW8ZXypzWWE1rYrun1CVrQ+PeUh/1bCidISctXHD7Nh4SbrIOuj6jTg==", + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/authentication/-/authentication-5.0.26.tgz", + "integrity": "sha512-/Vh3Q6cE5U55NJYVlPF3ZGDsQsXDP55akjpiR6lQjCMp1AvwR3qQ08VXIJyHy2Tc5FHkXgRq6LnLwPVqs3O4Nw==", "dev": true, + "license": "MIT", "dependencies": { - "@feathersjs/commons": "^5.0.25", - "@feathersjs/errors": "^5.0.25", - "@feathersjs/feathers": "^5.0.25", + "@feathersjs/commons": "^5.0.26", + "@feathersjs/errors": "^5.0.26", + "@feathersjs/feathers": "^5.0.26", "@feathersjs/hooks": "^0.9.0", - "@feathersjs/schema": "^5.0.25", - "@feathersjs/transport-commons": "^5.0.25", + "@feathersjs/schema": "^5.0.26", + "@feathersjs/transport-commons": "^5.0.26", "@types/jsonwebtoken": "^9.0.6", "jsonwebtoken": "^9.0.2", "lodash": "^4.17.21", @@ -226,9 +230,10 @@ } }, "node_modules/@feathersjs/commons": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-5.0.25.tgz", - "integrity": "sha512-hxNne1mytiriGEXmz5jx95WwpK7Qukymah85esJERRJzJ3XI8ax1ItuOrcpFSi8AYY6fjokoJISYlDO/OUVgjg==", + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-5.0.26.tgz", + "integrity": "sha512-Qv/6PTsfwcSEsW+rsfTQl5pxce0Tlfe2V4qnoThGANVCGVNr+sei+wzIzA53s0juZkk2BHr/OvjkcelwTROwKw==", + "license": "MIT", "engines": { "node": ">= 12" }, @@ -238,24 +243,26 @@ } }, "node_modules/@feathersjs/errors": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-5.0.25.tgz", - "integrity": "sha512-rP1dhbTffybDjTEEiPVQ/fFVLWVFMyUFVuR3UNGYp86D3SGBcvmWtWJz6JwMXUiZy6AUtIvBvjqGS1g441I5lQ==", + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-5.0.26.tgz", + "integrity": "sha512-mhR3Xo3xOvMKm7jJtArFQd8Uvtsw0q5mBu8NpFEjLdsYKmyzJs+T9LaCl96eM2chwZs4Bh4M7upuA1ZJ46Uobw==", + "license": "MIT", "engines": { "node": ">= 12" } }, "node_modules/@feathersjs/express": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/express/-/express-5.0.25.tgz", - "integrity": "sha512-9oW3uKzg3xfDFInfVJ7D0f2HFyvFMgpSiBUMTOUAYxUv1A5vIm4VB3fu1G1vyYFyncYlBcL89va30Zcd49RKmg==", + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/express/-/express-5.0.26.tgz", + "integrity": "sha512-uXhfBX1FpVT7YJsAWy5iX0mTmWLIREWKArHFriQJK+NA7hnntw0OHxpvClpcvjf4E1WDbPWl1pJK28h0tAVljw==", "dev": true, + "license": "MIT", "dependencies": { - "@feathersjs/authentication": "^5.0.25", - "@feathersjs/commons": "^5.0.25", - "@feathersjs/errors": "^5.0.25", - "@feathersjs/feathers": "^5.0.25", - "@feathersjs/transport-commons": "^5.0.25", + "@feathersjs/authentication": "^5.0.26", + "@feathersjs/commons": "^5.0.26", + "@feathersjs/errors": "^5.0.26", + "@feathersjs/feathers": "^5.0.26", + "@feathersjs/transport-commons": "^5.0.26", "@types/compression": "^1.7.5", "@types/cors": "^2.8.17", "@types/express": "^4.17.21", @@ -273,11 +280,12 @@ } }, "node_modules/@feathersjs/feathers": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/feathers/-/feathers-5.0.25.tgz", - "integrity": "sha512-JHlleo2Zjn+LNk7aN2GO7ClvhJ9RlrGlx81wjxzM6bs+V/1QZ/UGBkp816Pn0W3uSvz+aNGcHDBZbvRsPUU9UQ==", + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/feathers/-/feathers-5.0.26.tgz", + "integrity": "sha512-0cmymaCjNhM2Vqb5tcEtPNrjx2EdkrZgnPQTrD1llf+BHFvKkUFf+219rpM9v3833i9CI+jll50QW/Swd233ig==", + "license": "MIT", "dependencies": { - "@feathersjs/commons": "^5.0.25", + "@feathersjs/commons": "^5.0.26", "@feathersjs/hooks": "^0.9.0", "events": "^3.3.0" }, @@ -293,20 +301,22 @@ "version": "0.9.0", "resolved": "https://registry.npmjs.org/@feathersjs/hooks/-/hooks-0.9.0.tgz", "integrity": "sha512-kLfWnuhbC25CPkR1/TDcVs0rSiv0JLNxrpUivLwc7FUnkyeciRi5VOmC1SOzL2SOagcozu3+m4VQiONyzgfY7w==", + "license": "MIT", "engines": { "node": ">= 14" } }, "node_modules/@feathersjs/schema": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/schema/-/schema-5.0.25.tgz", - "integrity": "sha512-PUhZ1jB4BMAx3JbRdZZFQ3dweAeewJw4gOeiMMFTKmm+5+4tk6stTpse6mpZlkoKWAx1gs4s4z7Hc7sMEM4pIQ==", + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/schema/-/schema-5.0.26.tgz", + "integrity": "sha512-QOAwWAtLZMLQmt00Si5pm8pl/isVfaffBFa9sR+6a3BPmNcEo3sodupQ401zEEQ3521lDlh81JHd6tlUllYfPA==", "dev": true, + "license": "MIT", "dependencies": { - "@feathersjs/adapter-commons": "^5.0.25", - "@feathersjs/commons": "^5.0.25", - "@feathersjs/errors": "^5.0.25", - "@feathersjs/feathers": "^5.0.25", + "@feathersjs/adapter-commons": "^5.0.26", + "@feathersjs/commons": "^5.0.26", + "@feathersjs/errors": "^5.0.26", + "@feathersjs/feathers": "^5.0.26", "@feathersjs/hooks": "^0.9.0", "@types/json-schema": "^7.0.15", "ajv": "^8.13.0", @@ -325,14 +335,15 @@ } }, "node_modules/@feathersjs/transport-commons": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/transport-commons/-/transport-commons-5.0.25.tgz", - "integrity": "sha512-zLOlrtUg8tcFEvN+C7cYYPCS3C7zsP/Kw5HXIq89vg57S/8gCpBG0uh0++PaeyzIEFhX1+6qwnNM1JgtmtmEaw==", + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/transport-commons/-/transport-commons-5.0.26.tgz", + "integrity": "sha512-diXIbzKdBlaz7pcdWDdtUlSiMw0Zhx0Lyw2sF2V8BUUlzkq1Lidz0+MNvNiI29h82veXlc0XB05U6qYlofhUug==", "dev": true, + "license": "MIT", "dependencies": { - "@feathersjs/commons": "^5.0.25", - "@feathersjs/errors": "^5.0.25", - "@feathersjs/feathers": "^5.0.25", + "@feathersjs/commons": "^5.0.26", + "@feathersjs/errors": "^5.0.26", + "@feathersjs/feathers": "^5.0.26", "encodeurl": "^2.0.0", "lodash": "^4.17.21" }, @@ -455,6 +466,7 @@ "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -962,6 +974,7 @@ "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.6.tgz", "integrity": "sha512-/5hndP5dCjloafCXns6SZyESp3Ldq7YjH3zwzwczYnjxIT0Fqzk5ROSYVGfFyczIue7IUEj8hkvLbPoLQ18vQw==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -985,10 +998,11 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.12.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.11.tgz", - "integrity": "sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==", + "version": "20.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", + "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", "dev": true, + "license": "MIT", "dependencies": { "undici-types": "~5.26.4" } @@ -1405,10 +1419,11 @@ } }, "node_modules/ajv": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", - "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", @@ -1425,6 +1440,7 @@ "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^8.0.0" }, @@ -1793,7 +1809,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/buffer-from": { "version": "1.1.2", @@ -1820,20 +1837,20 @@ } }, "node_modules/c8": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/c8/-/c8-8.0.1.tgz", - "integrity": "sha512-EINpopxZNH1mETuI0DzRA4MZpAUH+IFiRhnmFD3vFr3vdrgxqi3VfE3KL0AIL+zDq8rC9bZqwM/VDmmoe04y7w==", + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.2.tgz", + "integrity": "sha512-Qr6rj76eSshu5CgRYvktW0uM0CFY0yi4Fd5D0duDXO6sYinyopmftUiJVuzBQxQcwQLor7JWDVRP+dUfCmzgJw==", "dev": true, + "license": "ISC", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@istanbuljs/schema": "^0.1.3", "find-up": "^5.0.0", - "foreground-child": "^2.0.0", + "foreground-child": "^3.1.1", "istanbul-lib-coverage": "^3.2.0", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.1.6", - "rimraf": "^3.0.2", - "test-exclude": "^6.0.0", + "test-exclude": "^7.0.1", "v8-to-istanbul": "^9.0.0", "yargs": "^17.7.2", "yargs-parser": "^21.1.1" @@ -1842,7 +1859,15 @@ "c8": "bin/c8.js" }, "engines": { - "node": ">=12" + "node": ">=18" + }, + "peerDependencies": { + "monocart-coverage-reports": "^2" + }, + "peerDependenciesMeta": { + "monocart-coverage-reports": { + "optional": true + } } }, "node_modules/c8/node_modules/cliui": { @@ -1935,22 +1960,6 @@ "balanced-match": "^1.0.0" } }, - "node_modules/cacache/node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/cacache/node_modules/fs-minipass": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", @@ -2018,18 +2027,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/cacache/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/cacheable-lookup": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz", @@ -2709,6 +2706,7 @@ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" } @@ -2730,6 +2728,7 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -2997,6 +2996,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "license": "MIT", "engines": { "node": ">=0.8.x" } @@ -3261,16 +3261,33 @@ "dev": true }, "node_modules/foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", "dev": true, + "license": "ISC", "dependencies": { "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" + "signal-exit": "^4.0.1" }, "engines": { - "node": ">=8.0.0" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/form-data-encoder": { @@ -4195,6 +4212,7 @@ "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-3.1.0.tgz", "integrity": "sha512-UeVN/ery4/JeXI8h4rM8yZPxsH+KqPi/84qFxHfTGHZnWnK9D0UU9ZGYO+6XAaJLqCWMiks+ARuFOKAiSxJCHA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/runtime": "^7.18.3", "ts-algebra": "^2.0.0" @@ -4207,7 +4225,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -4247,6 +4266,7 @@ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", "dev": true, + "license": "MIT", "dependencies": { "jws": "^3.2.2", "lodash.includes": "^4.3.0", @@ -4269,6 +4289,7 @@ "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", "dev": true, + "license": "MIT", "dependencies": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.11", @@ -4280,6 +4301,7 @@ "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", "dev": true, + "license": "MIT", "dependencies": { "jwa": "^1.4.1", "safe-buffer": "^5.0.1" @@ -4356,37 +4378,43 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.isboolean": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.isinteger": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.isnumber": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.isstring": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.merge": { "version": "4.6.2", @@ -4398,7 +4426,8 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/log-symbols": { "version": "4.1.0", @@ -4426,7 +4455,8 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz", "integrity": "sha512-BFRuQUqc7x2NWxfJBCyUrN8iYUYznzL9JROmRz1gZ6KlOIgmoD+njPVbb+VNn2nGMKggMsK79iUNErillsrx7w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/loupe": { "version": "2.3.7", @@ -4880,10 +4910,11 @@ "dev": true }, "node_modules/mysql2": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.9.7.tgz", - "integrity": "sha512-KnJT8vYRcNAZv73uf9zpXqNbvBG7DJrs+1nACsjZP1HMJ1TgXEy8wnNilXAn/5i57JizXKtrUtwDB7HxT9DDpw==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.1.tgz", + "integrity": "sha512-6zo1T3GILsXMCex3YEu7hCz2OXLUarxFsxvFcUHWMpkPtmZLeTTWgRdc1gWyNJiYt6AxITmIf9bZDRy/jAfWew==", "dev": true, + "license": "MIT", "dependencies": { "denque": "^2.1.0", "generate-function": "^2.3.1", @@ -5359,22 +5390,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/npm-check-updates/node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/npm-check-updates/node_modules/glob": { "version": "10.3.10", "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", @@ -5448,18 +5463,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/npm-check-updates/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/npm-check-updates/node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", @@ -5885,26 +5888,28 @@ "dev": true }, "node_modules/path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", + "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", - "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", "dev": true, + "license": "ISC", "engines": { "node": "14 || >=16.14" } @@ -5943,10 +5948,11 @@ } }, "node_modules/pg": { - "version": "8.11.5", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.11.5.tgz", - "integrity": "sha512-jqgNHSKL5cbDjFlHyYsCXmQDrfIX/3RsNwYqpd4N0Kt8niLuNoRNH+aazv6cOd43gPh9Y4DjQCtb+X0MH0Hvnw==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.12.0.tgz", + "integrity": "sha512-A+LHUSnwnxrnL/tZ+OLfqR1SxLN3c/pgDztZ47Rpbsd4jUytsTtwQo/TLPRzPJMp/1pbhYVhH9cuSZLAajNfjQ==", "dev": true, + "license": "MIT", "dependencies": { "pg-connection-string": "^2.6.4", "pg-pool": "^3.6.2", @@ -6406,22 +6412,6 @@ "balanced-match": "^1.0.0" } }, - "node_modules/read-package-json/node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/read-package-json/node_modules/glob": { "version": "10.3.10", "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", @@ -6468,18 +6458,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/read-package-json/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -6522,7 +6500,8 @@ "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/registry-auth-token": { "version": "5.0.1", @@ -7611,17 +7590,96 @@ } }, "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", "dev": true, + "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "glob": "^10.4.1", + "minimatch": "^9.0.4" }, "engines": { - "node": ">=8" + "node": ">=18" + } + }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" } }, "node_modules/text-table": { @@ -7661,7 +7719,8 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ts-algebra/-/ts-algebra-2.0.0.tgz", "integrity": "sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/ts-api-utils": { "version": "1.0.3", @@ -7963,6 +8022,7 @@ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } @@ -8376,9 +8436,9 @@ "dev": true }, "@babel/runtime": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.5.tgz", - "integrity": "sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz", + "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", "dev": true, "requires": { "regenerator-runtime": "^0.14.0" @@ -8465,33 +8525,33 @@ "dev": true }, "@feathersjs/adapter-commons": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/adapter-commons/-/adapter-commons-5.0.25.tgz", - "integrity": "sha512-/eWhSiSw8U7hnB0KX9aW88EUitwW8phC8TykCJ/Vtv8jExZoZL8VWEjdZsRZoVk9fCu74sXrfRogwGhPMxiScA==", + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/adapter-commons/-/adapter-commons-5.0.26.tgz", + "integrity": "sha512-VQ+ITAKAd6dEc3dvrM8/c0LpbGOBNTTfqCzKMCuzZrsa4S/qKW7yQgv5iKyOfcaLymDKudSOLdIuoSP8T2CRXw==", "requires": { - "@feathersjs/commons": "^5.0.25", - "@feathersjs/errors": "^5.0.25", - "@feathersjs/feathers": "^5.0.25" + "@feathersjs/commons": "^5.0.26", + "@feathersjs/errors": "^5.0.26", + "@feathersjs/feathers": "^5.0.26" } }, "@feathersjs/adapter-tests": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/adapter-tests/-/adapter-tests-5.0.25.tgz", - "integrity": "sha512-ePDBI7mUuG+dHPbwp8c3SyqavxmZ6wNBj43JJJJFzv5Wu90gbfPxHLkTU9G4oT/cRmq8ea5tHJaq0hcNEjcPQA==", + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/adapter-tests/-/adapter-tests-5.0.26.tgz", + "integrity": "sha512-YbgCkE49npM8aOsJrYDU7UL69Z+vP3hZHgjw3FhOt8tOZ8Q8/aRyIdxmuGh/OxzQjLq2UCGGlNMDa4hb5SJ2Pw==", "dev": true }, "@feathersjs/authentication": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/authentication/-/authentication-5.0.25.tgz", - "integrity": "sha512-dKZu5afmGwrKFJ+NPpcdSs4EhyXNVQzRW8ZXypzWWE1rYrun1CVrQ+PeUh/1bCidISctXHD7Nh4SbrIOuj6jTg==", + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/authentication/-/authentication-5.0.26.tgz", + "integrity": "sha512-/Vh3Q6cE5U55NJYVlPF3ZGDsQsXDP55akjpiR6lQjCMp1AvwR3qQ08VXIJyHy2Tc5FHkXgRq6LnLwPVqs3O4Nw==", "dev": true, "requires": { - "@feathersjs/commons": "^5.0.25", - "@feathersjs/errors": "^5.0.25", - "@feathersjs/feathers": "^5.0.25", + "@feathersjs/commons": "^5.0.26", + "@feathersjs/errors": "^5.0.26", + "@feathersjs/feathers": "^5.0.26", "@feathersjs/hooks": "^0.9.0", - "@feathersjs/schema": "^5.0.25", - "@feathersjs/transport-commons": "^5.0.25", + "@feathersjs/schema": "^5.0.26", + "@feathersjs/transport-commons": "^5.0.26", "@types/jsonwebtoken": "^9.0.6", "jsonwebtoken": "^9.0.2", "lodash": "^4.17.21", @@ -8500,26 +8560,26 @@ } }, "@feathersjs/commons": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-5.0.25.tgz", - "integrity": "sha512-hxNne1mytiriGEXmz5jx95WwpK7Qukymah85esJERRJzJ3XI8ax1ItuOrcpFSi8AYY6fjokoJISYlDO/OUVgjg==" + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-5.0.26.tgz", + "integrity": "sha512-Qv/6PTsfwcSEsW+rsfTQl5pxce0Tlfe2V4qnoThGANVCGVNr+sei+wzIzA53s0juZkk2BHr/OvjkcelwTROwKw==" }, "@feathersjs/errors": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-5.0.25.tgz", - "integrity": "sha512-rP1dhbTffybDjTEEiPVQ/fFVLWVFMyUFVuR3UNGYp86D3SGBcvmWtWJz6JwMXUiZy6AUtIvBvjqGS1g441I5lQ==" + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/errors/-/errors-5.0.26.tgz", + "integrity": "sha512-mhR3Xo3xOvMKm7jJtArFQd8Uvtsw0q5mBu8NpFEjLdsYKmyzJs+T9LaCl96eM2chwZs4Bh4M7upuA1ZJ46Uobw==" }, "@feathersjs/express": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/express/-/express-5.0.25.tgz", - "integrity": "sha512-9oW3uKzg3xfDFInfVJ7D0f2HFyvFMgpSiBUMTOUAYxUv1A5vIm4VB3fu1G1vyYFyncYlBcL89va30Zcd49RKmg==", + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/express/-/express-5.0.26.tgz", + "integrity": "sha512-uXhfBX1FpVT7YJsAWy5iX0mTmWLIREWKArHFriQJK+NA7hnntw0OHxpvClpcvjf4E1WDbPWl1pJK28h0tAVljw==", "dev": true, "requires": { - "@feathersjs/authentication": "^5.0.25", - "@feathersjs/commons": "^5.0.25", - "@feathersjs/errors": "^5.0.25", - "@feathersjs/feathers": "^5.0.25", - "@feathersjs/transport-commons": "^5.0.25", + "@feathersjs/authentication": "^5.0.26", + "@feathersjs/commons": "^5.0.26", + "@feathersjs/errors": "^5.0.26", + "@feathersjs/feathers": "^5.0.26", + "@feathersjs/transport-commons": "^5.0.26", "@types/compression": "^1.7.5", "@types/cors": "^2.8.17", "@types/express": "^4.17.21", @@ -8530,11 +8590,11 @@ } }, "@feathersjs/feathers": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/feathers/-/feathers-5.0.25.tgz", - "integrity": "sha512-JHlleo2Zjn+LNk7aN2GO7ClvhJ9RlrGlx81wjxzM6bs+V/1QZ/UGBkp816Pn0W3uSvz+aNGcHDBZbvRsPUU9UQ==", + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/feathers/-/feathers-5.0.26.tgz", + "integrity": "sha512-0cmymaCjNhM2Vqb5tcEtPNrjx2EdkrZgnPQTrD1llf+BHFvKkUFf+219rpM9v3833i9CI+jll50QW/Swd233ig==", "requires": { - "@feathersjs/commons": "^5.0.25", + "@feathersjs/commons": "^5.0.26", "@feathersjs/hooks": "^0.9.0", "events": "^3.3.0" } @@ -8545,15 +8605,15 @@ "integrity": "sha512-kLfWnuhbC25CPkR1/TDcVs0rSiv0JLNxrpUivLwc7FUnkyeciRi5VOmC1SOzL2SOagcozu3+m4VQiONyzgfY7w==" }, "@feathersjs/schema": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/schema/-/schema-5.0.25.tgz", - "integrity": "sha512-PUhZ1jB4BMAx3JbRdZZFQ3dweAeewJw4gOeiMMFTKmm+5+4tk6stTpse6mpZlkoKWAx1gs4s4z7Hc7sMEM4pIQ==", + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/schema/-/schema-5.0.26.tgz", + "integrity": "sha512-QOAwWAtLZMLQmt00Si5pm8pl/isVfaffBFa9sR+6a3BPmNcEo3sodupQ401zEEQ3521lDlh81JHd6tlUllYfPA==", "dev": true, "requires": { - "@feathersjs/adapter-commons": "^5.0.25", - "@feathersjs/commons": "^5.0.25", - "@feathersjs/errors": "^5.0.25", - "@feathersjs/feathers": "^5.0.25", + "@feathersjs/adapter-commons": "^5.0.26", + "@feathersjs/commons": "^5.0.26", + "@feathersjs/errors": "^5.0.26", + "@feathersjs/feathers": "^5.0.26", "@feathersjs/hooks": "^0.9.0", "@types/json-schema": "^7.0.15", "ajv": "^8.13.0", @@ -8562,14 +8622,14 @@ } }, "@feathersjs/transport-commons": { - "version": "5.0.25", - "resolved": "https://registry.npmjs.org/@feathersjs/transport-commons/-/transport-commons-5.0.25.tgz", - "integrity": "sha512-zLOlrtUg8tcFEvN+C7cYYPCS3C7zsP/Kw5HXIq89vg57S/8gCpBG0uh0++PaeyzIEFhX1+6qwnNM1JgtmtmEaw==", + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@feathersjs/transport-commons/-/transport-commons-5.0.26.tgz", + "integrity": "sha512-diXIbzKdBlaz7pcdWDdtUlSiMw0Zhx0Lyw2sF2V8BUUlzkq1Lidz0+MNvNiI29h82veXlc0XB05U6qYlofhUug==", "dev": true, "requires": { - "@feathersjs/commons": "^5.0.25", - "@feathersjs/errors": "^5.0.25", - "@feathersjs/feathers": "^5.0.25", + "@feathersjs/commons": "^5.0.26", + "@feathersjs/errors": "^5.0.26", + "@feathersjs/feathers": "^5.0.26", "encodeurl": "^2.0.0", "lodash": "^4.17.21" } @@ -9088,9 +9148,9 @@ "dev": true }, "@types/node": { - "version": "20.12.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.11.tgz", - "integrity": "sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==", + "version": "20.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", + "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", "dev": true, "requires": { "undici-types": "~5.26.4" @@ -9382,9 +9442,9 @@ } }, "ajv": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", - "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dev": true, "requires": { "fast-deep-equal": "^3.1.3", @@ -9688,20 +9748,19 @@ "dev": true }, "c8": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/c8/-/c8-8.0.1.tgz", - "integrity": "sha512-EINpopxZNH1mETuI0DzRA4MZpAUH+IFiRhnmFD3vFr3vdrgxqi3VfE3KL0AIL+zDq8rC9bZqwM/VDmmoe04y7w==", + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.2.tgz", + "integrity": "sha512-Qr6rj76eSshu5CgRYvktW0uM0CFY0yi4Fd5D0duDXO6sYinyopmftUiJVuzBQxQcwQLor7JWDVRP+dUfCmzgJw==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", "@istanbuljs/schema": "^0.1.3", "find-up": "^5.0.0", - "foreground-child": "^2.0.0", + "foreground-child": "^3.1.1", "istanbul-lib-coverage": "^3.2.0", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.1.6", - "rimraf": "^3.0.2", - "test-exclude": "^6.0.0", + "test-exclude": "^7.0.1", "v8-to-istanbul": "^9.0.0", "yargs": "^17.7.2", "yargs-parser": "^21.1.1" @@ -9781,16 +9840,6 @@ "balanced-match": "^1.0.0" } }, - "foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - } - }, "fs-minipass": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", @@ -9833,12 +9882,6 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", "dev": true - }, - "signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true } } }, @@ -10804,13 +10847,21 @@ "dev": true }, "foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", "dev": true, "requires": { "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" + "signal-exit": "^4.0.1" + }, + "dependencies": { + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + } } }, "form-data-encoder": { @@ -12024,9 +12075,9 @@ "dev": true }, "mysql2": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.9.7.tgz", - "integrity": "sha512-KnJT8vYRcNAZv73uf9zpXqNbvBG7DJrs+1nACsjZP1HMJ1TgXEy8wnNilXAn/5i57JizXKtrUtwDB7HxT9DDpw==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.10.1.tgz", + "integrity": "sha512-6zo1T3GILsXMCex3YEu7hCz2OXLUarxFsxvFcUHWMpkPtmZLeTTWgRdc1gWyNJiYt6AxITmIf9bZDRy/jAfWew==", "dev": true, "requires": { "denque": "^2.1.0", @@ -12396,16 +12447,6 @@ "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true }, - "foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - } - }, "glob": { "version": "10.3.10", "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", @@ -12449,12 +12490,6 @@ "glob": "^10.3.7" } }, - "signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true - }, "strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", @@ -12770,19 +12805,19 @@ "dev": true }, "path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, "requires": { - "lru-cache": "^9.1.1 || ^10.0.0", + "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "dependencies": { "lru-cache": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", - "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", "dev": true }, "minipass": { @@ -12812,9 +12847,9 @@ "dev": true }, "pg": { - "version": "8.11.5", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.11.5.tgz", - "integrity": "sha512-jqgNHSKL5cbDjFlHyYsCXmQDrfIX/3RsNwYqpd4N0Kt8niLuNoRNH+aazv6cOd43gPh9Y4DjQCtb+X0MH0Hvnw==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.12.0.tgz", + "integrity": "sha512-A+LHUSnwnxrnL/tZ+OLfqR1SxLN3c/pgDztZ47Rpbsd4jUytsTtwQo/TLPRzPJMp/1pbhYVhH9cuSZLAajNfjQ==", "dev": true, "requires": { "pg-cloudflare": "^1.1.1", @@ -13145,16 +13180,6 @@ "balanced-match": "^1.0.0" } }, - "foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - } - }, "glob": { "version": "10.3.10", "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", @@ -13182,12 +13207,6 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", "dev": true - }, - "signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true } } }, @@ -14027,14 +14046,63 @@ } }, "test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", "dev": true, "requires": { "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "glob": "^10.4.1", + "minimatch": "^9.0.4" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "glob": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", + "dev": true, + "requires": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" + } + }, + "jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "requires": { + "@isaacs/cliui": "^8.0.2", + "@pkgjs/parseargs": "^0.11.0" + } + }, + "minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true + } } }, "text-table": { diff --git a/package.json b/package.json index b666899..556d9be 100644 --- a/package.json +++ b/package.json @@ -61,28 +61,28 @@ "lib": "lib" }, "dependencies": { - "@feathersjs/adapter-commons": "^5.0.25", - "@feathersjs/commons": "^5.0.25", - "@feathersjs/errors": "^5.0.25" + "@feathersjs/adapter-commons": "^5.0.26", + "@feathersjs/commons": "^5.0.26", + "@feathersjs/errors": "^5.0.26" }, "devDependencies": { - "@feathersjs/adapter-tests": "^5.0.25", - "@feathersjs/express": "^5.0.25", - "@feathersjs/feathers": "^5.0.25", + "@feathersjs/adapter-tests": "^5.0.26", + "@feathersjs/express": "^5.0.26", + "@feathersjs/feathers": "^5.0.26", "@types/chai": "^4.3.16", "@types/mocha": "^10.0.6", - "@types/node": "^20.12.11", + "@types/node": "^20.14.2", "@types/pg": "^8.11.6", "@typescript-eslint/eslint-plugin": "^6.9.1", "@typescript-eslint/parser": "^6.9.1", "body-parser": "^1.20.2", - "c8": "^8.0.1", + "c8": "^10.1.2", "chai": "^4.3.10", "eslint": "^8.52.0", "mocha": "^10.4.0", - "mysql2": "^3.9.7", + "mysql2": "^3.10.1", "npm-check-updates": "^16.14.20", - "pg": "^8.11.5", + "pg": "^8.12.0", "pg-hstore": "^2.3.4", "sequelize": "^6.37.3", "shx": "^0.3.4", diff --git a/src/adapter.ts b/src/adapter.ts index c6877b3..1f473ab 100644 --- a/src/adapter.ts +++ b/src/adapter.ts @@ -1,7 +1,7 @@ import { MethodNotAllowed, NotFound } from '@feathersjs/errors'; import { _ } from '@feathersjs/commons'; import { - select as selector, + select as _selector, AdapterBase, filterQuery } from '@feathersjs/adapter-commons'; @@ -222,6 +222,10 @@ export class SequelizeAdapter< return sequelize; } + private selector (params?: ServiceParams) { + return _selector(params, this.id); + } + async _find (params?: ServiceParams & { paginate?: PaginationOptions }): Promise> async _find (params?: ServiceParams & { paginate: false }): Promise async _find (params?: ServiceParams): Promise | Result[]> @@ -273,7 +277,6 @@ export class SequelizeAdapter< async _create (data: Data | Data[], params?: ServiceParams): Promise async _create (data: Data | Data[], params: ServiceParams = {} as ServiceParams): Promise { const isArray = Array.isArray(data); - const select = selector(params, this.id); if (isArray && !this.allowsMulti('create', params)) { throw new MethodNotAllowed('Can not create multiple entries') @@ -296,8 +299,9 @@ export class SequelizeAdapter< } if (sequelizeOptions.raw) { + const select = isPresent(sequelizeOptions.attributes) ? this.selector(params) : undefined; const result = instances.map((instance) => { - if (isPresent(sequelizeOptions.attributes)) { + if (select) { return select(instance.toJSON()); } return instance.toJSON(); @@ -306,6 +310,7 @@ export class SequelizeAdapter< } if (isPresent(sequelizeOptions.attributes)) { + const select = this.selector(params); const result = instances.map((instance) => { const result = select(instance.toJSON()) return Model.build(result, { isNewRecord: false }); @@ -321,7 +326,7 @@ export class SequelizeAdapter< .catch(errorHandler); if (sequelizeOptions.raw) { - return select((result as Model).toJSON()) + return this.selector(params)((result as Model).toJSON()) } return result; @@ -336,7 +341,6 @@ export class SequelizeAdapter< const Model = this.ModelWithScope(params); const sequelizeOptions = this.paramsToAdapter(id, params); - const select = selector(params, this.id); const values = _.omit(data, this.id); if (id === null) { @@ -395,16 +399,16 @@ export class SequelizeAdapter< } if (sequelizeOptions.raw) { - const result = instances.map((instance) => { - if (hasAttributes) { - return select(instance.toJSON()); - } - return instance.toJSON(); - }) + const select = hasAttributes ? this.selector(params) : undefined; + const result = instances.map((instance) => select + ? select(instance.toJSON()) + : instance.toJSON() + ) return result; } if (hasAttributes) { + const select = this.selector(params); const result = instances.map((instance) => { const result = select(instance.toJSON()) return Model.build(result, { isNewRecord: false }); @@ -448,13 +452,13 @@ export class SequelizeAdapter< if (sequelizeOptions.raw) { const result = instance.toJSON(); if (isPresent(sequelizeOptions.attributes)) { - return select(result); + return this.selector(params)(result); } return result; } if (isPresent(sequelizeOptions.attributes)) { - const result = select(instance.toJSON()) + const result = this.selector(params)(instance.toJSON()) return Model.build(result, { isNewRecord: false }); } @@ -464,7 +468,6 @@ export class SequelizeAdapter< async _update (id: Id, data: Data, params: ServiceParams = {} as ServiceParams): Promise { const Model = this.ModelWithScope(params); const sequelizeOptions = this.paramsToAdapter(id, params); - const select = selector(params, this.id); const instance = await this._get(id, { ...params, @@ -496,13 +499,13 @@ export class SequelizeAdapter< if (sequelizeOptions.raw) { const result = instance.toJSON(); if (isPresent(sequelizeOptions.attributes)) { - return select(result); + return this.selector(params)(result); } return result; } if (isPresent(sequelizeOptions.attributes)) { - const result = select(instance.toJSON()) + const result = this.selector(params)(instance.toJSON()) return Model.build(result, { isNewRecord: false }); } @@ -548,12 +551,26 @@ export class SequelizeAdapter< return current; } - const result = await this._get(id, params); + const instance = await this._get(id, { + ...params, + sequelize: { ...params.sequelize, raw: false } + }) as unknown as Model; - const instance = result instanceof Model ? result : Model.build(result as any, { isNewRecord: false }); + await instance.destroy(sequelizeOptions).catch(errorHandler); - await instance.destroy(sequelizeOptions); + if (sequelizeOptions.raw) { + const result = instance.toJSON(); + if (isPresent(sequelizeOptions.attributes)) { + return this.selector(params)(result); + } + return result; + } - return result; + if (isPresent(sequelizeOptions.attributes)) { + const result = this.selector(params)(instance.toJSON()) + return Model.build(result, { isNewRecord: false }); + } + + return instance as unknown as Result; } } diff --git a/test/index.test.ts b/test/index.test.ts index 0fd7c80..b101346 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -2,7 +2,7 @@ import pg from 'pg'; import assert from 'assert'; import { expect } from 'chai'; -import Sequelize, { Op } from 'sequelize'; +import { DataTypes, Op } from 'sequelize'; import errors from '@feathersjs/errors'; import type { Paginated } from '@feathersjs/feathers'; import { feathers } from '@feathersjs/feathers'; @@ -25,19 +25,19 @@ const testSuite = adaptertests([ '.get', '.get + $select', '.get + id + query', - // '.get + NotFound', // add '.get + NotFound (integer)' once https://github.com/feathersjs/feathers/pull/3486 is merged and published + '.get + NotFound (integer)', '.find', '.remove', '.remove + $select', '.remove + id + query', - // add '.remove + NotFound (integer)' once https://github.com/feathersjs/feathers/pull/3486 is merged and published + '.remove + NotFound (integer)', '.remove + multi', '.remove + multi no pagination', '.update', '.update + $select', '.update + id + query', '.update + query + NotFound', - // '.update + NotFound', // add '.update + NotFound (integer)' once https://github.com/feathersjs/feathers/pull/3486 is merged and published + '.update + NotFound (integer)', '.patch', '.patch + $select', '.patch + id + query', @@ -46,7 +46,7 @@ const testSuite = adaptertests([ '.patch multi query same', '.patch multi query changed', '.patch + query + NotFound', - // '.patch + NotFound', // add '.patch + NotFound (integer)' once https://github.com/feathersjs/feathers/pull/3486 is merged and published + '.patch + NotFound (integer)', '.create', '.create + $select', '.create multi', @@ -94,20 +94,20 @@ const sequelize = makeConnection(process.env.DB); const Model = sequelize.define('people', { name: { - type: Sequelize.STRING, + type: DataTypes.STRING, allowNull: false }, age: { - type: Sequelize.INTEGER + type: DataTypes.INTEGER }, created: { - type: Sequelize.BOOLEAN + type: DataTypes.BOOLEAN }, time: { - type: Sequelize.BIGINT + type: DataTypes.BIGINT }, status: { - type: Sequelize.STRING, + type: DataTypes.STRING, defaultValue: 'pending' } }, { @@ -127,43 +127,46 @@ const Model = sequelize.define('people', { }); const Order = sequelize.define('orders', { name: { - type: Sequelize.STRING, + type: DataTypes.STRING, allowNull: false } }, { freezeTableName: true }); +Model.hasMany(Order); +Order.belongsTo(Model); + const CustomId = sequelize.define('people-customid', { customid: { - type: Sequelize.INTEGER, + type: DataTypes.INTEGER, autoIncrement: true, primaryKey: true }, name: { - type: Sequelize.STRING, + type: DataTypes.STRING, allowNull: false }, age: { - type: Sequelize.INTEGER + type: DataTypes.INTEGER }, created: { - type: Sequelize.BOOLEAN + type: DataTypes.BOOLEAN }, time: { - type: Sequelize.BIGINT + type: DataTypes.BIGINT } }, { freezeTableName: true }); const CustomGetterSetter = sequelize.define('custom-getter-setter', { addsOneOnSet: { - type: Sequelize.INTEGER, + type: DataTypes.INTEGER, set (val: any) { this.setDataValue('addsOneOnSet', val + 1); } }, addsOneOnGet: { - type: Sequelize.INTEGER, + type: DataTypes.INTEGER, get () { return this.getDataValue('addsOneOnGet') + 1; } @@ -171,8 +174,6 @@ const CustomGetterSetter = sequelize.define('custom-getter-setter', { }, { freezeTableName: true }); -Model.hasMany(Order); -Order.belongsTo(Model); describe('Feathers Sequelize Service', () => { before(async () => { @@ -229,89 +230,6 @@ describe('Feathers Sequelize Service', () => { testSuite(app, errors, 'people', 'id'); testSuite(app, errors, 'people-customid', 'customid'); - - describe('remove this when https://github.com/feathersjs/feathers/pull/3486 is merged and published', () => { - it('.get + NotFound (integer)', async () => { - try { - await app.service('people').get(123456789) - throw new Error('Should never get here') - } catch (error: any) { - assert.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error') - } - }); - - it('.get + NotFound (integer)', async () => { - try { - await app.service('people-customid').get(123456789) - throw new Error('Should never get here') - } catch (error: any) { - assert.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error') - } - }); - - it('.remove + NotFound (integer)', async () => { - try { - await app.service('people').remove(123456789) - throw new Error('Should never get here') - } catch (error: any) { - assert.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error') - } - }) - - it('.remove + NotFound (integer)', async () => { - try { - await app.service('people-customid').remove(123456789) - throw new Error('Should never get here') - } catch (error: any) { - assert.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error') - } - }) - - it('.update + NotFound (integer)', async () => { - try { - await app.service('people').update(123456789, { - name: 'NotFound' - }) - throw new Error('Should never get here') - } catch (error: any) { - assert.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error') - } - }) - - it('.update + NotFound (integer)', async () => { - try { - await app.service('people-customid').update(123456789, { - name: 'NotFound' - }) - throw new Error('Should never get here') - } catch (error: any) { - assert.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error') - } - }) - - it('.patch + NotFound (integer)', async () => { - try { - await app.service('people').patch(123456789, { - name: 'PatchDoug' - }) - throw new Error('Should never get here') - } catch (error: any) { - assert.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error') - } - }) - - it('.patch + NotFound (integer)', async () => { - try { - await app.service('people-customid').patch(123456789, { - name: 'PatchDoug' - }) - throw new Error('Should never get here') - } catch (error: any) { - assert.strictEqual(error.name, 'NotFound', 'Error is a NotFound Feathers error') - } - }) - }); - }); describe('Feathers-Sequelize Specific Tests', () => { @@ -342,10 +260,6 @@ describe('Feathers Sequelize Service', () => { multi: true })); - afterEach(() => app.service('people') - .remove(null, { query: {} }) - ); - describe('Common functionality', () => { const people = app.service('people'); let kirsten: any; @@ -354,6 +268,8 @@ describe('Feathers Sequelize Service', () => { kirsten = await people.create({ name: 'Kirsten', age: 30 }); }); + afterEach(() => people.remove(null, { query: {} })); + it('allows querying for null values (#45)', async () => { const name = 'Null test'; await people.create({ name }); @@ -380,7 +296,7 @@ describe('Feathers Sequelize Service', () => { await people.create({ name, age: 10 }); const { data } = await people.find({ query: - { age: { [Sequelize.Op.eq]: 10 } } + { age: { [Op.eq]: 10 } } }) as Paginated; assert.strictEqual(data.length, 1); @@ -745,7 +661,7 @@ describe('Feathers Sequelize Service', () => { app.use('ops-and-whitelist', new SequelizeService({ Model, whitelist: ['$between'], - operatorMap: { $between: Sequelize.Op.between } + operatorMap: { $between: Op.between } })); const ops = app.service('ops-and-whitelist'); await ops.find({ query: { name: { $like: 'Beau' } } });